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, removeService
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
protected 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.CompositeService
Exception
protected void serviceStart() throws Exception
serviceStart
in class org.apache.hadoop.service.CompositeService
Exception
protected void registerHeartbeatHandler(org.apache.hadoop.conf.Configuration conf)
protected void startRpcServer()
protected void serviceStop() throws Exception
serviceStop
in class org.apache.hadoop.service.CompositeService
Exception
protected void stopRpcServer()
public InetSocketAddress getAddress()
getAddress
in interface TaskAttemptListener
public 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.TaskUmbilicalProtocol
IOException
public 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.TaskUmbilicalProtocol
IOException
InterruptedException
public void preempted(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID, org.apache.hadoop.mapred.TaskStatus taskStatus) throws IOException, InterruptedException
preempted
in interface org.apache.hadoop.mapred.TaskUmbilicalProtocol
IOException
InterruptedException
public void done(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID) throws IOException
done
in interface org.apache.hadoop.mapred.TaskUmbilicalProtocol
IOException
public void fatalError(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID, String msg, boolean fastFail) throws IOException
fatalError
in interface org.apache.hadoop.mapred.TaskUmbilicalProtocol
IOException
public void fsError(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID, String message) throws IOException
fsError
in interface org.apache.hadoop.mapred.TaskUmbilicalProtocol
IOException
public void shuffleError(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID, String message) throws IOException
shuffleError
in interface org.apache.hadoop.mapred.TaskUmbilicalProtocol
IOException
public 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.TaskUmbilicalProtocol
IOException
public void reportDiagnosticInfo(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID, String diagnosticInfo) throws IOException
reportDiagnosticInfo
in interface org.apache.hadoop.mapred.TaskUmbilicalProtocol
IOException
public 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.TaskUmbilicalProtocol
IOException
InterruptedException
public long getProtocolVersion(String arg0, long arg1) throws IOException
getProtocolVersion
in interface org.apache.hadoop.ipc.VersionedProtocol
IOException
public void reportNextRecordRange(org.apache.hadoop.mapred.TaskAttemptID taskAttemptID, org.apache.hadoop.mapred.SortedRanges.Range range) throws IOException
reportNextRecordRange
in interface org.apache.hadoop.mapred.TaskUmbilicalProtocol
IOException
public org.apache.hadoop.mapred.JvmTask getTask(org.apache.hadoop.mapred.JvmContext context) throws IOException
getTask
in interface org.apache.hadoop.mapred.TaskUmbilicalProtocol
IOException
public void registerPendingTask(org.apache.hadoop.mapred.Task task, WrappedJvmID jvmID)
TaskAttemptListener
registerPendingTask
in interface TaskAttemptListener
task
- 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)
TaskAttemptListener
registerLaunchedTask
in interface TaskAttemptListener
attemptID
- 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)
TaskAttemptListener
unregister
in interface TaskAttemptListener
attemptID
- 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.VersionedProtocol
IOException
public org.apache.hadoop.mapreduce.checkpoint.TaskCheckpointID getCheckpointID(org.apache.hadoop.mapred.TaskID taskId)
getCheckpointID
in interface org.apache.hadoop.mapred.TaskUmbilicalProtocol
public void setCheckpointID(org.apache.hadoop.mapred.TaskID taskId, org.apache.hadoop.mapreduce.checkpoint.TaskCheckpointID cid)
setCheckpointID
in interface org.apache.hadoop.mapred.TaskUmbilicalProtocol
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.