org.springframework.yarn.client
Interface ClientRmOperations

All Known Implementing Classes:
ClientRmTemplate

public interface ClientRmOperations

Interface for client to resource manager communication.

Author:
Janne Valkealahti
See Also:
ClientRmTemplate

Method Summary
 ApplicationReport getApplicationReport(ApplicationId applicationId)
          Gets a report of the application.
 Token getDelegationToken(String renewer)
          Gets the resource manager delegation token.
 GetNewApplicationResponse getNewApplication()
          Requests a new application from a resource manager.
 KillApplicationResponse killApplication(ApplicationId applicationId)
          Requests ResourceManager to abort submitted application.
 List<ApplicationReport> listApplications()
          Gets a list of ApplicationReports from a resource manager.
 List<ApplicationReport> listApplications(EnumSet<YarnApplicationState> states, Set<String> types)
          Gets a list of ApplicationReports from a resource manager.
 SubmitApplicationResponse submitApplication(ApplicationSubmissionContext appSubContext)
          Submits a new application into resource manager.
 

Method Detail

getNewApplication

GetNewApplicationResponse getNewApplication()
Requests a new application from a resource manager. Main purpose is to get a new ApplicationId but response also contains information about resource capabilities.

Returns:
the new GetNewApplicationResponse

submitApplication

SubmitApplicationResponse submitApplication(ApplicationSubmissionContext appSubContext)
Submits a new application into resource manager. Returned response is an empty placeholder, thus application submission is considered to be successful if no exceptions are thrown.

Parameters:
appSubContext - the Application Submission Context
Returns:
the new SubmitApplicationResponse

listApplications

List<ApplicationReport> listApplications()
Gets a list of ApplicationReports from a resource manager.

Returns:
a list of ApplicationReports

listApplications

List<ApplicationReport> listApplications(EnumSet<YarnApplicationState> states,
                                         Set<String> types)
Gets a list of ApplicationReports from a resource manager. Allows to filter results by using a set of YarnApplicationStates and registered application types.

Parameters:
states - the yarn application states
types - the yarn application types
Returns:
a list of ApplicationReports

killApplication

KillApplicationResponse killApplication(ApplicationId applicationId)
Requests ResourceManager to abort submitted application.

Parameters:
applicationId - the application id
Returns:
the KillApplicationResponse

getDelegationToken

Token getDelegationToken(String renewer)
Gets the resource manager delegation token.

Parameters:
renewer - the renewer as kerberos principal
Returns:
the delegation token

getApplicationReport

ApplicationReport getApplicationReport(ApplicationId applicationId)
Gets a report of the application.

Parameters:
applicationId - the application id
Returns:
the ApplicationReport