public class TaskSchedulerManager extends org.apache.hadoop.service.AbstractService implements org.apache.hadoop.yarn.event.EventHandler<AMSchedulerEvent>
| Modifier and Type | Field and Description |
|---|---|
protected AppContext |
appContext |
protected boolean |
isSignalled |
protected TaskSchedulerWrapper[] |
taskSchedulers |
protected ServicePluginLifecycleAbstractService[] |
taskSchedulerServiceWrappers |
| Constructor and Description |
|---|
TaskSchedulerManager(AppContext appContext,
DAGClientServer clientService,
org.apache.hadoop.yarn.event.EventHandler eventHandler,
org.apache.tez.common.ContainerSignatureMatcher containerSignatureMatcher,
WebUIService webUI,
List<org.apache.tez.dag.api.NamedEntityDescriptor> schedulerDescriptors,
boolean isLocalMode,
org.apache.tez.hadoop.shim.HadoopShim hadoopShim) |
TaskSchedulerManager(org.apache.tez.serviceplugins.api.TaskScheduler taskScheduler,
AppContext appContext,
org.apache.tez.common.ContainerSignatureMatcher containerSignatureMatcher,
DAGClientServer clientService,
ExecutorService appCallbackExecutor) |
| Modifier and Type | Method and Description |
|---|---|
void |
appShutdownRequested(int schedulerId) |
void |
containerBeingReleased(int schedulerId,
org.apache.hadoop.yarn.api.records.ContainerId containerId) |
void |
containerCompleted(int schedulerId,
Object task,
org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus) |
void |
dagCompleted() |
void |
dagSubmitted() |
Map<org.apache.hadoop.yarn.api.records.ApplicationAccessType,String> |
getApplicationAcls() |
org.apache.hadoop.yarn.api.records.Resource |
getAvailableResources(int schedulerId) |
org.apache.tez.common.ContainerSignatureMatcher |
getContainerSignatureMatcher() |
org.apache.tez.serviceplugins.api.TaskSchedulerContext.AppFinalStatus |
getFinalAppStatus() |
String |
getHistoryUrl() |
int |
getNumClusterNodes() |
float |
getProgress(int schedulerId) |
String |
getTaskSchedulerClassName(int taskSchedulerIndex) |
org.apache.hadoop.yarn.api.records.Resource |
getTotalResources(int schedulerId) |
int |
getVertexIndexForTask(Object task) |
void |
handle(AMSchedulerEvent event) |
void |
handleEvent(AMSchedulerEvent sEvent) |
boolean |
hasUnregistered() |
void |
initiateStop() |
protected void |
instantiateSchedulers(String host,
int port,
String trackingUrl,
AppContext appContext) |
void |
nodesUpdated(int schedulerId,
List<org.apache.hadoop.yarn.api.records.NodeReport> updatedNodes) |
protected void |
notifyForTest() |
void |
preemptContainer(int schedulerId,
org.apache.hadoop.yarn.api.records.ContainerId containerId) |
void |
reportError(int taskSchedulerIndex,
org.apache.tez.serviceplugins.api.ServicePluginError servicePluginError,
String diagnostics,
org.apache.tez.serviceplugins.api.DagInfo dagInfo) |
void |
serviceStart() |
void |
serviceStop() |
void |
setApplicationRegistrationData(int schedulerId,
org.apache.hadoop.yarn.api.records.Resource maxContainerCapability,
Map<org.apache.hadoop.yarn.api.records.ApplicationAccessType,String> appAcls,
ByteBuffer clientAMSecretKey,
String queueName) |
void |
setShouldUnregisterFlag() |
void |
setSignalled(boolean isSignalled) |
void |
taskAllocated(int schedulerId,
Object task,
Object appCookie,
org.apache.hadoop.yarn.api.records.Container container) |
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceInit, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStopprotected final AppContext appContext
protected volatile boolean isSignalled
protected final TaskSchedulerWrapper[] taskSchedulers
protected final ServicePluginLifecycleAbstractService[] taskSchedulerServiceWrappers
@InterfaceAudience.Private
public TaskSchedulerManager(org.apache.tez.serviceplugins.api.TaskScheduler taskScheduler,
AppContext appContext,
org.apache.tez.common.ContainerSignatureMatcher containerSignatureMatcher,
DAGClientServer clientService,
ExecutorService appCallbackExecutor)
public TaskSchedulerManager(AppContext appContext, DAGClientServer clientService, org.apache.hadoop.yarn.event.EventHandler eventHandler, org.apache.tez.common.ContainerSignatureMatcher containerSignatureMatcher, WebUIService webUI, List<org.apache.tez.dag.api.NamedEntityDescriptor> schedulerDescriptors, boolean isLocalMode, org.apache.tez.hadoop.shim.HadoopShim hadoopShim)
appContext - clientService - eventHandler - containerSignatureMatcher - webUI - schedulerDescriptors - the list of scheduler descriptors. Tez internal classes will not have the class names populated.
An empty list defaults to using the YarnTaskScheduler as the only source.isLocalMode - whether the AM is running in local modepublic Map<org.apache.hadoop.yarn.api.records.ApplicationAccessType,String> getApplicationAcls()
public void setSignalled(boolean isSignalled)
public int getNumClusterNodes()
public org.apache.hadoop.yarn.api.records.Resource getAvailableResources(int schedulerId)
public org.apache.hadoop.yarn.api.records.Resource getTotalResources(int schedulerId)
public void handleEvent(AMSchedulerEvent sEvent)
public void handle(AMSchedulerEvent event)
handle in interface org.apache.hadoop.yarn.event.EventHandler<AMSchedulerEvent>protected void instantiateSchedulers(String host, int port, String trackingUrl, AppContext appContext) throws org.apache.tez.dag.api.TezException
org.apache.tez.dag.api.TezExceptionpublic void serviceStart()
throws Exception
serviceStart in class org.apache.hadoop.service.AbstractServiceExceptionprotected void notifyForTest()
public void initiateStop()
public void serviceStop()
throws InterruptedException
serviceStop in class org.apache.hadoop.service.AbstractServiceInterruptedExceptionpublic void taskAllocated(int schedulerId,
Object task,
Object appCookie,
org.apache.hadoop.yarn.api.records.Container container)
public void containerCompleted(int schedulerId,
Object task,
org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus)
public void containerBeingReleased(int schedulerId,
org.apache.hadoop.yarn.api.records.ContainerId containerId)
public void nodesUpdated(int schedulerId,
List<org.apache.hadoop.yarn.api.records.NodeReport> updatedNodes)
public void appShutdownRequested(int schedulerId)
public void setApplicationRegistrationData(int schedulerId,
org.apache.hadoop.yarn.api.records.Resource maxContainerCapability,
Map<org.apache.hadoop.yarn.api.records.ApplicationAccessType,String> appAcls,
ByteBuffer clientAMSecretKey,
String queueName)
public org.apache.tez.serviceplugins.api.TaskSchedulerContext.AppFinalStatus getFinalAppStatus()
public float getProgress(int schedulerId)
public void reportError(int taskSchedulerIndex,
org.apache.tez.serviceplugins.api.ServicePluginError servicePluginError,
String diagnostics,
org.apache.tez.serviceplugins.api.DagInfo dagInfo)
public void dagCompleted()
public void dagSubmitted()
public int getVertexIndexForTask(Object task)
public void preemptContainer(int schedulerId,
org.apache.hadoop.yarn.api.records.ContainerId containerId)
public void setShouldUnregisterFlag()
public org.apache.tez.common.ContainerSignatureMatcher getContainerSignatureMatcher()
public boolean hasUnregistered()
public String getHistoryUrl()
public String getTaskSchedulerClassName(int taskSchedulerIndex)
Copyright © 2020 Apache Software Foundation. All rights reserved.