public class DagAwareYarnTaskScheduler
extends org.apache.tez.serviceplugins.api.TaskScheduler
implements org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandler
| Constructor and Description |
|---|
DagAwareYarnTaskScheduler(org.apache.tez.serviceplugins.api.TaskSchedulerContext taskSchedulerContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
allocateTask(Object task,
org.apache.hadoop.yarn.api.records.Resource capability,
org.apache.hadoop.yarn.api.records.ContainerId containerId,
org.apache.hadoop.yarn.api.records.Priority priority,
Object containerSignature,
Object clientCookie) |
void |
allocateTask(Object task,
org.apache.hadoop.yarn.api.records.Resource capability,
String[] hosts,
String[] racks,
org.apache.hadoop.yarn.api.records.Priority priority,
Object containerSignature,
Object clientCookie) |
void |
blacklistNode(org.apache.hadoop.yarn.api.records.NodeId nodeId) |
protected ScheduledExecutorService |
createExecutor() |
void |
dagComplete() |
Object |
deallocateContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId) |
boolean |
deallocateTask(Object task,
boolean taskSucceeded,
org.apache.tez.serviceplugins.api.TaskAttemptEndReason endReason,
String diagnostics) |
org.apache.hadoop.yarn.api.records.Resource |
getAvailableResources() |
int |
getClusterNodeCount() |
float |
getProgress() |
org.apache.hadoop.yarn.api.records.Resource |
getTotalResources() |
boolean |
hasUnregistered() |
void |
initialize() |
void |
initiateStop() |
protected long |
now() |
void |
onContainersAllocated(List<org.apache.hadoop.yarn.api.records.Container> containers) |
void |
onContainersCompleted(List<org.apache.hadoop.yarn.api.records.ContainerStatus> statuses) |
void |
onError(Throwable e) |
void |
onNodesUpdated(List<org.apache.hadoop.yarn.api.records.NodeReport> updatedNodes) |
void |
onShutdownRequest() |
void |
setShouldUnregister() |
void |
shutdown() |
void |
start() |
void |
unblacklistNode(org.apache.hadoop.yarn.api.records.NodeId nodeId) |
public DagAwareYarnTaskScheduler(org.apache.tez.serviceplugins.api.TaskSchedulerContext taskSchedulerContext)
public void initialize()
throws Exception
initialize in interface org.apache.tez.common.ServicePluginLifecycleinitialize in class org.apache.tez.serviceplugins.api.TaskSchedulerExceptionpublic void start()
throws Exception
start in interface org.apache.tez.common.ServicePluginLifecyclestart in class org.apache.tez.serviceplugins.api.TaskSchedulerExceptionprotected ScheduledExecutorService createExecutor()
protected long now()
public void initiateStop()
initiateStop in class org.apache.tez.serviceplugins.api.TaskSchedulerpublic void shutdown()
throws Exception
shutdown in interface org.apache.tez.common.ServicePluginLifecycleshutdown in class org.apache.tez.serviceplugins.api.TaskSchedulerExceptionpublic void onContainersAllocated(List<org.apache.hadoop.yarn.api.records.Container> containers)
onContainersAllocated in interface org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandlerpublic void onContainersCompleted(List<org.apache.hadoop.yarn.api.records.ContainerStatus> statuses)
onContainersCompleted in interface org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandlerpublic void onNodesUpdated(List<org.apache.hadoop.yarn.api.records.NodeReport> updatedNodes)
onNodesUpdated in interface org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandlerpublic float getProgress()
getProgress in interface org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandlerpublic void onShutdownRequest()
onShutdownRequest in interface org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandlerpublic void onError(Throwable e)
onError in interface org.apache.hadoop.yarn.client.api.async.AMRMClientAsync.CallbackHandlerpublic org.apache.hadoop.yarn.api.records.Resource getAvailableResources()
getAvailableResources in class org.apache.tez.serviceplugins.api.TaskSchedulerpublic org.apache.hadoop.yarn.api.records.Resource getTotalResources()
getTotalResources in class org.apache.tez.serviceplugins.api.TaskSchedulerpublic int getClusterNodeCount()
getClusterNodeCount in class org.apache.tez.serviceplugins.api.TaskSchedulerpublic void blacklistNode(org.apache.hadoop.yarn.api.records.NodeId nodeId)
blacklistNode in class org.apache.tez.serviceplugins.api.TaskSchedulerpublic void unblacklistNode(org.apache.hadoop.yarn.api.records.NodeId nodeId)
unblacklistNode in class org.apache.tez.serviceplugins.api.TaskSchedulerpublic void allocateTask(Object task, org.apache.hadoop.yarn.api.records.Resource capability, String[] hosts, String[] racks, org.apache.hadoop.yarn.api.records.Priority priority, Object containerSignature, Object clientCookie)
allocateTask in class org.apache.tez.serviceplugins.api.TaskSchedulerpublic void allocateTask(Object task, org.apache.hadoop.yarn.api.records.Resource capability, org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.records.Priority priority, Object containerSignature, Object clientCookie)
allocateTask in class org.apache.tez.serviceplugins.api.TaskSchedulerpublic boolean deallocateTask(Object task, boolean taskSucceeded, org.apache.tez.serviceplugins.api.TaskAttemptEndReason endReason, String diagnostics)
deallocateTask in class org.apache.tez.serviceplugins.api.TaskSchedulerpublic Object deallocateContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
deallocateContainer in class org.apache.tez.serviceplugins.api.TaskSchedulerpublic void setShouldUnregister()
setShouldUnregister in class org.apache.tez.serviceplugins.api.TaskSchedulerpublic boolean hasUnregistered()
hasUnregistered in class org.apache.tez.serviceplugins.api.TaskSchedulerpublic void dagComplete()
dagComplete in class org.apache.tez.serviceplugins.api.TaskSchedulerCopyright © 2019 Apache Software Foundation. All rights reserved.