|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.yarn.service.AbstractService org.apache.hadoop.yarn.client.YarnClientImpl
@InterfaceAudience.Public @InterfaceStability.Evolving public class YarnClientImpl
Field Summary | |
---|---|
protected InetSocketAddress |
rmAddress
|
protected ClientRMProtocol |
rmClient
|
Constructor Summary | |
---|---|
YarnClientImpl()
|
|
YarnClientImpl(InetSocketAddress rmAddress)
|
Method Summary | |
---|---|
List<QueueInfo> |
getAllQueues()
Get information ( QueueInfo ) about all queues, recursively if there
is a hierarchy |
List<ApplicationReport> |
getApplicationList()
Get a report (ApplicationReport) of all Applications in the cluster. |
ApplicationReport |
getApplicationReport(ApplicationId appId)
Get a report of the given Application. |
List<QueueInfo> |
getChildQueueInfos(String parent)
Get information ( QueueInfo ) about all the immediate children queues
of the given queue |
GetNewApplicationResponse |
getNewApplication()
Obtain a new ApplicationId for submitting new applications. |
List<NodeReport> |
getNodeReports()
Get a report of all nodes ( NodeReport ) in the cluster. |
List<QueueUserACLInfo> |
getQueueAclsInfo()
Get information about acls for current user on all the existing queues. |
QueueInfo |
getQueueInfo(String queueName)
Get information ( QueueInfo ) about a given queue. |
DelegationToken |
getRMDelegationToken(Text renewer)
Get a delegation token so as to be able to talk to YARN using those tokens. |
List<QueueInfo> |
getRootQueueInfos()
Get information ( QueueInfo ) about top level queues. |
YarnClusterMetrics |
getYarnClusterMetrics()
Get metrics ( YarnClusterMetrics ) about the cluster. |
void |
init(Configuration conf)
Initialize the service. |
void |
killApplication(ApplicationId applicationId)
Kill an application identified by given ID. |
void |
start()
Start the service. |
void |
stop()
Stop the service. |
ApplicationId |
submitApplication(ApplicationSubmissionContext appContext)
Submit a new application to YARN. |
Methods inherited from class org.apache.hadoop.yarn.service.AbstractService |
---|
getConfig, getName, getServiceState, getStartTime, register, unregister |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.hadoop.yarn.service.Service |
---|
getConfig, getName, getServiceState, getStartTime, register, unregister |
Field Detail |
---|
protected ClientRMProtocol rmClient
protected InetSocketAddress rmAddress
Constructor Detail |
---|
public YarnClientImpl()
public YarnClientImpl(InetSocketAddress rmAddress)
Method Detail |
---|
public void init(Configuration conf)
org.apache.hadoop.yarn.service.AbstractService
Service.STATE.NOTINITED
to Service.STATE.INITED
unless the operation failed and an exception was raised.
init
in interface org.apache.hadoop.yarn.service.Service
init
in class org.apache.hadoop.yarn.service.AbstractService
conf
- the configuration of the servicepublic void start()
org.apache.hadoop.yarn.service.AbstractService
Service.STATE.INITED
to Service.STATE.STARTED
unless the operation failed and an exception was raised.
start
in interface org.apache.hadoop.yarn.service.Service
start
in class org.apache.hadoop.yarn.service.AbstractService
public void stop()
org.apache.hadoop.yarn.service.AbstractService
stop
in interface org.apache.hadoop.yarn.service.Service
stop
in class org.apache.hadoop.yarn.service.AbstractService
public 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 YarnClient
ApplicationId
to be used
to submit an application
org.apache.hadoop.yarn.exceptions.YarnRemoteException
public ApplicationId submitApplication(ApplicationSubmissionContext appContext) throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
YarnClient
Submit a new application to YARN.
submitApplication
in interface YarnClient
appContext
- ApplicationSubmissionContext
containing all the details
needed to submit a new application
ApplicationId
of the accepted application
org.apache.hadoop.yarn.exceptions.YarnRemoteException
YarnClient.getNewApplication()
public void killApplication(ApplicationId applicationId) throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
YarnClient
Kill an application identified by given ID.
killApplication
in interface YarnClient
applicationId
- ApplicationId
of the application that needs to be killed
org.apache.hadoop.yarn.exceptions.YarnRemoteException
- in case of errors or if YARN rejects the request due to
access-control restrictions.YarnClient.getQueueAclsInfo()
public ApplicationReport getApplicationReport(ApplicationId appId) throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
YarnClient
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:
getApplicationReport
in interface YarnClient
appId
- ApplicationId
of the application that needs a report
org.apache.hadoop.yarn.exceptions.YarnRemoteException
public List<ApplicationReport> getApplicationList() throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
YarnClient
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
YarnClient.getApplicationReport(ApplicationId)
.
getApplicationList
in interface YarnClient
org.apache.hadoop.yarn.exceptions.YarnRemoteException
public YarnClusterMetrics getYarnClusterMetrics() throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
YarnClient
Get metrics (YarnClusterMetrics
) about the cluster.
getYarnClusterMetrics
in interface YarnClient
org.apache.hadoop.yarn.exceptions.YarnRemoteException
public List<NodeReport> getNodeReports() throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
YarnClient
Get a report of all nodes (NodeReport
) in the cluster.
getNodeReports
in interface YarnClient
org.apache.hadoop.yarn.exceptions.YarnRemoteException
public DelegationToken getRMDelegationToken(Text renewer) throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
YarnClient
Get a delegation token so as to be able to talk to YARN using those tokens.
getRMDelegationToken
in interface YarnClient
renewer
- Address of the renewer who can renew these tokens when needed by
securely talking to YARN.
DelegationToken
) that can be used to
talk to YARN
org.apache.hadoop.yarn.exceptions.YarnRemoteException
public QueueInfo getQueueInfo(String queueName) throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
YarnClient
Get information (QueueInfo
) about a given queue.
getQueueInfo
in interface YarnClient
queueName
- Name of the queue whose information is needed
org.apache.hadoop.yarn.exceptions.YarnRemoteException
- in case of errors or if YARN rejects the request due to
access-control restrictions.public List<QueueUserACLInfo> getQueueAclsInfo() throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
YarnClient
Get information about acls for current user on all the existing queues.
getQueueAclsInfo
in interface YarnClient
QueueUserACLInfo
) for
current user
org.apache.hadoop.yarn.exceptions.YarnRemoteException
public List<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 YarnClient
org.apache.hadoop.yarn.exceptions.YarnRemoteException
public List<QueueInfo> getRootQueueInfos() throws org.apache.hadoop.yarn.exceptions.YarnRemoteException
YarnClient
Get information (QueueInfo
) about top level queues.
getRootQueueInfos
in interface YarnClient
org.apache.hadoop.yarn.exceptions.YarnRemoteException
public List<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 YarnClient
parent
- Name of the queue whose child-queues' information is needed
org.apache.hadoop.yarn.exceptions.YarnRemoteException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |