public class VertexImpl extends Object implements Vertex, org.apache.hadoop.yarn.event.EventHandler<VertexEvent>
| Modifier and Type | Class and Description |
|---|---|
static class |
VertexImpl.InitTransition |
static class |
VertexImpl.InputDataInformationTransition |
static class |
VertexImpl.NoOpVertexManager
This is for recovery when VertexReconfigureDoneEvent is seen.
|
static class |
VertexImpl.NullEdgeInitializedTransition |
static class |
VertexImpl.RecoverTransition |
static class |
VertexImpl.RootInputInitializedTransition |
static class |
VertexImpl.SourceVertexStartedTransition |
static class |
VertexImpl.StartTransition |
static class |
VertexImpl.StartWhileInitializingTransition |
static class |
VertexImpl.VertexInitializedTransition |
Vertex.VertexConfig| Modifier and Type | Field and Description |
|---|---|
protected StateChangeNotifier |
stateChangeNotifier |
protected static org.apache.hadoop.yarn.state.StateMachineFactory<VertexImpl,VertexState,VertexEventType,VertexEvent> |
stateMachineFactory |
| Constructor and Description |
|---|
VertexImpl(org.apache.tez.dag.records.TezVertexID vertexId,
org.apache.tez.dag.api.records.DAGProtos.VertexPlan vertexPlan,
String vertexName,
org.apache.hadoop.conf.Configuration dagConf,
org.apache.hadoop.yarn.event.EventHandler eventHandler,
TaskCommunicatorManagerInterface taskCommunicatorManagerInterface,
org.apache.hadoop.yarn.util.Clock clock,
TaskHeartbeatHandler thh,
boolean commitVertexOutputs,
AppContext appContext,
org.apache.tez.dag.api.VertexLocationHint vertexLocationHint,
Map<String,org.apache.tez.dag.app.dag.impl.DAGImpl.VertexGroupInfo> dagVertexGroups,
TaskSpecificLaunchCmdOption taskSpecificLaunchCmdOption,
StateChangeNotifier entityStatusTracker,
org.apache.hadoop.conf.Configuration dagOnlyConf) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCounters(org.apache.tez.common.counters.TezCounters tezCounters)
Add custom counters to the vertex
|
void |
addSharedOutputs(Set<String> outputs) |
protected void |
addTask(Task task) |
int |
compareTo(Vertex other) |
void |
constructFinalFullcounters() |
protected RootInputInitializerManager |
createRootInputInitializerManager(String dagName,
String vertexName,
org.apache.tez.dag.records.TezVertexID vertexID,
org.apache.hadoop.yarn.event.EventHandler eventHandler,
int numTasks,
int numNodes,
org.apache.hadoop.yarn.api.records.Resource vertexTaskResource,
org.apache.hadoop.yarn.api.records.Resource totalResource) |
void |
doneReconfiguringVertex() |
boolean |
equals(Object obj) |
Map<String,org.apache.tez.dag.api.RootInputLeafOutput<org.apache.tez.dag.api.InputDescriptor,org.apache.tez.dag.api.InputInitializerDescriptor>> |
getAdditionalInputs() |
Map<String,org.apache.tez.dag.api.RootInputLeafOutput<org.apache.tez.dag.api.OutputDescriptor,org.apache.tez.dag.api.OutputCommitterDescriptor>> |
getAdditionalOutputs() |
org.apache.tez.common.counters.TezCounters |
getAllCounters()
Get all the counters of this vertex.
|
AppContext |
getAppContext() |
org.apache.tez.common.counters.TezCounters |
getCachedCounters()
Get all the counters of this vertex.
|
float |
getCompletedTaskProgress() |
int |
getCompletedTasks() |
org.apache.hadoop.conf.Configuration |
getConf() |
int |
getContainerLauncherIdentifier() |
DAG |
getDAG() |
List<String> |
getDiagnostics() |
int |
getDistanceFromRoot() |
int |
getFailedTaskAttemptCount() |
long |
getFinishTime() |
long |
getFirstTaskStartTime() |
List<org.apache.tez.runtime.api.impl.GroupInputSpec> |
getGroupInputSpecList() |
long |
getInitTime() |
List<org.apache.tez.runtime.api.impl.InputSpec> |
getInputSpecList(int taskIndex) |
Map<Vertex,Edge> |
getInputVertices() |
int |
getInputVerticesCount() |
LinkedHashMap<String,Integer> |
getIOIndices() |
int |
getKilledTaskAttemptCount() |
long |
getLastTaskFinishTime() |
String |
getLogIdentifier() |
int |
getMaxTaskConcurrency() |
String |
getName() |
org.apache.tez.runtime.api.OutputCommitter |
getOutputCommitter(String outputName) |
Map<String,org.apache.tez.runtime.api.OutputCommitter> |
getOutputCommitters() |
List<org.apache.tez.runtime.api.impl.OutputSpec> |
getOutputSpecList(int taskIndex) |
Map<Vertex,Edge> |
getOutputVertices() |
int |
getOutputVerticesCount() |
org.apache.tez.dag.api.ProcessorDescriptor |
getProcessorDescriptor() |
float |
getProgress() |
int |
getRejectedTaskAttemptCount() |
int |
getRunningTasks() |
ServicePluginInfo |
getServicePluginInfo() |
Set<String> |
getSharedOutputs() |
LegacySpeculator |
getSpeculator() |
long |
getStartTime() |
VertexState |
getState() |
protected org.apache.hadoop.yarn.state.StateMachine<VertexState,VertexEventType,VertexEvent> |
getStateMachine() |
org.apache.tez.runtime.api.VertexStatistics |
getStatistics() |
int |
getSucceededTasks() |
Task |
getTask(int taskIndex) |
Task |
getTask(org.apache.tez.dag.records.TezTaskID taskID) |
TaskAttemptEventInfo |
getTaskAttemptTezEvents(org.apache.tez.dag.records.TezTaskAttemptID attemptID,
int fromEventId,
int preRoutedFromEventId,
int maxEvents) |
int |
getTaskCommunicatorIdentifier() |
org.apache.tez.dag.api.TaskLocationHint |
getTaskLocationHint(org.apache.tez.dag.records.TezTaskID taskId) |
org.apache.hadoop.yarn.api.records.Resource |
getTaskResource() |
Map<org.apache.tez.dag.records.TezTaskID,Task> |
getTasks() |
int |
getTaskSchedulerIdentifier() |
VertexTerminationCause |
getTerminationCause() |
int |
getTotalTasks() |
Vertex.VertexConfig |
getVertexConfig() |
org.apache.tez.dag.records.TezVertexID |
getVertexId() |
org.apache.tez.dag.api.records.DAGProtos.VertexPlan |
getVertexPlan() |
ProgressBuilder |
getVertexProgress() |
VertexStats |
getVertexStats() |
VertexStatusBuilder |
getVertexStatus(Set<org.apache.tez.dag.api.client.StatusGetOpts> statusOptions) |
void |
handle(VertexEvent event) |
void |
handleSpeculatorEvent(SpeculatorEvent event) |
int |
hashCode() |
void |
incrementFailedTaskAttemptCount() |
void |
incrementKilledTaskAttemptCount() |
void |
incrementRejectedTaskAttemptCount() |
static org.apache.tez.common.counters.TezCounters |
incrTaskCounters(org.apache.tez.common.counters.TezCounters counters,
Collection<Task> tasks) |
boolean |
isSpeculationEnabled() |
void |
reconfigureVertex(int parallelism,
org.apache.tez.dag.api.VertexLocationHint locationHint,
Map<String,org.apache.tez.dag.api.EdgeProperty> sourceEdgeProperties) |
void |
reconfigureVertex(int parallelism,
org.apache.tez.dag.api.VertexLocationHint locationHint,
Map<String,org.apache.tez.dag.api.EdgeProperty> sourceEdgeProperties,
Map<String,org.apache.tez.runtime.api.InputSpecUpdate> rootInputSpecUpdate) |
void |
reconfigureVertex(Map<String,org.apache.tez.runtime.api.InputSpecUpdate> rootInputSpecUpdate,
int parallelism,
org.apache.tez.dag.api.VertexLocationHint locationHint) |
void |
reportTaskStartTime(long taskStartTime) |
void |
scheduleSpeculativeTask(org.apache.tez.dag.records.TezTaskID taskId) |
void |
scheduleTasks(List<org.apache.tez.dag.api.VertexManagerPluginContext.ScheduleTaskRequest> tasksToSchedule) |
void |
setAdditionalInputs(List<org.apache.tez.dag.api.records.DAGProtos.RootInputLeafOutputProto> inputs) |
void |
setAdditionalOutputs(List<org.apache.tez.dag.api.records.DAGProtos.RootInputLeafOutputProto> outputs) |
void |
setInputVertices(Map<Vertex,Edge> inVertices) |
void |
setOutputVertices(Map<Vertex,Edge> outVertices) |
void |
setParallelism(int parallelism,
org.apache.tez.dag.api.VertexLocationHint vertexLocationHint,
Map<String,org.apache.tez.dag.api.EdgeManagerPluginDescriptor> sourceEdgeManagers,
Map<String,org.apache.tez.runtime.api.InputSpecUpdate> rootInputSpecUpdates,
boolean fromVertexManager) |
void |
setVertexLocationHint(org.apache.tez.dag.api.VertexLocationHint vertexLocationHint) |
static VertexStats |
updateVertexStats(VertexStats stats,
Collection<Task> tasks) |
void |
vertexReconfigurationPlanned() |
protected final StateChangeNotifier stateChangeNotifier
protected static final org.apache.hadoop.yarn.state.StateMachineFactory<VertexImpl,VertexState,VertexEventType,VertexEvent> stateMachineFactory
public VertexImpl(org.apache.tez.dag.records.TezVertexID vertexId,
org.apache.tez.dag.api.records.DAGProtos.VertexPlan vertexPlan,
String vertexName,
org.apache.hadoop.conf.Configuration dagConf,
org.apache.hadoop.yarn.event.EventHandler eventHandler,
TaskCommunicatorManagerInterface taskCommunicatorManagerInterface,
org.apache.hadoop.yarn.util.Clock clock,
TaskHeartbeatHandler thh,
boolean commitVertexOutputs,
AppContext appContext,
org.apache.tez.dag.api.VertexLocationHint vertexLocationHint,
Map<String,org.apache.tez.dag.app.dag.impl.DAGImpl.VertexGroupInfo> dagVertexGroups,
TaskSpecificLaunchCmdOption taskSpecificLaunchCmdOption,
StateChangeNotifier entityStatusTracker,
org.apache.hadoop.conf.Configuration dagOnlyConf)
public org.apache.hadoop.conf.Configuration getConf()
public int getTaskSchedulerIdentifier()
getTaskSchedulerIdentifier in interface Vertexpublic int getContainerLauncherIdentifier()
getContainerLauncherIdentifier in interface Vertexpublic int getTaskCommunicatorIdentifier()
getTaskCommunicatorIdentifier in interface Vertexpublic ServicePluginInfo getServicePluginInfo()
getServicePluginInfo in interface Vertexpublic boolean isSpeculationEnabled()
isSpeculationEnabled in interface Vertexprotected org.apache.hadoop.yarn.state.StateMachine<VertexState,VertexEventType,VertexEvent> getStateMachine()
public org.apache.tez.dag.records.TezVertexID getVertexId()
getVertexId in interface Vertexpublic org.apache.tez.dag.api.records.DAGProtos.VertexPlan getVertexPlan()
getVertexPlan in interface Vertexpublic int getDistanceFromRoot()
getDistanceFromRoot in interface Vertexpublic LinkedHashMap<String,Integer> getIOIndices()
getIOIndices in interface Vertexpublic Task getTask(org.apache.tez.dag.records.TezTaskID taskID)
public int getTotalTasks()
getTotalTasks in interface Vertexpublic int getCompletedTasks()
getCompletedTasks in interface Vertexpublic int getSucceededTasks()
getSucceededTasks in interface Vertexpublic int getRunningTasks()
getRunningTasks in interface Vertexpublic org.apache.tez.common.counters.TezCounters getAllCounters()
VertexgetAllCounters in interface Vertexpublic org.apache.tez.common.counters.TezCounters getCachedCounters()
VertexgetCachedCounters in interface Vertexpublic void addCounters(org.apache.tez.common.counters.TezCounters tezCounters)
VertexaddCounters in interface VertextezCounters - counters to addpublic int getMaxTaskConcurrency()
getMaxTaskConcurrency in interface Vertexpublic VertexStats getVertexStats()
public long getInitTime()
getInitTime in interface Vertexpublic long getStartTime()
getStartTime in interface Vertexpublic long getFinishTime()
getFinishTime in interface Vertexpublic void reportTaskStartTime(long taskStartTime)
reportTaskStartTime in interface Vertexpublic long getFirstTaskStartTime()
getFirstTaskStartTime in interface Vertexpublic long getLastTaskFinishTime()
getLastTaskFinishTime in interface Vertexpublic Vertex.VertexConfig getVertexConfig()
getVertexConfig in interface Vertexpublic static org.apache.tez.common.counters.TezCounters incrTaskCounters(org.apache.tez.common.counters.TezCounters counters,
Collection<Task> tasks)
public static VertexStats updateVertexStats(VertexStats stats, Collection<Task> tasks)
public List<String> getDiagnostics()
getDiagnostics in interface Vertexpublic float getProgress()
getProgress in interface Vertexpublic float getCompletedTaskProgress()
getCompletedTaskProgress in interface Vertexpublic ProgressBuilder getVertexProgress()
getVertexProgress in interface Vertexpublic VertexStatusBuilder getVertexStatus(Set<org.apache.tez.dag.api.client.StatusGetOpts> statusOptions)
getVertexStatus in interface Vertexpublic org.apache.tez.dag.api.TaskLocationHint getTaskLocationHint(org.apache.tez.dag.records.TezTaskID taskId)
getTaskLocationHint in interface Vertexpublic VertexState getState()
public VertexTerminationCause getTerminationCause()
getTerminationCause in interface Vertexpublic AppContext getAppContext()
getAppContext in interface Vertexpublic String getLogIdentifier()
getLogIdentifier in interface Vertexpublic void incrementFailedTaskAttemptCount()
incrementFailedTaskAttemptCount in interface Vertexpublic void incrementKilledTaskAttemptCount()
incrementKilledTaskAttemptCount in interface Vertexpublic void incrementRejectedTaskAttemptCount()
incrementRejectedTaskAttemptCount in interface Vertexpublic int getFailedTaskAttemptCount()
getFailedTaskAttemptCount in interface Vertexpublic int getKilledTaskAttemptCount()
getKilledTaskAttemptCount in interface Vertexpublic int getRejectedTaskAttemptCount()
getRejectedTaskAttemptCount in interface Vertexpublic void scheduleSpeculativeTask(org.apache.tez.dag.records.TezTaskID taskId)
scheduleSpeculativeTask in interface Vertexpublic void scheduleTasks(List<org.apache.tez.dag.api.VertexManagerPluginContext.ScheduleTaskRequest> tasksToSchedule)
scheduleTasks in interface Vertexpublic void reconfigureVertex(int parallelism,
@Nullable
org.apache.tez.dag.api.VertexLocationHint locationHint,
@Nullable
Map<String,org.apache.tez.dag.api.EdgeProperty> sourceEdgeProperties)
throws AMUserCodeException
reconfigureVertex in interface VertexAMUserCodeExceptionpublic void reconfigureVertex(@Nullable Map<String,org.apache.tez.runtime.api.InputSpecUpdate> rootInputSpecUpdate, int parallelism, @Nullable org.apache.tez.dag.api.VertexLocationHint locationHint) throws AMUserCodeException
reconfigureVertex in interface VertexAMUserCodeExceptionpublic void reconfigureVertex(int parallelism,
@Nullable
org.apache.tez.dag.api.VertexLocationHint locationHint,
@Nullable
Map<String,org.apache.tez.dag.api.EdgeProperty> sourceEdgeProperties,
@Nullable
Map<String,org.apache.tez.runtime.api.InputSpecUpdate> rootInputSpecUpdate)
throws AMUserCodeException
reconfigureVertex in interface VertexAMUserCodeExceptionpublic void setParallelism(int parallelism,
org.apache.tez.dag.api.VertexLocationHint vertexLocationHint,
Map<String,org.apache.tez.dag.api.EdgeManagerPluginDescriptor> sourceEdgeManagers,
Map<String,org.apache.tez.runtime.api.InputSpecUpdate> rootInputSpecUpdates,
boolean fromVertexManager)
throws AMUserCodeException
setParallelism in interface VertexAMUserCodeExceptionpublic void setVertexLocationHint(org.apache.tez.dag.api.VertexLocationHint vertexLocationHint)
setVertexLocationHint in interface Vertexpublic void vertexReconfigurationPlanned()
vertexReconfigurationPlanned in interface Vertexpublic void doneReconfiguringVertex()
doneReconfiguringVertex in interface Vertexpublic void handle(VertexEvent event)
handle in interface org.apache.hadoop.yarn.event.EventHandler<VertexEvent>protected void addTask(Task task)
protected RootInputInitializerManager createRootInputInitializerManager(String dagName, String vertexName, org.apache.tez.dag.records.TezVertexID vertexID, org.apache.hadoop.yarn.event.EventHandler eventHandler, int numTasks, int numNodes, org.apache.hadoop.yarn.api.records.Resource vertexTaskResource, org.apache.hadoop.yarn.api.records.Resource totalResource)
@InterfaceAudience.Private public void constructFinalFullcounters()
public TaskAttemptEventInfo getTaskAttemptTezEvents(org.apache.tez.dag.records.TezTaskAttemptID attemptID, int fromEventId, int preRoutedFromEventId, int maxEvents)
getTaskAttemptTezEvents in interface Vertexpublic void setInputVertices(Map<Vertex,Edge> inVertices)
setInputVertices in interface Vertexpublic void setOutputVertices(Map<Vertex,Edge> outVertices)
setOutputVertices in interface Vertexpublic void setAdditionalInputs(List<org.apache.tez.dag.api.records.DAGProtos.RootInputLeafOutputProto> inputs)
setAdditionalInputs in interface Vertexpublic void handleSpeculatorEvent(SpeculatorEvent event)
handleSpeculatorEvent in interface Vertex@Nullable public Map<String,org.apache.tez.runtime.api.OutputCommitter> getOutputCommitters()
getOutputCommitters in interface Vertex@Nullable @InterfaceAudience.Private public org.apache.tez.runtime.api.OutputCommitter getOutputCommitter(String outputName)
public void setAdditionalOutputs(List<org.apache.tez.dag.api.records.DAGProtos.RootInputLeafOutputProto> outputs)
setAdditionalOutputs in interface Vertex@Nullable public Map<String,org.apache.tez.dag.api.RootInputLeafOutput<org.apache.tez.dag.api.InputDescriptor,org.apache.tez.dag.api.InputInitializerDescriptor>> getAdditionalInputs()
getAdditionalInputs in interface Vertex@Nullable public Map<String,org.apache.tez.dag.api.RootInputLeafOutput<org.apache.tez.dag.api.OutputDescriptor,org.apache.tez.dag.api.OutputCommitterDescriptor>> getAdditionalOutputs()
getAdditionalOutputs in interface Vertexpublic int compareTo(Vertex other)
compareTo in interface Comparable<Vertex>public Map<Vertex,Edge> getInputVertices()
getInputVertices in interface Vertexpublic Map<Vertex,Edge> getOutputVertices()
getOutputVertices in interface Vertexpublic org.apache.tez.runtime.api.VertexStatistics getStatistics()
getStatistics in interface Vertexpublic int getInputVerticesCount()
getInputVerticesCount in interface Vertexpublic int getOutputVerticesCount()
getOutputVerticesCount in interface Vertexpublic org.apache.tez.dag.api.ProcessorDescriptor getProcessorDescriptor()
getProcessorDescriptor in interface Vertexpublic org.apache.hadoop.yarn.api.records.Resource getTaskResource()
getTaskResource in interface Vertexpublic List<org.apache.tez.runtime.api.impl.InputSpec> getInputSpecList(int taskIndex) throws AMUserCodeException
getInputSpecList in interface VertexAMUserCodeExceptionpublic List<org.apache.tez.runtime.api.impl.OutputSpec> getOutputSpecList(int taskIndex) throws AMUserCodeException
getOutputSpecList in interface VertexAMUserCodeExceptionpublic List<org.apache.tez.runtime.api.impl.GroupInputSpec> getGroupInputSpecList()
getGroupInputSpecList in interface Vertexpublic void addSharedOutputs(Set<String> outputs)
addSharedOutputs in interface Vertexpublic Set<String> getSharedOutputs()
getSharedOutputs in interface Vertexpublic LegacySpeculator getSpeculator()
Copyright © 2019 Apache Software Foundation. All rights reserved.