|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.yarn.service.AbstractService
org.apache.hadoop.yarn.client.AMRMClientImpl
@InterfaceStability.Unstable public class AMRMClientImpl
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.hadoop.yarn.client.AMRMClient |
|---|
AMRMClient.ContainerRequest |
| Nested classes/interfaces inherited from interface org.apache.hadoop.yarn.service.Service |
|---|
org.apache.hadoop.yarn.service.Service.STATE |
| Field Summary | |
|---|---|
protected org.apache.hadoop.yarn.api.records.ApplicationAttemptId |
appAttemptId
|
protected Set<org.apache.hadoop.yarn.api.records.ResourceRequest> |
ask
|
protected org.apache.hadoop.yarn.api.records.Resource |
clusterAvailableResources
|
protected int |
clusterNodeCount
|
protected Set<org.apache.hadoop.yarn.api.records.ContainerId> |
release
|
protected Map<org.apache.hadoop.yarn.api.records.Priority,Map<String,Map<org.apache.hadoop.yarn.api.records.Resource,org.apache.hadoop.yarn.api.records.ResourceRequest>>> |
remoteRequestsTable
|
protected org.apache.hadoop.yarn.api.AMRMProtocol |
rmClient
|
| Fields inherited from interface org.apache.hadoop.yarn.client.AMRMClient |
|---|
ANY |
| Constructor Summary | |
|---|---|
AMRMClientImpl(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
|
|
| Method Summary | |
|---|---|
void |
addContainerRequest(AMRMClient.ContainerRequest req)
Request containers for resources before calling allocate |
org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse |
allocate(float progressIndicator)
Request additional containers and receive new container allocations. |
org.apache.hadoop.yarn.api.records.Resource |
getClusterAvailableResources()
Get the currently available resources in the cluster. |
int |
getClusterNodeCount()
Get the current number of nodes in the cluster. |
void |
init(org.apache.hadoop.conf.Configuration conf)
|
org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse |
registerApplicationMaster(String appHostName,
int appHostPort,
String appTrackingUrl)
Register the application master. |
void |
releaseAssignedContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
Release containers assigned by the Resource Manager. |
void |
removeContainerRequest(AMRMClient.ContainerRequest req)
Remove previous container request. |
void |
start()
|
void |
stop()
|
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.service.AbstractService |
|---|
getConfig, getName, getServiceState, getStartTime, register, unregister |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.hadoop.yarn.service.Service |
|---|
getConfig, getName, getServiceState, getStartTime, register, unregister |
| Field Detail |
|---|
protected org.apache.hadoop.yarn.api.AMRMProtocol rmClient
protected final org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId
protected org.apache.hadoop.yarn.api.records.Resource clusterAvailableResources
protected int clusterNodeCount
protected final Map<org.apache.hadoop.yarn.api.records.Priority,Map<String,Map<org.apache.hadoop.yarn.api.records.Resource,org.apache.hadoop.yarn.api.records.ResourceRequest>>> remoteRequestsTable
protected final Set<org.apache.hadoop.yarn.api.records.ResourceRequest> ask
protected final Set<org.apache.hadoop.yarn.api.records.ContainerId> release
| Constructor Detail |
|---|
public AMRMClientImpl(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
| Method Detail |
|---|
public void init(org.apache.hadoop.conf.Configuration conf)
init in interface org.apache.hadoop.yarn.service.Serviceinit in class org.apache.hadoop.yarn.service.AbstractServicepublic void start()
start in interface org.apache.hadoop.yarn.service.Servicestart in class org.apache.hadoop.yarn.service.AbstractServicepublic void stop()
stop in interface org.apache.hadoop.yarn.service.Servicestop in class org.apache.hadoop.yarn.service.AbstractService
public org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse registerApplicationMaster(String appHostName,
int appHostPort,
String appTrackingUrl)
throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
AMRMClient
registerApplicationMaster in interface AMRMClientappHostName - Name of the host on which master is runningappHostPort - Port master is listening onappTrackingUrl - URL at which the master info can be seen
RegisterApplicationMasterResponse
org.apache.hadoop.yarn.exceptions.YarnRemoteException
public org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse allocate(float progressIndicator)
throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
AMRMClientaddContainerRequest are sent to the
ResourceManager. New containers assigned to the master are
retrieved. Status of completed containers and node health updates are
also retrieved.
This also doubles up as a heartbeat to the ResourceManager and must be
made periodically.
The call may not always return any new allocations of containers.
App should not make concurrent allocate requests. May cause request loss.
allocate in interface AMRMClientprogressIndicator - Indicates progress made by the master
org.apache.hadoop.yarn.exceptions.YarnRemoteException
public void unregisterApplicationMaster(org.apache.hadoop.yarn.api.records.FinalApplicationStatus appStatus,
String appMessage,
String appTrackingUrl)
throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
AMRMClient
unregisterApplicationMaster in interface AMRMClientappStatus - Success/Failure status of the masterappMessage - Diagnostics message on failureappTrackingUrl - New URL to get master info
org.apache.hadoop.yarn.exceptions.YarnRemoteExceptionpublic void addContainerRequest(AMRMClient.ContainerRequest req)
AMRMClientallocate
addContainerRequest in interface AMRMClientreq - Resource requestpublic void removeContainerRequest(AMRMClient.ContainerRequest req)
AMRMClient
removeContainerRequest in interface AMRMClientreq - Resource requestpublic void releaseAssignedContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
AMRMClient
releaseAssignedContainer in interface AMRMClientpublic org.apache.hadoop.yarn.api.records.Resource getClusterAvailableResources()
AMRMClient
getClusterAvailableResources in interface AMRMClientpublic int getClusterNodeCount()
AMRMClient
getClusterNodeCount in interface AMRMClient
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||