@InterfaceAudience.Private @InterfaceStability.Unstable public class NMClientAsyncImpl extends NMClientAsync
Modifier and Type | Class and Description |
---|---|
protected static class |
NMClientAsyncImpl.ContainerEvent |
protected class |
NMClientAsyncImpl.ContainerEventProcessor |
protected static class |
NMClientAsyncImpl.ContainerEventType
The type of the event of interacting with a container
|
protected static class |
NMClientAsyncImpl.ContainerState |
protected static class |
NMClientAsyncImpl.ReInitializeContainerEvevnt |
protected static class |
NMClientAsyncImpl.StartContainerEvent |
protected static class |
NMClientAsyncImpl.StatefulContainer |
protected static class |
NMClientAsyncImpl.UpdateContainerResourceEvent |
NMClientAsync.AbstractCallbackHandler, NMClientAsync.CallbackHandler
Modifier and Type | Field and Description |
---|---|
protected ConcurrentMap<org.apache.hadoop.yarn.api.records.ContainerId,NMClientAsyncImpl.StatefulContainer> |
containers |
protected Thread |
eventDispatcherThread |
protected BlockingQueue<NMClientAsyncImpl.ContainerEvent> |
events |
protected static int |
INITIAL_THREAD_POOL_SIZE |
protected int |
maxThreadPoolSize |
protected AtomicBoolean |
stopped |
protected ThreadPoolExecutor |
threadPool |
callbackHandler, client
Modifier | Constructor and Description |
---|---|
|
NMClientAsyncImpl(NMClientAsync.AbstractCallbackHandler callbackHandler) |
|
NMClientAsyncImpl(NMClientAsync.CallbackHandler callbackHandler)
Deprecated.
|
|
NMClientAsyncImpl(String name,
NMClientAsync.AbstractCallbackHandler callbackHandler) |
|
NMClientAsyncImpl(String name,
NMClientAsync.CallbackHandler callbackHandler)
Deprecated.
|
protected |
NMClientAsyncImpl(String name,
NMClient client,
NMClientAsync.AbstractCallbackHandler callbackHandler) |
protected |
NMClientAsyncImpl(String name,
NMClient client,
NMClientAsync.CallbackHandler callbackHandler)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
commitLastReInitializationAsync(org.apache.hadoop.yarn.api.records.ContainerId containerId)
Commit last reInitialization of the specified container.
|
protected NMClientAsyncImpl.ContainerEventProcessor |
getContainerEventProcessor(NMClientAsyncImpl.ContainerEvent event) |
void |
getContainerStatusAsync(org.apache.hadoop.yarn.api.records.ContainerId containerId,
org.apache.hadoop.yarn.api.records.NodeId nodeId) |
void |
increaseContainerResourceAsync(org.apache.hadoop.yarn.api.records.Container container)
Deprecated.
|
protected boolean |
isCompletelyDone(NMClientAsyncImpl.StatefulContainer container) |
void |
reInitializeContainerAsync(org.apache.hadoop.yarn.api.records.ContainerId containerId,
org.apache.hadoop.yarn.api.records.ContainerLaunchContext containerLaunchContex,
boolean autoCommit)
Re-Initialize the Container.
|
void |
restartContainerAsync(org.apache.hadoop.yarn.api.records.ContainerId containerId)
Restart the specified container.
|
void |
rollbackLastReInitializationAsync(org.apache.hadoop.yarn.api.records.ContainerId containerId)
Rollback last reInitialization of the specified container.
|
protected void |
serviceInit(org.apache.hadoop.conf.Configuration conf) |
protected void |
serviceStart() |
protected void |
serviceStop() |
void |
startContainerAsync(org.apache.hadoop.yarn.api.records.Container container,
org.apache.hadoop.yarn.api.records.ContainerLaunchContext containerLaunchContext) |
void |
stopContainerAsync(org.apache.hadoop.yarn.api.records.ContainerId containerId,
org.apache.hadoop.yarn.api.records.NodeId nodeId) |
void |
updateContainerResourceAsync(org.apache.hadoop.yarn.api.records.Container container)
Update the resources of a container.
|
createNMClientAsync, createNMClientAsync, getCallbackHandler, getClient, setCallbackHandler, setClient
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
protected static final int INITIAL_THREAD_POOL_SIZE
protected ThreadPoolExecutor threadPool
protected int maxThreadPoolSize
protected Thread eventDispatcherThread
protected AtomicBoolean stopped
protected BlockingQueue<NMClientAsyncImpl.ContainerEvent> events
protected ConcurrentMap<org.apache.hadoop.yarn.api.records.ContainerId,NMClientAsyncImpl.StatefulContainer> containers
public NMClientAsyncImpl(NMClientAsync.AbstractCallbackHandler callbackHandler)
public NMClientAsyncImpl(String name, NMClientAsync.AbstractCallbackHandler callbackHandler)
@InterfaceAudience.Private protected NMClientAsyncImpl(String name, NMClient client, NMClientAsync.AbstractCallbackHandler callbackHandler)
@Deprecated public NMClientAsyncImpl(NMClientAsync.CallbackHandler callbackHandler)
NMClientAsyncImpl(NMClientAsync.AbstractCallbackHandler)
instead.@Deprecated public NMClientAsyncImpl(String name, NMClientAsync.CallbackHandler callbackHandler)
NMClientAsyncImpl(String,
NMClientAsync.AbstractCallbackHandler)
instead.@InterfaceAudience.Private @Deprecated protected NMClientAsyncImpl(String name, NMClient client, NMClientAsync.CallbackHandler callbackHandler)
protected void serviceInit(org.apache.hadoop.conf.Configuration conf) throws Exception
serviceInit
in class org.apache.hadoop.service.AbstractService
Exception
protected void serviceStart() throws Exception
serviceStart
in class org.apache.hadoop.service.AbstractService
Exception
protected void serviceStop() throws Exception
serviceStop
in class org.apache.hadoop.service.AbstractService
Exception
public void startContainerAsync(org.apache.hadoop.yarn.api.records.Container container, org.apache.hadoop.yarn.api.records.ContainerLaunchContext containerLaunchContext)
startContainerAsync
in class NMClientAsync
@Deprecated public void increaseContainerResourceAsync(org.apache.hadoop.yarn.api.records.Container container)
increaseContainerResourceAsync
in class NMClientAsync
public void updateContainerResourceAsync(org.apache.hadoop.yarn.api.records.Container container)
NMClientAsync
Update the resources of a container.
The ApplicationMaster
or other applications that use the
client must provide the details of the container, including the Id and
the target resource encapsulated in the updated container token via
Container
.
updateContainerResourceAsync
in class NMClientAsync
container
- the container with updated token.public void reInitializeContainerAsync(org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.records.ContainerLaunchContext containerLaunchContex, boolean autoCommit)
NMClientAsync
Re-Initialize the Container.
reInitializeContainerAsync
in class NMClientAsync
containerId
- the Id of the container to Re-Initialize.containerLaunchContex
- the updated ContainerLaunchContext.autoCommit
- commit re-initialization automatically ?public void restartContainerAsync(org.apache.hadoop.yarn.api.records.ContainerId containerId)
NMClientAsync
Restart the specified container.
restartContainerAsync
in class NMClientAsync
containerId
- the Id of the container to restart.public void rollbackLastReInitializationAsync(org.apache.hadoop.yarn.api.records.ContainerId containerId)
NMClientAsync
Rollback last reInitialization of the specified container.
rollbackLastReInitializationAsync
in class NMClientAsync
containerId
- the Id of the container to restart.public void commitLastReInitializationAsync(org.apache.hadoop.yarn.api.records.ContainerId containerId)
NMClientAsync
Commit last reInitialization of the specified container.
commitLastReInitializationAsync
in class NMClientAsync
containerId
- the Id of the container to commit reInitialize.public void stopContainerAsync(org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.records.NodeId nodeId)
stopContainerAsync
in class NMClientAsync
public void getContainerStatusAsync(org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.records.NodeId nodeId)
getContainerStatusAsync
in class NMClientAsync
protected boolean isCompletelyDone(NMClientAsyncImpl.StatefulContainer container)
protected NMClientAsyncImpl.ContainerEventProcessor getContainerEventProcessor(NMClientAsyncImpl.ContainerEvent event)
Copyright © 2008–2022 Apache Software Foundation. All rights reserved.