public class TaskAttemptListenerImpl extends CompositeService implements TaskUmbilicalProtocol, TaskAttemptListener
CompositeService.CompositeServiceShutdownHookService.STATE| Modifier and Type | Field and Description |
|---|---|
protected TaskHeartbeatHandler |
taskHeartbeatHandler |
STOP_ONLY_STARTED_SERVICESversionID| Constructor and Description |
|---|
TaskAttemptListenerImpl(AppContext context,
org.apache.hadoop.mapreduce.security.token.JobTokenSecretManager jobTokenSecretManager,
RMHeartbeatHandler rmHeartbeatHandler,
byte[] secretShuffleKey) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCommit(TaskAttemptID taskAttemptID)
Child checking whether it can commit.
|
void |
commitPending(TaskAttemptID taskAttemptID,
TaskStatus taskStatsu)
TaskAttempt is reporting that it is in commit_pending and it is waiting for
the commit Response
Commit it a two-phased protocol. |
void |
done(TaskAttemptID taskAttemptID) |
void |
fatalError(TaskAttemptID taskAttemptID,
String msg) |
void |
fsError(TaskAttemptID taskAttemptID,
String message) |
InetSocketAddress |
getAddress() |
MapTaskCompletionEventsUpdate |
getMapCompletionEvents(JobID jobIdentifier,
int startIndex,
int maxEvents,
TaskAttemptID taskAttemptID) |
org.apache.hadoop.ipc.ProtocolSignature |
getProtocolSignature(String protocol,
long clientVersion,
int clientMethodsHash) |
long |
getProtocolVersion(String arg0,
long arg1) |
JvmTask |
getTask(org.apache.hadoop.mapred.JvmContext context) |
boolean |
ping(TaskAttemptID taskAttemptID) |
protected void |
registerHeartbeatHandler(Configuration conf) |
void |
registerLaunchedTask(TaskAttemptId attemptID,
WrappedJvmID jvmId)
Register task attempt.
|
void |
registerPendingTask(Task task,
WrappedJvmID jvmID)
Register a JVM with the listener.
|
void |
reportDiagnosticInfo(TaskAttemptID taskAttemptID,
String diagnosticInfo) |
void |
reportNextRecordRange(TaskAttemptID taskAttemptID,
org.apache.hadoop.mapred.SortedRanges.Range range) |
protected void |
serviceInit(Configuration conf) |
protected void |
serviceStart() |
protected void |
serviceStop() |
void |
shuffleError(TaskAttemptID taskAttemptID,
String message) |
protected void |
startRpcServer() |
boolean |
statusUpdate(TaskAttemptID taskAttemptID,
TaskStatus taskStatus) |
protected void |
stopRpcServer() |
void |
unregister(TaskAttemptId attemptID,
WrappedJvmID jvmID)
Unregister the JVM and the attempt associated with it.
|
addIfService, addService, getServices, removeServiceclose, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStopprotected TaskHeartbeatHandler taskHeartbeatHandler
public TaskAttemptListenerImpl(AppContext context, org.apache.hadoop.mapreduce.security.token.JobTokenSecretManager jobTokenSecretManager, RMHeartbeatHandler rmHeartbeatHandler, byte[] secretShuffleKey)
protected void serviceInit(Configuration conf) throws Exception
serviceInit in class CompositeServiceExceptionprotected void serviceStart()
throws Exception
serviceStart in class CompositeServiceExceptionprotected void registerHeartbeatHandler(Configuration conf)
protected void startRpcServer()
protected void serviceStop()
throws Exception
serviceStop in class CompositeServiceExceptionprotected void stopRpcServer()
public InetSocketAddress getAddress()
getAddress in interface TaskAttemptListenerpublic boolean canCommit(TaskAttemptID taskAttemptID) throws IOException
commitPending(TaskAttemptID, TaskStatus). Then it repeatedly polls
the ApplicationMaster whether it canCommit(TaskAttemptID) This is
a legacy from the centralized commit protocol handling by the JobTracker.canCommit in interface TaskUmbilicalProtocolIOExceptionpublic void commitPending(TaskAttemptID taskAttemptID, TaskStatus taskStatsu) throws IOException, InterruptedException
commitPending(TaskAttemptID, TaskStatus). Then it repeatedly polls
the ApplicationMaster whether it canCommit(TaskAttemptID) This is
a legacy from the centralized commit protocol handling by the JobTracker.commitPending in interface TaskUmbilicalProtocolIOExceptionInterruptedExceptionpublic void done(TaskAttemptID taskAttemptID) throws IOException
done in interface TaskUmbilicalProtocolIOExceptionpublic void fatalError(TaskAttemptID taskAttemptID, String msg) throws IOException
fatalError in interface TaskUmbilicalProtocolIOExceptionpublic void fsError(TaskAttemptID taskAttemptID, String message) throws IOException
fsError in interface TaskUmbilicalProtocolIOExceptionpublic void shuffleError(TaskAttemptID taskAttemptID, String message) throws IOException
shuffleError in interface TaskUmbilicalProtocolIOExceptionpublic MapTaskCompletionEventsUpdate getMapCompletionEvents(JobID jobIdentifier, int startIndex, int maxEvents, TaskAttemptID taskAttemptID) throws IOException
getMapCompletionEvents in interface TaskUmbilicalProtocolIOExceptionpublic boolean ping(TaskAttemptID taskAttemptID) throws IOException
ping in interface TaskUmbilicalProtocolIOExceptionpublic void reportDiagnosticInfo(TaskAttemptID taskAttemptID, String diagnosticInfo) throws IOException
reportDiagnosticInfo in interface TaskUmbilicalProtocolIOExceptionpublic boolean statusUpdate(TaskAttemptID taskAttemptID, TaskStatus taskStatus) throws IOException, InterruptedException
statusUpdate in interface TaskUmbilicalProtocolIOExceptionInterruptedExceptionpublic long getProtocolVersion(String arg0, long arg1) throws IOException
getProtocolVersion in interface org.apache.hadoop.ipc.VersionedProtocolIOExceptionpublic void reportNextRecordRange(TaskAttemptID taskAttemptID, org.apache.hadoop.mapred.SortedRanges.Range range) throws IOException
reportNextRecordRange in interface TaskUmbilicalProtocolIOExceptionpublic JvmTask getTask(org.apache.hadoop.mapred.JvmContext context) throws IOException
getTask in interface TaskUmbilicalProtocolIOExceptionpublic void registerPendingTask(Task task, WrappedJvmID jvmID)
TaskAttemptListenerregisterPendingTask in interface TaskAttemptListenertask - the task itself for this JVM.jvmID - The ID of the JVM .public void registerLaunchedTask(TaskAttemptId attemptID, WrappedJvmID jvmId)
TaskAttemptListenerregisterLaunchedTask in interface TaskAttemptListenerattemptID - the id of the attempt for this JVM.jvmId - the ID of the JVM.public void unregister(TaskAttemptId attemptID, WrappedJvmID jvmID)
TaskAttemptListenerunregister in interface TaskAttemptListenerattemptID - the ID of the attempt.jvmID - the ID of the JVM for that attempt.public org.apache.hadoop.ipc.ProtocolSignature getProtocolSignature(String protocol, long clientVersion, int clientMethodsHash) throws IOException
getProtocolSignature in interface org.apache.hadoop.ipc.VersionedProtocolIOExceptionCopyright © 2018 CERN. All Rights Reserved.