|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.service.AbstractService
org.apache.hadoop.yarn.client.api.YarnClient
@InterfaceAudience.Public @InterfaceStability.Stable public abstract class YarnClient
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service |
---|
org.apache.hadoop.service.Service.STATE |
Constructor Summary | |
---|---|
protected |
YarnClient(String name)
|
Method Summary | |
---|---|
abstract YarnClientApplication |
createApplication()
Obtain a YarnClientApplication for a new application,
which in turn contains the ApplicationSubmissionContext and
GetNewApplicationResponse
objects. |
static YarnClient |
createYarnClient()
Create a new instance of YarnClient. |
abstract List<org.apache.hadoop.yarn.api.records.QueueInfo> |
getAllQueues()
Get information ( QueueInfo ) about all queues, recursively if there
is a hierarchy |
abstract org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier> |
getAMRMToken(org.apache.hadoop.yarn.api.records.ApplicationId appId)
Get the AMRM token of the application. |
abstract org.apache.hadoop.yarn.api.records.ApplicationReport |
getApplicationReport(org.apache.hadoop.yarn.api.records.ApplicationId appId)
Get a report of the given Application. |
abstract List<org.apache.hadoop.yarn.api.records.ApplicationReport> |
getApplications()
Get a report (ApplicationReport) of all Applications in the cluster. |
abstract List<org.apache.hadoop.yarn.api.records.ApplicationReport> |
getApplications(EnumSet<org.apache.hadoop.yarn.api.records.YarnApplicationState> applicationStates)
Get a report (ApplicationReport) of Applications matching the given application states in the cluster. |
abstract List<org.apache.hadoop.yarn.api.records.ApplicationReport> |
getApplications(Set<String> applicationTypes)
Get a report (ApplicationReport) of Applications matching the given application types in the cluster. |
abstract List<org.apache.hadoop.yarn.api.records.ApplicationReport> |
getApplications(Set<String> applicationTypes,
EnumSet<org.apache.hadoop.yarn.api.records.YarnApplicationState> applicationStates)
Get a report (ApplicationReport) of Applications matching the given application types and application states in the cluster. |
abstract List<org.apache.hadoop.yarn.api.records.QueueInfo> |
getChildQueueInfos(String parent)
Get information ( QueueInfo ) about all the immediate children queues
of the given queue |
abstract List<org.apache.hadoop.yarn.api.records.NodeReport> |
getNodeReports(org.apache.hadoop.yarn.api.records.NodeState... states)
Get a report of nodes ( NodeReport ) in the cluster. |
abstract List<org.apache.hadoop.yarn.api.records.QueueUserACLInfo> |
getQueueAclsInfo()
Get information about acls for current user on all the existing queues. |
abstract org.apache.hadoop.yarn.api.records.QueueInfo |
getQueueInfo(String queueName)
Get information ( QueueInfo ) about a given queue. |
abstract org.apache.hadoop.yarn.api.records.Token |
getRMDelegationToken(org.apache.hadoop.io.Text renewer)
Get a delegation token so as to be able to talk to YARN using those tokens. |
abstract List<org.apache.hadoop.yarn.api.records.QueueInfo> |
getRootQueueInfos()
Get information ( QueueInfo ) about top level queues. |
abstract org.apache.hadoop.yarn.api.records.YarnClusterMetrics |
getYarnClusterMetrics()
Get metrics ( YarnClusterMetrics ) about the cluster. |
abstract void |
killApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
Kill an application identified by given ID. |
abstract org.apache.hadoop.yarn.api.records.ApplicationId |
submitApplication(org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext appContext)
Submit a new application to YARN. It is a blocking call, such
that it will not return ApplicationId until the submitted
application has been submitted and accepted by the ResourceManager. |
Methods inherited from class org.apache.hadoop.service.AbstractService |
---|
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceInit, serviceStart, serviceStop, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
@InterfaceAudience.Private protected YarnClient(String name)
Method Detail |
---|
@InterfaceAudience.Public public static YarnClient createYarnClient()
public abstract YarnClientApplication createApplication() throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
Obtain a YarnClientApplication
for a new application,
which in turn contains the ApplicationSubmissionContext
and
GetNewApplicationResponse
objects.
YarnClientApplication
built for a new application
org.apache.hadoop.yarn.exceptions.YarnException
IOException
public abstract org.apache.hadoop.yarn.api.records.ApplicationId submitApplication(org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext appContext) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
Submit a new application to YARN.
It is a blocking call, such
that it will not return ApplicationId
until the submitted
application has been submitted and accepted by the ResourceManager.
appContext
- ApplicationSubmissionContext
containing all the details
needed to submit a new application
ApplicationId
of the accepted application
org.apache.hadoop.yarn.exceptions.YarnException
IOException
createApplication()
public abstract void killApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
Kill an application identified by given ID.
applicationId
- ApplicationId
of the application that needs to be killed
org.apache.hadoop.yarn.exceptions.YarnException
- in case of errors or if YARN rejects the request due to
access-control restrictions.
IOException
getQueueAclsInfo()
public abstract org.apache.hadoop.yarn.api.records.ApplicationReport getApplicationReport(org.apache.hadoop.yarn.api.records.ApplicationId appId) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
Get a report of the given Application.
In secure mode, YARN
verifies access to the application, queue
etc. before accepting the request.
If the user does not have VIEW_APP
access then the following
fields in the report will be set to stubbed values:
appId
- ApplicationId
of the application that needs a report
org.apache.hadoop.yarn.exceptions.YarnException
IOException
public abstract org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier> getAMRMToken(org.apache.hadoop.yarn.api.records.ApplicationId appId) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
UserGroupInformation
of the
current user.
The AMRM token will be returned only if all the following conditions are
met:
appId
- ApplicationId
of the application to get the AMRM token
org.apache.hadoop.yarn.exceptions.YarnException
IOException
public abstract List<org.apache.hadoop.yarn.api.records.ApplicationReport> getApplications() throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
Get a report (ApplicationReport) of all Applications in the cluster.
If the user does not have VIEW_APP
access for an application
then the corresponding report will be filtered as described in
getApplicationReport(ApplicationId)
.
org.apache.hadoop.yarn.exceptions.YarnException
IOException
public abstract List<org.apache.hadoop.yarn.api.records.ApplicationReport> getApplications(Set<String> applicationTypes) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
Get a report (ApplicationReport) of Applications matching the given application types in the cluster.
If the user does not have VIEW_APP
access for an application
then the corresponding report will be filtered as described in
getApplicationReport(ApplicationId)
.
applicationTypes
-
org.apache.hadoop.yarn.exceptions.YarnException
IOException
public abstract List<org.apache.hadoop.yarn.api.records.ApplicationReport> getApplications(EnumSet<org.apache.hadoop.yarn.api.records.YarnApplicationState> applicationStates) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
Get a report (ApplicationReport) of Applications matching the given application states in the cluster.
If the user does not have VIEW_APP
access for an application
then the corresponding report will be filtered as described in
getApplicationReport(ApplicationId)
.
applicationStates
-
org.apache.hadoop.yarn.exceptions.YarnException
IOException
public abstract List<org.apache.hadoop.yarn.api.records.ApplicationReport> getApplications(Set<String> applicationTypes, EnumSet<org.apache.hadoop.yarn.api.records.YarnApplicationState> applicationStates) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
Get a report (ApplicationReport) of Applications matching the given application types and application states in the cluster.
If the user does not have VIEW_APP
access for an application
then the corresponding report will be filtered as described in
getApplicationReport(ApplicationId)
.
applicationTypes
- applicationStates
-
org.apache.hadoop.yarn.exceptions.YarnException
IOException
public abstract org.apache.hadoop.yarn.api.records.YarnClusterMetrics getYarnClusterMetrics() throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
Get metrics (YarnClusterMetrics
) about the cluster.
org.apache.hadoop.yarn.exceptions.YarnException
IOException
public abstract List<org.apache.hadoop.yarn.api.records.NodeReport> getNodeReports(org.apache.hadoop.yarn.api.records.NodeState... states) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
Get a report of nodes (NodeReport
) in the cluster.
states
- The NodeState
s to filter on. If no filter states are
given, nodes in all states will be returned.
org.apache.hadoop.yarn.exceptions.YarnException
IOException
public abstract org.apache.hadoop.yarn.api.records.Token getRMDelegationToken(org.apache.hadoop.io.Text renewer) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
Get a delegation token so as to be able to talk to YARN using those tokens.
renewer
- Address of the renewer who can renew these tokens when needed by
securely talking to YARN.
Token
) that can be used to
talk to YARN
org.apache.hadoop.yarn.exceptions.YarnException
IOException
public abstract org.apache.hadoop.yarn.api.records.QueueInfo getQueueInfo(String queueName) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
Get information (QueueInfo
) about a given queue.
queueName
- Name of the queue whose information is needed
org.apache.hadoop.yarn.exceptions.YarnException
- in case of errors or if YARN rejects the request due to
access-control restrictions.
IOException
public abstract List<org.apache.hadoop.yarn.api.records.QueueInfo> getAllQueues() throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
Get information (QueueInfo
) about all queues, recursively if there
is a hierarchy
org.apache.hadoop.yarn.exceptions.YarnException
IOException
public abstract List<org.apache.hadoop.yarn.api.records.QueueInfo> getRootQueueInfos() throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
Get information (QueueInfo
) about top level queues.
org.apache.hadoop.yarn.exceptions.YarnException
IOException
public abstract List<org.apache.hadoop.yarn.api.records.QueueInfo> getChildQueueInfos(String parent) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
Get information (QueueInfo
) about all the immediate children queues
of the given queue
parent
- Name of the queue whose child-queues' information is needed
org.apache.hadoop.yarn.exceptions.YarnException
IOException
public abstract List<org.apache.hadoop.yarn.api.records.QueueUserACLInfo> getQueueAclsInfo() throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
Get information about acls for current user on all the existing queues.
QueueUserACLInfo
) for
current user
org.apache.hadoop.yarn.exceptions.YarnException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |