Class NMClientAsyncImpl
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.yarn.client.api.async.NMClientAsync
org.apache.hadoop.yarn.client.api.async.impl.NMClientAsyncImpl
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.service.Service
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected classprotected static enumThe type of the event of interacting with a containerprotected static enumprotected static classprotected static classprotected static classprotected static classNested classes/interfaces inherited from class org.apache.hadoop.yarn.client.api.async.NMClientAsync
NMClientAsync.AbstractCallbackHandler, NMClientAsync.CallbackHandlerNested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ConcurrentMap<org.apache.hadoop.yarn.api.records.ContainerId,NMClientAsyncImpl.StatefulContainer> protected org.apache.hadoop.util.concurrent.SubjectInheritingThreadprotected BlockingQueue<NMClientAsyncImpl.ContainerEvent>protected static final intprotected intprotected AtomicBooleanprotected ThreadPoolExecutorFields inherited from class org.apache.hadoop.yarn.client.api.async.NMClientAsync
callbackHandler, client -
Constructor Summary
ConstructorsModifierConstructorDescriptionNMClientAsyncImpl(String name, NMClientAsync.AbstractCallbackHandler callbackHandler) NMClientAsyncImpl(String name, NMClientAsync.CallbackHandler callbackHandler) Deprecated.protectedNMClientAsyncImpl(String name, NMClient client, NMClientAsync.AbstractCallbackHandler callbackHandler) protectedNMClientAsyncImpl(String name, NMClient client, NMClientAsync.CallbackHandler callbackHandler) Deprecated.NMClientAsyncImpl(NMClientAsync.AbstractCallbackHandler callbackHandler) NMClientAsyncImpl(NMClientAsync.CallbackHandler callbackHandler) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidcommitLastReInitializationAsync(org.apache.hadoop.yarn.api.records.ContainerId containerId) Commit last reInitialization of the specified container.voidgetContainerStatusAsync(org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.records.NodeId nodeId) voidincreaseContainerResourceAsync(org.apache.hadoop.yarn.api.records.Container container) Deprecated.protected booleanvoidreInitializeContainerAsync(org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.records.ContainerLaunchContext containerLaunchContex, boolean autoCommit) Re-Initialize the Container.voidrestartContainerAsync(org.apache.hadoop.yarn.api.records.ContainerId containerId) Restart the specified container.voidrollbackLastReInitializationAsync(org.apache.hadoop.yarn.api.records.ContainerId containerId) Rollback last reInitialization of the specified container.protected voidserviceInit(org.apache.hadoop.conf.Configuration conf) protected voidprotected voidvoidstartContainerAsync(org.apache.hadoop.yarn.api.records.Container container, org.apache.hadoop.yarn.api.records.ContainerLaunchContext containerLaunchContext) voidstopContainerAsync(org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.records.NodeId nodeId) voidupdateContainerResourceAsync(org.apache.hadoop.yarn.api.records.Container container) Update the resources of a container.Methods inherited from class org.apache.hadoop.yarn.client.api.async.NMClientAsync
createNMClientAsync, createNMClientAsync, getCallbackHandler, getClient, setCallbackHandler, setClientMethods inherited from class org.apache.hadoop.service.AbstractService
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
-
Field Details
-
INITIAL_THREAD_POOL_SIZE
protected static final int INITIAL_THREAD_POOL_SIZE- See Also:
-
threadPool
-
maxThreadPoolSize
protected int maxThreadPoolSize -
eventDispatcherThread
protected org.apache.hadoop.util.concurrent.SubjectInheritingThread eventDispatcherThread -
stopped
-
events
-
containers
protected ConcurrentMap<org.apache.hadoop.yarn.api.records.ContainerId,NMClientAsyncImpl.StatefulContainer> containers
-
-
Constructor Details
-
NMClientAsyncImpl
-
NMClientAsyncImpl
-
NMClientAsyncImpl
@Private @VisibleForTesting protected NMClientAsyncImpl(String name, NMClient client, NMClientAsync.AbstractCallbackHandler callbackHandler) -
NMClientAsyncImpl
Deprecated. -
NMClientAsyncImpl
Deprecated. -
NMClientAsyncImpl
@Private @VisibleForTesting @Deprecated protected NMClientAsyncImpl(String name, NMClient client, NMClientAsync.CallbackHandler callbackHandler) Deprecated.
-
-
Method Details
-
serviceInit
- Overrides:
serviceInitin classorg.apache.hadoop.service.AbstractService- Throws:
Exception
-
serviceStart
- Overrides:
serviceStartin classorg.apache.hadoop.service.AbstractService- Throws:
Exception
-
serviceStop
- Overrides:
serviceStopin classorg.apache.hadoop.service.AbstractService- Throws:
Exception
-
startContainerAsync
public void startContainerAsync(org.apache.hadoop.yarn.api.records.Container container, org.apache.hadoop.yarn.api.records.ContainerLaunchContext containerLaunchContext) - Specified by:
startContainerAsyncin classNMClientAsync
-
increaseContainerResourceAsync
@Deprecated public void increaseContainerResourceAsync(org.apache.hadoop.yarn.api.records.Container container) Deprecated.- Specified by:
increaseContainerResourceAsyncin classNMClientAsync
-
updateContainerResourceAsync
public void updateContainerResourceAsync(org.apache.hadoop.yarn.api.records.Container container) Description copied from class:NMClientAsyncUpdate the resources of a container.
The
ApplicationMasteror 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 viaContainer.- Specified by:
updateContainerResourceAsyncin classNMClientAsync- Parameters:
container- the container with updated token.
-
reInitializeContainerAsync
public void reInitializeContainerAsync(org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.records.ContainerLaunchContext containerLaunchContex, boolean autoCommit) Description copied from class:NMClientAsyncRe-Initialize the Container.
- Specified by:
reInitializeContainerAsyncin classNMClientAsync- Parameters:
containerId- the Id of the container to Re-Initialize.containerLaunchContex- the updated ContainerLaunchContext.autoCommit- commit re-initialization automatically ?
-
restartContainerAsync
public void restartContainerAsync(org.apache.hadoop.yarn.api.records.ContainerId containerId) Description copied from class:NMClientAsyncRestart the specified container.
- Specified by:
restartContainerAsyncin classNMClientAsync- Parameters:
containerId- the Id of the container to restart.
-
rollbackLastReInitializationAsync
public void rollbackLastReInitializationAsync(org.apache.hadoop.yarn.api.records.ContainerId containerId) Description copied from class:NMClientAsyncRollback last reInitialization of the specified container.
- Specified by:
rollbackLastReInitializationAsyncin classNMClientAsync- Parameters:
containerId- the Id of the container to restart.
-
commitLastReInitializationAsync
public void commitLastReInitializationAsync(org.apache.hadoop.yarn.api.records.ContainerId containerId) Description copied from class:NMClientAsyncCommit last reInitialization of the specified container.
- Specified by:
commitLastReInitializationAsyncin classNMClientAsync- Parameters:
containerId- the Id of the container to commit reInitialize.
-
stopContainerAsync
public void stopContainerAsync(org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.records.NodeId nodeId) - Specified by:
stopContainerAsyncin classNMClientAsync
-
getContainerStatusAsync
public void getContainerStatusAsync(org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.records.NodeId nodeId) - Specified by:
getContainerStatusAsyncin classNMClientAsync
-
isCompletelyDone
-
getContainerEventProcessor
protected NMClientAsyncImpl.ContainerEventProcessor getContainerEventProcessor(NMClientAsyncImpl.ContainerEvent event)
-
NMClientAsyncImpl(String, NMClientAsync.AbstractCallbackHandler)instead.