|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.service.AbstractService
org.apache.hadoop.yarn.client.api.async.AMRMClientAsync<T>
org.apache.hadoop.yarn.client.api.async.impl.AMRMClientAsyncImpl<T>
@InterfaceAudience.Private @InterfaceStability.Unstable public class AMRMClientAsyncImpl<T extends AMRMClient.ContainerRequest>
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.hadoop.yarn.client.api.async.AMRMClientAsync |
---|
AMRMClientAsync.CallbackHandler |
Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service |
---|
org.apache.hadoop.service.Service.STATE |
Field Summary |
---|
Fields inherited from class org.apache.hadoop.yarn.client.api.async.AMRMClientAsync |
---|
client, handler, heartbeatIntervalMs |
Constructor Summary | |
---|---|
AMRMClientAsyncImpl(AMRMClient<T> client,
int intervalMs,
AMRMClientAsync.CallbackHandler callbackHandler)
|
|
AMRMClientAsyncImpl(int intervalMs,
AMRMClientAsync.CallbackHandler callbackHandler)
|
Method Summary | |
---|---|
void |
addContainerRequest(T req)
Request containers for resources before calling allocate |
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. |
List<? extends Collection<T>> |
getMatchingRequests(org.apache.hadoop.yarn.api.records.Priority priority,
String resourceName,
org.apache.hadoop.yarn.api.records.Resource capability)
|
org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse |
registerApplicationMaster(String appHostName,
int appHostPort,
String appTrackingUrl)
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. |
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 |
setHeartbeatInterval(int interval)
|
void |
unregisterApplicationMaster(org.apache.hadoop.yarn.api.records.FinalApplicationStatus appStatus,
String appMessage,
String appTrackingUrl)
Unregister the application master. |
Methods inherited from class org.apache.hadoop.yarn.client.api.async.AMRMClientAsync |
---|
createAMRMClientAsync, createAMRMClientAsync |
Methods 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AMRMClientAsyncImpl(int intervalMs, AMRMClientAsync.CallbackHandler callbackHandler)
@InterfaceAudience.Private public AMRMClientAsyncImpl(AMRMClient<T> client, int intervalMs, AMRMClientAsync.CallbackHandler callbackHandler)
Method Detail |
---|
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 setHeartbeatInterval(int interval)
setHeartbeatInterval
in class AMRMClientAsync<T extends AMRMClient.ContainerRequest>
public List<? extends Collection<T>> getMatchingRequests(org.apache.hadoop.yarn.api.records.Priority priority, String resourceName, org.apache.hadoop.yarn.api.records.Resource capability)
getMatchingRequests
in class AMRMClientAsync<T extends AMRMClient.ContainerRequest>
public org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse registerApplicationMaster(String appHostName, int appHostPort, String appTrackingUrl) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
registerApplicationMaster
in class AMRMClientAsync<T extends AMRMClient.ContainerRequest>
org.apache.hadoop.yarn.exceptions.YarnException
IOException
public void unregisterApplicationMaster(org.apache.hadoop.yarn.api.records.FinalApplicationStatus appStatus, String appMessage, String appTrackingUrl) throws org.apache.hadoop.yarn.exceptions.YarnException, 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 info
org.apache.hadoop.yarn.exceptions.YarnException
IOException
public void addContainerRequest(T req)
allocate
addContainerRequest
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 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>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |