public class ClientRmTemplate extends YarnRpcAccessor<org.apache.hadoop.yarn.api.ApplicationClientProtocol> implements ClientRmOperations
ClientRmOperations wrapping
communication using ApplicationClientProtocol. Methods for this
template wraps possible exceptions into Spring Dao exception hierarchy.| Constructor and Description |
|---|
ClientRmTemplate(org.apache.hadoop.conf.Configuration config)
Constructs a
ClientRmTemplate with a given yarn configuration. |
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.yarn.api.records.ApplicationReport |
getApplicationReport(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
Gets a report of the application.
|
org.apache.hadoop.yarn.api.records.Token |
getDelegationToken(java.lang.String renewer)
Gets the resource manager delegation token.
|
org.apache.hadoop.yarn.api.protocolrecords.GetNewApplicationResponse |
getNewApplication()
Requests a new application from a resource manager.
|
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.KillApplicationResponse |
killApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
Requests
ResourceManager to abort submitted application. |
java.util.List<org.apache.hadoop.yarn.api.records.ApplicationReport> |
listApplications()
Gets a list of
ApplicationReports from a resource manager. |
java.util.List<org.apache.hadoop.yarn.api.records.ApplicationReport> |
listApplications(java.util.EnumSet<org.apache.hadoop.yarn.api.records.YarnApplicationState> states,
java.util.Set<java.lang.String> types)
Gets a list of
ApplicationReports from a resource manager. |
org.apache.hadoop.yarn.api.protocolrecords.SubmitApplicationResponse |
submitApplication(org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext appSubContext)
Submits a new application into resource manager.
|
afterPropertiesSet, createProxy, destroy, execute, getConfiguration, getProxy, getUserpublic ClientRmTemplate(org.apache.hadoop.conf.Configuration config)
ClientRmTemplate with a given yarn configuration.config - the yarn configurationpublic java.util.List<org.apache.hadoop.yarn.api.records.ApplicationReport> listApplications(java.util.EnumSet<org.apache.hadoop.yarn.api.records.YarnApplicationState> states,
java.util.Set<java.lang.String> types)
ClientRmOperationsApplicationReports from a resource manager. Allows
to filter results by using a set of YarnApplicationStates and
registered application types.listApplications in interface ClientRmOperationsstates - the yarn application statestypes - the yarn application typesApplicationReportspublic java.util.List<org.apache.hadoop.yarn.api.records.ApplicationReport> listApplications()
ClientRmOperationsApplicationReports from a resource manager.listApplications in interface ClientRmOperationsApplicationReportspublic org.apache.hadoop.yarn.api.protocolrecords.GetNewApplicationResponse getNewApplication()
ClientRmOperationsApplicationId but response
also contains information about resource capabilities.getNewApplication in interface ClientRmOperationsGetNewApplicationResponsepublic org.apache.hadoop.yarn.api.protocolrecords.SubmitApplicationResponse submitApplication(org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext appSubContext)
ClientRmOperationssubmitApplication in interface ClientRmOperationsappSubContext - the Application Submission ContextSubmitApplicationResponsepublic org.apache.hadoop.yarn.api.protocolrecords.KillApplicationResponse killApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
ClientRmOperationsResourceManager to abort submitted application.killApplication in interface ClientRmOperationsapplicationId - the application idKillApplicationResponsepublic org.apache.hadoop.yarn.api.records.Token getDelegationToken(java.lang.String renewer)
ClientRmOperationsgetDelegationToken in interface ClientRmOperationsrenewer - the renewer as kerberos principalpublic org.apache.hadoop.yarn.api.records.ApplicationReport getApplicationReport(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
ClientRmOperationsgetApplicationReport in interface ClientRmOperationsapplicationId - the application idApplicationReportprotected 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.ApplicationClientProtocol>config - the yarn configuration