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
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumTracking plugin state. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanTrue if the application has requested that the resource request or application run be cancelled.org.apache.hadoop.yarn.api.records.ContainerStatuslongorg.apache.hadoop.yarn.api.records.ContainerThe YARN container assigned to this task.org.apache.hadoop.yarn.client.api.AMRMClient.ContainerRequestTracks the container request between request and allocation.Disposition of a completed task: whether it was cancelled, succeeded or failed.longstatic final longMaximum amount of time to wait when canceling a job in the REQUESTING state.final Schedulerprotected TaskStateLife-cycle state of this task.longThe scheduler group that manages this task.final intInternal identifier for the task.Identifies the type of container needed and the details of the task to run.protected Task.TrackingStateTracking state for an additional task tracker (such as using ZooKeeper to track Drill-bits.)int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()copy()org.apache.hadoop.yarn.api.records.Containerorg.apache.hadoop.yarn.api.records.ContainerIdgetGroup()intgetId()getLabel()Label for this task displayed in log messages.getName()getState()intbooleanbooleanisFailed()booleanisLive()voidreset()Reset the task state in preparation for a retry.voidbooleanvoidsetGroup(SchedulerStateImpl taskGroup) voidsetTrackingState(Task.TrackingState tState) toString()longuptime()
-
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
-