org.apache.tez.dag.app.dag.impl
Class DAGImpl
java.lang.Object
org.apache.tez.dag.app.dag.impl.DAGImpl
- All Implemented Interfaces:
- org.apache.hadoop.yarn.event.EventHandler<DAGEvent>, DAG
public class DAGImpl
- extends Object
- implements DAG, org.apache.hadoop.yarn.event.EventHandler<DAGEvent>
Implementation of Job interface. Maintains the state machines of Job.
The read and write calls use ReadWriteLock for concurrency.
|
Constructor Summary |
DAGImpl(org.apache.tez.dag.records.TezDAGID dagId,
org.apache.hadoop.conf.Configuration conf,
org.apache.tez.dag.api.records.DAGProtos.DAGPlan jobPlan,
org.apache.hadoop.yarn.event.EventHandler eventHandler,
TaskAttemptListener taskAttemptListener,
org.apache.hadoop.security.Credentials dagCredentials,
org.apache.hadoop.yarn.util.Clock clock,
String appUserName,
TaskHeartbeatHandler thh,
AppContext appContext)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
conf
public final org.apache.hadoop.conf.Configuration conf
stateMachineFactory
protected static final org.apache.hadoop.yarn.state.StateMachineFactory<DAGImpl,DAGState,DAGEventType,DAGEvent> stateMachineFactory
DAGImpl
public DAGImpl(org.apache.tez.dag.records.TezDAGID dagId,
org.apache.hadoop.conf.Configuration conf,
org.apache.tez.dag.api.records.DAGProtos.DAGPlan jobPlan,
org.apache.hadoop.yarn.event.EventHandler eventHandler,
TaskAttemptListener taskAttemptListener,
org.apache.hadoop.security.Credentials dagCredentials,
org.apache.hadoop.yarn.util.Clock clock,
String appUserName,
TaskHeartbeatHandler thh,
AppContext appContext)
getStateMachine
protected org.apache.hadoop.yarn.state.StateMachine<DAGState,DAGEventType,DAGEvent> getStateMachine()
getID
public org.apache.tez.dag.records.TezDAGID getID()
- Specified by:
getID in interface DAG
getConf
public org.apache.hadoop.conf.Configuration getConf()
- Specified by:
getConf in interface DAG
getJobPlan
public org.apache.tez.dag.api.records.DAGProtos.DAGPlan getJobPlan()
- Specified by:
getJobPlan in interface DAG
checkAccess
public boolean checkAccess(org.apache.hadoop.security.UserGroupInformation callerUGI,
org.apache.hadoop.yarn.api.records.ApplicationAccessType jobOperation)
- Specified by:
checkAccess in interface DAG
getVertex
public Vertex getVertex(org.apache.tez.dag.records.TezVertexID vertexID)
- Specified by:
getVertex in interface DAG
isUber
public boolean isUber()
- Specified by:
isUber in interface DAG
getCredentials
public org.apache.hadoop.security.Credentials getCredentials()
- Specified by:
getCredentials in interface DAG
getDagUGI
public org.apache.hadoop.security.UserGroupInformation getDagUGI()
- Specified by:
getDagUGI in interface DAG
restoreFromEvent
public DAGState restoreFromEvent(HistoryEvent historyEvent)
- Specified by:
restoreFromEvent in interface DAG
getAllCounters
public org.apache.tez.common.counters.TezCounters getAllCounters()
- Description copied from interface:
DAG
- Get all the counters of this DAG. This includes job-counters aggregated
together with the counters of each task. This creates a clone of the
Counters, so use this judiciously.
- Specified by:
getAllCounters in interface DAG
- Returns:
- job-counters and aggregate task-counters
incrTaskCounters
public static org.apache.tez.common.counters.TezCounters incrTaskCounters(org.apache.tez.common.counters.TezCounters counters,
Collection<Vertex> vertices)
getDiagnostics
public List<String> getDiagnostics()
- Specified by:
getDiagnostics in interface DAG
getReport
public DAGReport getReport()
- Specified by:
getReport in interface DAG
getProgress
public float getProgress()
- Specified by:
getProgress in interface DAG
getVertices
public Map<org.apache.tez.dag.records.TezVertexID,Vertex> getVertices()
- Specified by:
getVertices in interface DAG
getState
public DAGState getState()
- Specified by:
getState in interface DAG
getDAGStatus
public DAGStatusBuilder getDAGStatus(Set<org.apache.tez.dag.api.client.StatusGetOpts> statusOptions)
- Specified by:
getDAGStatus in interface DAG
getVertexStatus
public VertexStatusBuilder getVertexStatus(String vertexName,
Set<org.apache.tez.dag.api.client.StatusGetOpts> statusOptions)
- Specified by:
getVertexStatus in interface DAG
initializeVerticesAndStart
protected void initializeVerticesAndStart()
handle
public void handle(DAGEvent event)
- Specified by:
handle in interface org.apache.hadoop.yarn.event.EventHandler<DAGEvent>
getInternalState
@InterfaceAudience.Private
public DAGState getInternalState()
getUserName
public String getUserName()
- Specified by:
getUserName in interface DAG
getName
public String getName()
- Specified by:
getName in interface DAG
getTotalVertices
public int getTotalVertices()
- Specified by:
getTotalVertices in interface DAG
getSuccessfulVertices
public int getSuccessfulVertices()
- Specified by:
getSuccessfulVertices in interface DAG
getJobACLs
public Map<org.apache.hadoop.yarn.api.records.ApplicationAccessType,String> getJobACLs()
- Specified by:
getJobACLs in interface DAG
- Returns:
- the ACLs for this job for each type of JobACL given.
initializeDAG
public DAGState initializeDAG()
getVertex
public Vertex getVertex(String vertexName)
- Description copied from interface:
DAG
- Get Vertex by vertex name
- Specified by:
getVertex in interface DAG
constructFinalFullcounters
@InterfaceAudience.Private
public void constructFinalFullcounters()
isComplete
public boolean isComplete()
- Specified by:
isComplete in interface DAG
Copyright © 2014 Apache Software Foundation. All rights reserved.