Package org.apache.drill.yarn.appMaster
Class Task
java.lang.Object
org.apache.drill.yarn.appMaster.Task
AM-side state of individual containers. This class is mostly
a holder of state. Behavior is provided by the
TaskState
subclasses.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
Tracking plugin state. -
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
True if the application has requested that the resource request or application run be cancelled.org.apache.hadoop.yarn.api.records.ContainerStatus
long
org.apache.hadoop.yarn.api.records.Container
The YARN container assigned to this task.org.apache.hadoop.yarn.client.api.AMRMClient.ContainerRequest
Tracks the container request between request and allocation.Disposition of a completed task: whether it was cancelled, succeeded or failed.long
static final long
Maximum amount of time to wait when canceling a job in the REQUESTING state.final Scheduler
protected TaskState
Life-cycle state of this task.long
The scheduler group that manages this task.final int
Internal identifier for the task.Identifies the type of container needed and the details of the task to run.protected Task.TrackingState
Tracking state for an additional task tracker (such as using ZooKeeper to track Drill-bits.)int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
copy()
org.apache.hadoop.yarn.api.records.Container
org.apache.hadoop.yarn.api.records.ContainerId
getGroup()
int
getId()
getLabel()
Label for this task displayed in log messages.getName()
getState()
int
boolean
boolean
isFailed()
boolean
isLive()
void
reset()
Reset the task state in preparation for a retry.void
boolean
void
setGroup
(SchedulerStateImpl taskGroup) void
setTrackingState
(Task.TrackingState tState) toString()
long
uptime()
-
Field Details
-
MAX_CANCELLATION_TIME
public static final long MAX_CANCELLATION_TIMEMaximum amount of time to wait when canceling a job in the REQUESTING state. YARN will happily wait forever for a resource, this setting allows the user to request to cancel a task, give YARN a while to respond, then forcibly cancel the job at timeout.- See Also:
-
taskId
public final int taskIdInternal identifier for the task. -
scheduler
-
taskSpec
Identifies the type of container needed and the details of the task to run. -
taskGroup
The scheduler group that manages this task. -
trackingState
Tracking state for an additional task tracker (such as using ZooKeeper to track Drill-bits.) -
containerRequest
public org.apache.hadoop.yarn.client.api.AMRMClient.ContainerRequest containerRequestTracks the container request between request and allocation. We must pass the container request back to YARN to remove it once it is allocated. -
container
public org.apache.hadoop.yarn.api.records.Container containerThe YARN container assigned to this task. The container is set only during the ALLOCATED, LAUNCHING, RUNNING and ENDING states. -
state
Life-cycle state of this task. -
cancelled
protected boolean cancelledTrue if the application has requested that the resource request or application run be cancelled. Cancelled tasks are not subject to retry. -
disposition
Disposition of a completed task: whether it was cancelled, succeeded or failed. -
error
-
tryCount
public int tryCount -
completionStatus
public org.apache.hadoop.yarn.api.records.ContainerStatus completionStatus -
launchTime
public long launchTime -
stateStartTime
public long stateStartTime -
completionTime
public long completionTime -
properties
-
-
Constructor Details
-
Task
-
-
Method Details
-
resetTrackingState
public void resetTrackingState() -
getId
public int getId() -
getContainerSpec
-
getLaunchSpec
-
getState
-
getContainerId
public org.apache.hadoop.yarn.api.records.ContainerId getContainerId() -
getContainer
public org.apache.hadoop.yarn.api.records.Container getContainer() -
getTryCount
public int getTryCount() -
isFailed
public boolean isFailed() -
getDisposition
-
getGroup
-
setGroup
-
retryable
public boolean retryable() -
isCancelled
public boolean isCancelled() -
reset
public void reset()Reset the task state in preparation for a retry. Note: state reset is done by the state class. -
uptime
public long uptime() -
getHostName
-
getTrackingState
-
toString
-
isLive
public boolean isLive() -
cancel
public void cancel() -
copy
-
getName
-
getLabel
Label for this task displayed in log messages.- Returns:
-
setTrackingState
-