|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.yarn.rpc.YarnRpcAccessor<org.apache.hadoop.yarn.api.ApplicationClientProtocol> org.springframework.yarn.client.ClientRmTemplate
public class ClientRmTemplate
Template implementation for ClientRmOperations
wrapping
communication using ApplicationClientProtocol
. Methods for this
template wraps possible exceptions into Spring Dao exception hierarchy.
Constructor Summary | |
---|---|
ClientRmTemplate(org.apache.hadoop.conf.Configuration config)
Constructs a ClientRmTemplate with a given yarn configuration. |
Method Summary | |
---|---|
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 ApplicationReport s 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 ApplicationReport s 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. |
Methods inherited from class org.springframework.yarn.rpc.YarnRpcAccessor |
---|
afterPropertiesSet, createProxy, destroy, execute, getConfiguration, getProxy, getUser |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClientRmTemplate(org.apache.hadoop.conf.Configuration config)
ClientRmTemplate
with a given yarn configuration.
config
- the yarn configurationMethod Detail |
---|
public 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)
ClientRmOperations
ApplicationReport
s from a resource manager. Allows
to filter results by using a set of YarnApplicationState
s and
registered application types.
listApplications
in interface ClientRmOperations
states
- the yarn application statestypes
- the yarn application types
ApplicationReport
spublic java.util.List<org.apache.hadoop.yarn.api.records.ApplicationReport> listApplications()
ClientRmOperations
ApplicationReport
s from a resource manager.
listApplications
in interface ClientRmOperations
ApplicationReport
spublic org.apache.hadoop.yarn.api.protocolrecords.GetNewApplicationResponse getNewApplication()
ClientRmOperations
ApplicationId
but response
also contains information about resource capabilities.
getNewApplication
in interface ClientRmOperations
GetNewApplicationResponse
public org.apache.hadoop.yarn.api.protocolrecords.SubmitApplicationResponse submitApplication(org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext appSubContext)
ClientRmOperations
submitApplication
in interface ClientRmOperations
appSubContext
- the Application Submission Context
SubmitApplicationResponse
public org.apache.hadoop.yarn.api.protocolrecords.KillApplicationResponse killApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
ClientRmOperations
ResourceManager
to abort submitted application.
killApplication
in interface ClientRmOperations
applicationId
- the application id
KillApplicationResponse
public org.apache.hadoop.yarn.api.records.Token getDelegationToken(java.lang.String renewer)
ClientRmOperations
getDelegationToken
in interface ClientRmOperations
renewer
- the renewer as kerberos principal
public org.apache.hadoop.yarn.api.records.ApplicationReport getApplicationReport(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
ClientRmOperations
getApplicationReport
in interface ClientRmOperations
applicationId
- the application id
ApplicationReport
protected java.net.InetSocketAddress getRpcAddress(org.apache.hadoop.conf.Configuration config)
YarnRpcAccessor
InetSocketAddress
where this accessor should connect.
getRpcAddress
in class YarnRpcAccessor<org.apache.hadoop.yarn.api.ApplicationClientProtocol>
config
- the yarn configuration
|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |