public class TaskReporter extends Object implements TaskReporterInterface
| Constructor and Description |
|---|
TaskReporter(TezTaskUmbilicalProtocol umbilical,
long amPollInterval,
long sendCounterInterval,
int maxEventsToGet,
AtomicLong requestCounter,
String containerIdStr) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEvents(TezTaskAttemptID taskAttemptID,
Collection<TezEvent> events) |
boolean |
canCommit(TezTaskAttemptID taskAttemptID) |
protected boolean |
isShuttingDown() |
void |
registerTask(RuntimeTask task,
ErrorReporter errorReporter)
Register a task to be tracked.
|
void |
shutdown() |
boolean |
taskFailed(TezTaskAttemptID taskAttemptID,
TaskFailureType taskFailureType,
Throwable t,
String diagnostics,
EventMetaData srcMeta) |
boolean |
taskKilled(TezTaskAttemptID taskAttemptID,
Throwable t,
String diagnostics,
EventMetaData srcMeta) |
boolean |
taskSucceeded(TezTaskAttemptID taskAttemptID) |
void |
unregisterTask(TezTaskAttemptID taskAttemptID)
This method should always be invoked before setting up heartbeats for another task running in
the same container.
|
public TaskReporter(TezTaskUmbilicalProtocol umbilical, long amPollInterval, long sendCounterInterval, int maxEventsToGet, AtomicLong requestCounter, String containerIdStr)
public void registerTask(RuntimeTask task, ErrorReporter errorReporter)
registerTask in interface TaskReporterInterfacepublic void unregisterTask(TezTaskAttemptID taskAttemptID)
unregisterTask in interface TaskReporterInterfacepublic void shutdown()
shutdown in interface TaskReporterInterfaceprotected boolean isShuttingDown()
public boolean taskSucceeded(TezTaskAttemptID taskAttemptID) throws IOException, TezException
taskSucceeded in interface TaskReporterInterfaceIOExceptionTezExceptionpublic boolean taskFailed(TezTaskAttemptID taskAttemptID, TaskFailureType taskFailureType, Throwable t, String diagnostics, EventMetaData srcMeta) throws IOException, TezException
taskFailed in interface TaskReporterInterfaceIOExceptionTezExceptionpublic boolean taskKilled(TezTaskAttemptID taskAttemptID, Throwable t, String diagnostics, EventMetaData srcMeta) throws IOException, TezException
taskKilled in interface TaskReporterInterfaceIOExceptionTezExceptionpublic void addEvents(TezTaskAttemptID taskAttemptID, Collection<TezEvent> events)
addEvents in interface TaskReporterInterfacepublic boolean canCommit(TezTaskAttemptID taskAttemptID) throws IOException
canCommit in interface TaskReporterInterfaceIOExceptionCopyright © 2022 Apache Software Foundation. All rights reserved.