java.io.Closeable, java.lang.AutoCloseable, org.apache.hadoop.service.Service@Private @Unstable public class AMRMClientAsyncImpl<T extends AMRMClient.ContainerRequest> extends AMRMClientAsync<T>
AMRMClientAsync.AbstractCallbackHandler, AMRMClientAsync.CallbackHandlerclient, handler, heartbeatIntervalMs| Constructor | Description |
|---|---|
AMRMClientAsyncImpl(int intervalMs,
AMRMClientAsync.AbstractCallbackHandler callbackHandler) |
|
AMRMClientAsyncImpl(int intervalMs,
AMRMClientAsync.CallbackHandler callbackHandler) |
Deprecated.
|
AMRMClientAsyncImpl(AMRMClient<T> client,
int intervalMs,
AMRMClientAsync.AbstractCallbackHandler callbackHandler) |
|
AMRMClientAsyncImpl(AMRMClient<T> client,
int intervalMs,
AMRMClientAsync.CallbackHandler callbackHandler) |
Deprecated.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addContainerRequest(T req) |
Request containers for resources before calling
allocate |
void |
addSchedulingRequests(java.util.Collection<org.apache.hadoop.yarn.api.records.SchedulingRequest> schedulingRequests) |
Add a Collection of SchedulingRequests.
|
org.apache.hadoop.yarn.api.records.Resource |
getAvailableResources() |
Get the currently available resources in the cluster.
|
int |
getClusterNodeCount() |
Get the current number of nodes in the cluster.
|
java.util.List<? extends java.util.Collection<T>> |
getMatchingRequests(org.apache.hadoop.yarn.api.records.Priority priority,
java.lang.String resourceName,
org.apache.hadoop.yarn.api.records.Resource capability) |
|
org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse |
registerApplicationMaster(java.lang.String appHostName,
int appHostPort,
java.lang.String appTrackingUrl) |
Registers this application master with the resource manager.
|
org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse |
registerApplicationMaster(java.lang.String appHostName,
int appHostPort,
java.lang.String appTrackingUrl,
java.util.Map<java.util.Set<java.lang.String>,org.apache.hadoop.yarn.api.resource.PlacementConstraint> placementConstraintsMap) |
Registers this application master with the resource manager.
|
void |
releaseAssignedContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId) |
Release containers assigned by the Resource Manager.
|
void |
removeContainerRequest(T req) |
Remove previous container request.
|
void |
requestContainerUpdate(org.apache.hadoop.yarn.api.records.Container container,
org.apache.hadoop.yarn.api.records.UpdateContainerRequest updateContainerRequest) |
Request a container update before calling
allocate. |
protected void |
serviceInit(org.apache.hadoop.conf.Configuration conf) |
|
protected void |
serviceStart() |
|
protected void |
serviceStop() |
Tells the heartbeat and handler threads to stop and waits for them to
terminate.
|
void |
unregisterApplicationMaster(org.apache.hadoop.yarn.api.records.FinalApplicationStatus appStatus,
java.lang.String appMessage,
java.lang.String appTrackingUrl) |
Unregister the application master.
|
void |
updateBlacklist(java.util.List<java.lang.String> blacklistAdditions,
java.util.List<java.lang.String> blacklistRemovals) |
Update application's blacklist with addition or removal resources.
|
void |
updateTrackingUrl(java.lang.String trackingUrl) |
Update application's tracking url on next heartbeat.
|
createAMRMClientAsync, createAMRMClientAsync, createAMRMClientAsync, createAMRMClientAsync, getMatchingRequests, getMatchingRequests, getRegisteredTimelineV2Client, registerTimelineV2Client, requestContainerResourceChange, setHeartbeatInterval, waitFor, waitFor, waitForclose, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic AMRMClientAsyncImpl(int intervalMs,
AMRMClientAsync.AbstractCallbackHandler callbackHandler)
intervalMs - heartbeat interval in milliseconds between AM and RMcallbackHandler - callback handler that processes responses from
the ResourceManagerpublic AMRMClientAsyncImpl(AMRMClient<T> client, int intervalMs, AMRMClientAsync.AbstractCallbackHandler callbackHandler)
@Deprecated
public AMRMClientAsyncImpl(int intervalMs,
AMRMClientAsync.CallbackHandler callbackHandler)
@Private @VisibleForTesting @Deprecated public AMRMClientAsyncImpl(AMRMClient<T> client, int intervalMs, AMRMClientAsync.CallbackHandler callbackHandler)
protected void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws java.lang.Exception
serviceInit in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionprotected void serviceStart()
throws java.lang.Exception
serviceStart in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionprotected void serviceStop()
throws java.lang.Exception
serviceStop in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionpublic java.util.List<? extends java.util.Collection<T>> getMatchingRequests(org.apache.hadoop.yarn.api.records.Priority priority, java.lang.String resourceName, org.apache.hadoop.yarn.api.records.Resource capability)
getMatchingRequests in class AMRMClientAsync<T extends AMRMClient.ContainerRequest>public void addSchedulingRequests(java.util.Collection<org.apache.hadoop.yarn.api.records.SchedulingRequest> schedulingRequests)
AMRMClientAsyncaddSchedulingRequests in class AMRMClientAsync<T extends AMRMClient.ContainerRequest>schedulingRequests - Collection of Scheduling Requests.public org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse registerApplicationMaster(java.lang.String appHostName,
int appHostPort,
java.lang.String appTrackingUrl)
throws org.apache.hadoop.yarn.exceptions.YarnException,
java.io.IOException
registerApplicationMaster in class AMRMClientAsync<T extends AMRMClient.ContainerRequest>appHostName - Name of the host on which master is runningappHostPort - Port master is listening onappTrackingUrl - URL at which the master info can be seenorg.apache.hadoop.yarn.exceptions.YarnExceptionjava.io.IOExceptionpublic org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse registerApplicationMaster(java.lang.String appHostName,
int appHostPort,
java.lang.String appTrackingUrl,
java.util.Map<java.util.Set<java.lang.String>,org.apache.hadoop.yarn.api.resource.PlacementConstraint> placementConstraintsMap)
throws org.apache.hadoop.yarn.exceptions.YarnException,
java.io.IOException
registerApplicationMaster in class AMRMClientAsync<T extends AMRMClient.ContainerRequest>appHostName - Name of the host on which master is runningappHostPort - Port master is listening onappTrackingUrl - URL at which the master info can be seenplacementConstraintsMap - Placement Constraints Mapping.org.apache.hadoop.yarn.exceptions.YarnExceptionjava.io.IOExceptionpublic void unregisterApplicationMaster(org.apache.hadoop.yarn.api.records.FinalApplicationStatus appStatus,
java.lang.String appMessage,
java.lang.String appTrackingUrl)
throws org.apache.hadoop.yarn.exceptions.YarnException,
java.io.IOException
unregisterApplicationMaster in class AMRMClientAsync<T extends AMRMClient.ContainerRequest>appStatus - Success/Failure status of the masterappMessage - Diagnostics message on failureappTrackingUrl - New URL to get master infoorg.apache.hadoop.yarn.exceptions.YarnExceptionjava.io.IOExceptionpublic void addContainerRequest(T req)
allocateaddContainerRequest in class AMRMClientAsync<T extends AMRMClient.ContainerRequest>req - Resource requestpublic void removeContainerRequest(T req)
removeContainerRequest in class AMRMClientAsync<T extends AMRMClient.ContainerRequest>req - Resource requestpublic void requestContainerUpdate(org.apache.hadoop.yarn.api.records.Container container,
org.apache.hadoop.yarn.api.records.UpdateContainerRequest updateContainerRequest)
AMRMClientAsyncallocate.
Any previous pending update request of the same container will be
removed.requestContainerUpdate in class AMRMClientAsync<T extends AMRMClient.ContainerRequest>container - The container returned from the last successful resource
allocation or updateupdateContainerRequest - The UpdateContainerRequest.public void releaseAssignedContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
releaseAssignedContainer in class AMRMClientAsync<T extends AMRMClient.ContainerRequest>containerId - public org.apache.hadoop.yarn.api.records.Resource getAvailableResources()
getAvailableResources in class AMRMClientAsync<T extends AMRMClient.ContainerRequest>public int getClusterNodeCount()
getClusterNodeCount in class AMRMClientAsync<T extends AMRMClient.ContainerRequest>public void updateBlacklist(java.util.List<java.lang.String> blacklistAdditions,
java.util.List<java.lang.String> blacklistRemovals)
updateBlacklist in class AMRMClientAsync<T extends AMRMClient.ContainerRequest>blacklistAdditions - list of resources which should be added to the
application blacklistblacklistRemovals - list of resources which should be removed from the
application blacklistpublic void updateTrackingUrl(java.lang.String trackingUrl)
AMRMClientAsyncupdateTrackingUrl in class AMRMClientAsync<T extends AMRMClient.ContainerRequest>trackingUrl - new tracking url for this applicationCopyright © 2008–2025 Apache Software Foundation. All rights reserved.