public class AppmasterRmTemplate extends YarnRpcAccessor<org.apache.hadoop.yarn.api.ApplicationMasterProtocol> implements AppmasterRmOperations
AppmasterRmOperations wrapping
communication using ApplicationMasterProtocol. Methods for this
template wraps possible exceptions into Spring Dao exception hierarchy.| Constructor and Description |
|---|
AppmasterRmTemplate(org.apache.hadoop.conf.Configuration config)
Instantiates a new AppmasterRmTemplate.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse |
allocate(org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest request)
Allocate container.
|
org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterResponse |
finish(org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterRequest request)
Finish the application master.
|
protected java.net.InetSocketAddress |
getRpcAddress(org.apache.hadoop.conf.Configuration config)
Gets the
InetSocketAddress where this accessor should connect. |
org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse |
registerApplicationMaster(java.lang.String host,
java.lang.Integer rpcPort,
java.lang.String trackUrl)
Register application master.
|
afterPropertiesSet, createProxy, destroy, execute, getConfiguration, getProxy, getUserpublic AppmasterRmTemplate(org.apache.hadoop.conf.Configuration config)
config - the hadoop configurationpublic org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse registerApplicationMaster(java.lang.String host,
java.lang.Integer rpcPort,
java.lang.String trackUrl)
AppmasterRmOperationsregisterApplicationMaster in interface AppmasterRmOperationshost - the hostrpcPort - the rpc porttrackUrl - the track urlRegisterApplicationMasterResponsepublic org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse allocate(org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest request)
AppmasterRmOperationsallocate in interface AppmasterRmOperationsrequest - the requestpublic org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterResponse finish(org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterRequest request)
AppmasterRmOperationsfinish in interface AppmasterRmOperationsrequest - the FinishApplicationMasterRequestFinishApplicationMasterResponseprotected java.net.InetSocketAddress getRpcAddress(org.apache.hadoop.conf.Configuration config)
YarnRpcAccessorInetSocketAddress where this accessor should connect.getRpcAddress in class YarnRpcAccessor<org.apache.hadoop.yarn.api.ApplicationMasterProtocol>config - the yarn configuration