@InterfaceAudience.Public @InterfaceStability.Evolving public class YarnClientImpl extends org.apache.hadoop.yarn.service.AbstractService implements YarnClient
| Modifier and Type | Field and Description |
|---|---|
protected InetSocketAddress |
rmAddress |
protected org.apache.hadoop.yarn.api.ClientRMProtocol |
rmClient |
| Constructor and Description |
|---|
YarnClientImpl() |
YarnClientImpl(InetSocketAddress rmAddress) |
| Modifier and Type | Method and Description |
|---|---|
List<org.apache.hadoop.yarn.api.records.QueueInfo> |
getAllQueues()
Get information (
QueueInfo) about all queues, recursively if there
is a hierarchy |
List<org.apache.hadoop.yarn.api.records.ApplicationReport> |
getApplicationList()
Get a report (ApplicationReport) of all Applications in the cluster.
|
org.apache.hadoop.yarn.api.records.ApplicationReport |
getApplicationReport(org.apache.hadoop.yarn.api.records.ApplicationId appId)
Get a report of the given Application.
|
List<org.apache.hadoop.yarn.api.records.QueueInfo> |
getChildQueueInfos(String parent)
Get information (
QueueInfo) about all the immediate children queues
of the given queue |
org.apache.hadoop.yarn.api.protocolrecords.GetNewApplicationResponse |
getNewApplication()
Obtain a new
ApplicationId for submitting new applications. |
List<org.apache.hadoop.yarn.api.records.NodeReport> |
getNodeReports()
Get a report of all nodes (
NodeReport) in the cluster. |
List<org.apache.hadoop.yarn.api.records.QueueUserACLInfo> |
getQueueAclsInfo()
Get information about acls for current user on all the
existing queues.
|
org.apache.hadoop.yarn.api.records.QueueInfo |
getQueueInfo(String queueName)
Get information (
QueueInfo) about a given queue. |
org.apache.hadoop.yarn.api.records.DelegationToken |
getRMDelegationToken(org.apache.hadoop.io.Text renewer)
Get a delegation token so as to be able to talk to YARN using those tokens.
|
List<org.apache.hadoop.yarn.api.records.QueueInfo> |
getRootQueueInfos()
Get information (
QueueInfo) about top level queues. |
org.apache.hadoop.yarn.api.records.YarnClusterMetrics |
getYarnClusterMetrics()
Get metrics (
YarnClusterMetrics) about the cluster. |
void |
init(org.apache.hadoop.conf.Configuration conf) |
void |
killApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
Kill an application identified by given ID.
|
void |
start() |
void |
stop() |
org.apache.hadoop.yarn.api.records.ApplicationId |
submitApplication(org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext appContext)
Submit a new application to
YARN. |
getConfig, getName, getServiceState, getStartTime, register, unregisterprotected org.apache.hadoop.yarn.api.ClientRMProtocol rmClient
protected InetSocketAddress rmAddress
public YarnClientImpl()
public YarnClientImpl(InetSocketAddress rmAddress)
public void init(org.apache.hadoop.conf.Configuration conf)
init in interface org.apache.hadoop.yarn.service.Serviceinit in class org.apache.hadoop.yarn.service.AbstractServicepublic void start()
start in interface org.apache.hadoop.yarn.service.Servicestart in class org.apache.hadoop.yarn.service.AbstractServicepublic void stop()
stop in interface org.apache.hadoop.yarn.service.Servicestop in class org.apache.hadoop.yarn.service.AbstractServicepublic org.apache.hadoop.yarn.api.protocolrecords.GetNewApplicationResponse getNewApplication()
throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
YarnClient
Obtain a new ApplicationId for submitting new applications.
Returns a response which contains ApplicationId that can be used to
submit a new application. See
YarnClient.submitApplication(ApplicationSubmissionContext).
See GetNewApplicationResponse for other information that is
returned.
getNewApplication in interface YarnClientApplicationId to be used
to submit an applicationorg.apache.hadoop.yarn.exceptions.YarnRemoteExceptionpublic org.apache.hadoop.yarn.api.records.ApplicationId submitApplication(org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext appContext)
throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
YarnClient
Submit a new application to YARN.
submitApplication in interface YarnClientappContext - ApplicationSubmissionContext containing all the details
needed to submit a new applicationApplicationId of the accepted applicationorg.apache.hadoop.yarn.exceptions.YarnRemoteExceptionYarnClient.getNewApplication()public void killApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
YarnClientKill an application identified by given ID.
killApplication in interface YarnClientapplicationId - ApplicationId of the application that needs to be killedorg.apache.hadoop.yarn.exceptions.YarnRemoteException - in case of errors or if YARN rejects the request due to
access-control restrictions.YarnClient.getQueueAclsInfo()public org.apache.hadoop.yarn.api.records.ApplicationReport getApplicationReport(org.apache.hadoop.yarn.api.records.ApplicationId appId)
throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
YarnClientGet 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:
getApplicationReport in interface YarnClientappId - ApplicationId of the application that needs a reportorg.apache.hadoop.yarn.exceptions.YarnRemoteExceptionpublic List<org.apache.hadoop.yarn.api.records.ApplicationReport> getApplicationList() throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
YarnClientGet 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
YarnClient.getApplicationReport(ApplicationId).
getApplicationList in interface YarnClientorg.apache.hadoop.yarn.exceptions.YarnRemoteExceptionpublic org.apache.hadoop.yarn.api.records.YarnClusterMetrics getYarnClusterMetrics()
throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
YarnClient
Get metrics (YarnClusterMetrics) about the cluster.
getYarnClusterMetrics in interface YarnClientorg.apache.hadoop.yarn.exceptions.YarnRemoteExceptionpublic List<org.apache.hadoop.yarn.api.records.NodeReport> getNodeReports() throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
YarnClient
Get a report of all nodes (NodeReport) in the cluster.
getNodeReports in interface YarnClientorg.apache.hadoop.yarn.exceptions.YarnRemoteExceptionpublic org.apache.hadoop.yarn.api.records.DelegationToken getRMDelegationToken(org.apache.hadoop.io.Text renewer)
throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
YarnClientGet a delegation token so as to be able to talk to YARN using those tokens.
getRMDelegationToken in interface YarnClientrenewer - Address of the renewer who can renew these tokens when needed by
securely talking to YARN.DelegationToken) that can be used to
talk to YARNorg.apache.hadoop.yarn.exceptions.YarnRemoteExceptionpublic org.apache.hadoop.yarn.api.records.QueueInfo getQueueInfo(String queueName) throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
YarnClient
Get information (QueueInfo) about a given queue.
getQueueInfo in interface YarnClientqueueName - Name of the queue whose information is neededorg.apache.hadoop.yarn.exceptions.YarnRemoteException - in case of errors or if YARN rejects the request due to
access-control restrictions.public List<org.apache.hadoop.yarn.api.records.QueueUserACLInfo> getQueueAclsInfo() throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
YarnClientGet information about acls for current user on all the existing queues.
getQueueAclsInfo in interface YarnClientQueueUserACLInfo) for
current userorg.apache.hadoop.yarn.exceptions.YarnRemoteExceptionpublic List<org.apache.hadoop.yarn.api.records.QueueInfo> getAllQueues() throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
YarnClient
Get information (QueueInfo) about all queues, recursively if there
is a hierarchy
getAllQueues in interface YarnClientorg.apache.hadoop.yarn.exceptions.YarnRemoteExceptionpublic List<org.apache.hadoop.yarn.api.records.QueueInfo> getRootQueueInfos() throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
YarnClient
Get information (QueueInfo) about top level queues.
getRootQueueInfos in interface YarnClientorg.apache.hadoop.yarn.exceptions.YarnRemoteExceptionpublic List<org.apache.hadoop.yarn.api.records.QueueInfo> getChildQueueInfos(String parent) throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
YarnClient
Get information (QueueInfo) about all the immediate children queues
of the given queue
getChildQueueInfos in interface YarnClientparent - Name of the queue whose child-queues' information is neededorg.apache.hadoop.yarn.exceptions.YarnRemoteExceptionCopyright © 2013 Apache Software Foundation. All Rights Reserved.