public class AppmasterRmTemplate extends YarnRpcAccessor<ApplicationMasterProtocol> implements AppmasterRmOperations
AppmasterRmOperations wrapping
communication using ApplicationMasterProtocol. Methods for this
template wraps possible exceptions into Spring Dao exception hierarchy.| Constructor and Description |
|---|
AppmasterRmTemplate(Configuration config)
Instantiates a new AppmasterRmTemplate.
|
| Modifier and Type | Method and Description |
|---|---|
AllocateResponse |
allocate(AllocateRequest request)
Allocate container.
|
FinishApplicationMasterResponse |
finish(FinishApplicationMasterRequest request)
Finish the application master.
|
protected java.net.InetSocketAddress |
getRpcAddress(Configuration config)
Gets the
InetSocketAddress where this accessor should connect. |
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(Configuration config)
config - the hadoop configurationpublic 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 AllocateResponse allocate(AllocateRequest request)
AppmasterRmOperationsallocate in interface AppmasterRmOperationsrequest - the requestpublic FinishApplicationMasterResponse finish(FinishApplicationMasterRequest request)
AppmasterRmOperationsfinish in interface AppmasterRmOperationsrequest - the FinishApplicationMasterRequestFinishApplicationMasterResponseprotected java.net.InetSocketAddress getRpcAddress(Configuration config)
YarnRpcAccessorInetSocketAddress where this accessor should connect.getRpcAddress in class YarnRpcAccessor<ApplicationMasterProtocol>config - the yarn configuration