public class TaskAttemptListenerImpl extends org.apache.hadoop.service.CompositeService implements org.apache.hadoop.mapred.TaskUmbilicalProtocol, TaskAttemptListener
| Modifier and Type | Field and Description |
|---|---|
protected TaskHeartbeatHandler |
taskHeartbeatHandler |
| Constructor and Description |
|---|
TaskAttemptListenerImpl(AppContext context,
org.apache.hadoop.mapreduce.security.token.JobTokenSecretManager jobTokenSecretManager,
RMHeartbeatHandler rmHeartbeatHandler,
AMPreemptionPolicy preemptionPolicy) |
TaskAttemptListenerImpl(AppContext context,
org.apache.hadoop.mapreduce.security.token.JobTokenSecretManager jobTokenSecretManager,
RMHeartbeatHandler rmHeartbeatHandler,
AMPreemptionPolicy preemptionPolicy,
byte[] secretShuffleKey) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCommit(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID)
Child checking whether it can commit.
|
void |
commitPending(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID,
org.apache.hadoop.mapred.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(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID) |
void |
fatalError(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID,
String msg,
boolean fastFail) |
void |
fsError(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID,
String message) |
InetSocketAddress |
getAddress() |
org.apache.hadoop.mapreduce.checkpoint.TaskCheckpointID |
getCheckpointID(org.apache.hadoop.mapred.TaskID taskId) |
org.apache.hadoop.mapred.MapTaskCompletionEventsUpdate |
getMapCompletionEvents(org.apache.hadoop.mapred.JobID jobIdentifier,
int startIndex,
int maxEvents,
org.apache.hadoop.mapred.TaskAttemptID taskAttemptID) |
org.apache.hadoop.ipc.ProtocolSignature |
getProtocolSignature(String protocol,
long clientVersion,
int clientMethodsHash) |
long |
getProtocolVersion(String arg0,
long arg1) |
org.apache.hadoop.mapred.JvmTask |
getTask(org.apache.hadoop.mapred.JvmContext context) |
void |
preempted(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID,
org.apache.hadoop.mapred.TaskStatus taskStatus) |
protected void |
registerHeartbeatHandler(org.apache.hadoop.conf.Configuration conf) |
void |
registerLaunchedTask(org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptID,
WrappedJvmID jvmId)
Register task attempt.
|
void |
registerPendingTask(org.apache.hadoop.mapred.Task task,
WrappedJvmID jvmID)
Register a JVM with the listener.
|
void |
reportDiagnosticInfo(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID,
String diagnosticInfo) |
void |
reportNextRecordRange(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID,
org.apache.hadoop.mapred.SortedRanges.Range range) |
protected void |
serviceInit(org.apache.hadoop.conf.Configuration conf) |
protected void |
serviceStart() |
protected void |
serviceStop() |
void |
setCheckpointID(org.apache.hadoop.mapred.TaskID taskId,
org.apache.hadoop.mapreduce.checkpoint.TaskCheckpointID cid) |
void |
shuffleError(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID,
String message) |
protected void |
startRpcServer() |
org.apache.hadoop.mapred.AMFeedback |
statusUpdate(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID,
org.apache.hadoop.mapred.TaskStatus taskStatus) |
protected void |
stopRpcServer() |
void |
unregister(org.apache.hadoop.mapreduce.v2.api.records.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, AMPreemptionPolicy preemptionPolicy)
public TaskAttemptListenerImpl(AppContext context, org.apache.hadoop.mapreduce.security.token.JobTokenSecretManager jobTokenSecretManager, RMHeartbeatHandler rmHeartbeatHandler, AMPreemptionPolicy preemptionPolicy, byte[] secretShuffleKey)
protected void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws Exception
serviceInit in class org.apache.hadoop.service.CompositeServiceExceptionprotected void serviceStart()
throws Exception
serviceStart in class org.apache.hadoop.service.CompositeServiceExceptionprotected void registerHeartbeatHandler(org.apache.hadoop.conf.Configuration conf)
protected void startRpcServer()
protected void serviceStop()
throws Exception
serviceStop in class org.apache.hadoop.service.CompositeServiceExceptionprotected void stopRpcServer()
public InetSocketAddress getAddress()
getAddress in interface TaskAttemptListenerpublic boolean canCommit(org.apache.hadoop.mapred.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 org.apache.hadoop.mapred.TaskUmbilicalProtocolIOExceptionpublic void commitPending(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID,
org.apache.hadoop.mapred.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 org.apache.hadoop.mapred.TaskUmbilicalProtocolIOExceptionInterruptedExceptionpublic void preempted(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID,
org.apache.hadoop.mapred.TaskStatus taskStatus)
throws IOException,
InterruptedException
preempted in interface org.apache.hadoop.mapred.TaskUmbilicalProtocolIOExceptionInterruptedExceptionpublic void done(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID)
throws IOException
done in interface org.apache.hadoop.mapred.TaskUmbilicalProtocolIOExceptionpublic void fatalError(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID,
String msg,
boolean fastFail)
throws IOException
fatalError in interface org.apache.hadoop.mapred.TaskUmbilicalProtocolIOExceptionpublic void fsError(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID,
String message)
throws IOException
fsError in interface org.apache.hadoop.mapred.TaskUmbilicalProtocolIOExceptionpublic void shuffleError(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID,
String message)
throws IOException
shuffleError in interface org.apache.hadoop.mapred.TaskUmbilicalProtocolIOExceptionpublic org.apache.hadoop.mapred.MapTaskCompletionEventsUpdate getMapCompletionEvents(org.apache.hadoop.mapred.JobID jobIdentifier,
int startIndex,
int maxEvents,
org.apache.hadoop.mapred.TaskAttemptID taskAttemptID)
throws IOException
getMapCompletionEvents in interface org.apache.hadoop.mapred.TaskUmbilicalProtocolIOExceptionpublic void reportDiagnosticInfo(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID,
String diagnosticInfo)
throws IOException
reportDiagnosticInfo in interface org.apache.hadoop.mapred.TaskUmbilicalProtocolIOExceptionpublic org.apache.hadoop.mapred.AMFeedback statusUpdate(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID,
org.apache.hadoop.mapred.TaskStatus taskStatus)
throws IOException,
InterruptedException
statusUpdate in interface org.apache.hadoop.mapred.TaskUmbilicalProtocolIOExceptionInterruptedExceptionpublic long getProtocolVersion(String arg0, long arg1) throws IOException
getProtocolVersion in interface org.apache.hadoop.ipc.VersionedProtocolIOExceptionpublic void reportNextRecordRange(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID,
org.apache.hadoop.mapred.SortedRanges.Range range)
throws IOException
reportNextRecordRange in interface org.apache.hadoop.mapred.TaskUmbilicalProtocolIOExceptionpublic org.apache.hadoop.mapred.JvmTask getTask(org.apache.hadoop.mapred.JvmContext context)
throws IOException
getTask in interface org.apache.hadoop.mapred.TaskUmbilicalProtocolIOExceptionpublic void registerPendingTask(org.apache.hadoop.mapred.Task task,
WrappedJvmID jvmID)
TaskAttemptListenerregisterPendingTask in interface TaskAttemptListenertask - the task itself for this JVM.jvmID - The ID of the JVM .public void registerLaunchedTask(org.apache.hadoop.mapreduce.v2.api.records.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(org.apache.hadoop.mapreduce.v2.api.records.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.VersionedProtocolIOExceptionpublic org.apache.hadoop.mapreduce.checkpoint.TaskCheckpointID getCheckpointID(org.apache.hadoop.mapred.TaskID taskId)
getCheckpointID in interface org.apache.hadoop.mapred.TaskUmbilicalProtocolpublic void setCheckpointID(org.apache.hadoop.mapred.TaskID taskId,
org.apache.hadoop.mapreduce.checkpoint.TaskCheckpointID cid)
setCheckpointID in interface org.apache.hadoop.mapred.TaskUmbilicalProtocolCopyright © 2008–2022 Apache Software Foundation. All rights reserved.