org.apache.tez.dag.app
Class TaskAttemptListenerImpTezDag

java.lang.Object
  extended by org.apache.hadoop.service.AbstractService
      extended by org.apache.tez.dag.app.TaskAttemptListenerImpTezDag
All Implemented Interfaces:
Closeable, org.apache.hadoop.ipc.VersionedProtocol, org.apache.hadoop.service.Service, org.apache.tez.common.TezTaskUmbilicalProtocol, TaskAttemptListener

public class TaskAttemptListenerImpTezDag
extends org.apache.hadoop.service.AbstractService
implements org.apache.tez.common.TezTaskUmbilicalProtocol, TaskAttemptListener


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE
 
Field Summary
protected  ContainerHeartbeatHandler containerHeartbeatHandler
           
protected  TaskHeartbeatHandler taskHeartbeatHandler
           
 
Fields inherited from interface org.apache.tez.common.TezTaskUmbilicalProtocol
versionID
 
Constructor Summary
TaskAttemptListenerImpTezDag(AppContext context, TaskHeartbeatHandler thh, ContainerHeartbeatHandler chh, org.apache.tez.common.security.JobTokenSecretManager jobTokenSecretManager)
           
 
Method Summary
 boolean canCommit(org.apache.tez.dag.records.TezTaskAttemptID taskAttemptId)
          Child checking whether it can commit.
 InetSocketAddress getAddress()
           
 org.apache.hadoop.ipc.ProtocolSignature getProtocolSignature(String protocol, long clientVersion, int clientMethodsHash)
           
 long getProtocolVersion(String protocol, long clientVersion)
           
 org.apache.tez.common.ContainerTask getTask(org.apache.tez.common.ContainerContext containerContext)
           
 org.apache.tez.runtime.api.impl.TezHeartbeatResponse heartbeat(org.apache.tez.runtime.api.impl.TezHeartbeatRequest request)
           
 AMContainerTask pullTaskAttemptContext(org.apache.hadoop.yarn.api.records.ContainerId containerId)
           
 void registerRunningContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
           
 void registerTaskAttempt(org.apache.tez.dag.records.TezTaskAttemptID attemptId, org.apache.hadoop.yarn.api.records.ContainerId containerId)
           
 void serviceStart()
           
 void serviceStop()
           
protected  void startRpcServer()
           
protected  void stopRpcServer()
           
 void unregisterRunningContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
           
 void unregisterTaskAttempt(org.apache.tez.dag.records.TezTaskAttemptID attemptId)
           
 
Methods inherited from class org.apache.hadoop.service.AbstractService
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceInit, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

taskHeartbeatHandler

protected final TaskHeartbeatHandler taskHeartbeatHandler

containerHeartbeatHandler

protected final ContainerHeartbeatHandler containerHeartbeatHandler
Constructor Detail

TaskAttemptListenerImpTezDag

public TaskAttemptListenerImpTezDag(AppContext context,
                                    TaskHeartbeatHandler thh,
                                    ContainerHeartbeatHandler chh,
                                    org.apache.tez.common.security.JobTokenSecretManager jobTokenSecretManager)
Method Detail

serviceStart

public void serviceStart()
Overrides:
serviceStart in class org.apache.hadoop.service.AbstractService

startRpcServer

protected void startRpcServer()

serviceStop

public void serviceStop()
Overrides:
serviceStop in class org.apache.hadoop.service.AbstractService

stopRpcServer

protected void stopRpcServer()

getAddress

public InetSocketAddress getAddress()
Specified by:
getAddress in interface TaskAttemptListener

getProtocolVersion

public long getProtocolVersion(String protocol,
                               long clientVersion)
                        throws IOException
Specified by:
getProtocolVersion in interface org.apache.hadoop.ipc.VersionedProtocol
Throws:
IOException

getProtocolSignature

public org.apache.hadoop.ipc.ProtocolSignature getProtocolSignature(String protocol,
                                                                    long clientVersion,
                                                                    int clientMethodsHash)
                                                             throws IOException
Specified by:
getProtocolSignature in interface org.apache.hadoop.ipc.VersionedProtocol
Throws:
IOException

getTask

public org.apache.tez.common.ContainerTask getTask(org.apache.tez.common.ContainerContext containerContext)
                                            throws IOException
Specified by:
getTask in interface org.apache.tez.common.TezTaskUmbilicalProtocol
Throws:
IOException

canCommit

public boolean canCommit(org.apache.tez.dag.records.TezTaskAttemptID taskAttemptId)
                  throws IOException
Child checking whether it can commit.
Repeatedly polls the ApplicationMaster whether it Task.canCommit(TezTaskAttemptID) This is * a legacy from the centralized commit protocol handling by the JobTracker.

Specified by:
canCommit in interface org.apache.tez.common.TezTaskUmbilicalProtocol
Throws:
IOException

unregisterTaskAttempt

public void unregisterTaskAttempt(org.apache.tez.dag.records.TezTaskAttemptID attemptId)
Specified by:
unregisterTaskAttempt in interface TaskAttemptListener

pullTaskAttemptContext

public AMContainerTask pullTaskAttemptContext(org.apache.hadoop.yarn.api.records.ContainerId containerId)

registerRunningContainer

public void registerRunningContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
Specified by:
registerRunningContainer in interface TaskAttemptListener

registerTaskAttempt

public void registerTaskAttempt(org.apache.tez.dag.records.TezTaskAttemptID attemptId,
                                org.apache.hadoop.yarn.api.records.ContainerId containerId)
Specified by:
registerTaskAttempt in interface TaskAttemptListener

unregisterRunningContainer

public void unregisterRunningContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
Specified by:
unregisterRunningContainer in interface TaskAttemptListener

heartbeat

public org.apache.tez.runtime.api.impl.TezHeartbeatResponse heartbeat(org.apache.tez.runtime.api.impl.TezHeartbeatRequest request)
                                                               throws IOException,
                                                                      org.apache.tez.dag.api.TezException
Specified by:
heartbeat in interface org.apache.tez.common.TezTaskUmbilicalProtocol
Throws:
IOException
org.apache.tez.dag.api.TezException


Copyright © 2014 Apache Software Foundation. All rights reserved.