org.apache.hadoop.yarn.client.api
Class AHSClient

java.lang.Object
  extended by org.apache.hadoop.service.AbstractService
      extended by org.apache.hadoop.yarn.client.api.AHSClient
All Implemented Interfaces:
Closeable, org.apache.hadoop.service.Service
Direct Known Subclasses:
AHSClientImpl

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract class AHSClient
extends org.apache.hadoop.service.AbstractService


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE
 
Constructor Summary
AHSClient(String name)
           
 
Method Summary
static AHSClient createAHSClient()
          Create a new instance of AHSClient.
abstract  org.apache.hadoop.yarn.api.records.ApplicationAttemptReport getApplicationAttemptReport(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId)
           Get a report of the given ApplicationAttempt.
abstract  List<org.apache.hadoop.yarn.api.records.ApplicationAttemptReport> getApplicationAttempts(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
           Get a report of all (ApplicationAttempts) of Application in the cluster.
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  org.apache.hadoop.yarn.api.records.ContainerReport getContainerReport(org.apache.hadoop.yarn.api.records.ContainerId containerId)
           Get a report of the given Container.
abstract  List<org.apache.hadoop.yarn.api.records.ContainerReport> getContainers(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId)
           Get a report of all (Containers) of ApplicationAttempt in the cluster.
 
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

AHSClient

@InterfaceAudience.Private
public AHSClient(String name)
Method Detail

createAHSClient

@InterfaceAudience.Public
public static AHSClient createAHSClient()
Create a new instance of AHSClient.


getApplicationReport

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:

Parameters:
appId - ApplicationId of the application that needs a report
Returns:
application report
Throws:
org.apache.hadoop.yarn.exceptions.YarnException
IOException

getApplications

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).

Returns:
a list of reports for all applications
Throws:
org.apache.hadoop.yarn.exceptions.YarnException
IOException

getApplicationAttemptReport

public abstract org.apache.hadoop.yarn.api.records.ApplicationAttemptReport getApplicationAttemptReport(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId)
                                                                                                 throws org.apache.hadoop.yarn.exceptions.YarnException,
                                                                                                        IOException

Get a report of the given ApplicationAttempt.

In secure mode, YARN verifies access to the application, queue etc. before accepting the request.

Parameters:
applicationAttemptId - ApplicationAttemptId of the application attempt that needs a report
Returns:
application attempt report
Throws:
org.apache.hadoop.yarn.exceptions.YarnException
{@link - ApplicationAttemptNotFoundException} if application attempt not found
IOException

getApplicationAttempts

public abstract List<org.apache.hadoop.yarn.api.records.ApplicationAttemptReport> getApplicationAttempts(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
                                                                                                  throws org.apache.hadoop.yarn.exceptions.YarnException,
                                                                                                         IOException

Get a report of all (ApplicationAttempts) of Application in the cluster.

Parameters:
applicationId -
Returns:
a list of reports for all application attempts for specified application
Throws:
org.apache.hadoop.yarn.exceptions.YarnException
IOException

getContainerReport

public abstract org.apache.hadoop.yarn.api.records.ContainerReport getContainerReport(org.apache.hadoop.yarn.api.records.ContainerId containerId)
                                                                               throws org.apache.hadoop.yarn.exceptions.YarnException,
                                                                                      IOException

Get a report of the given Container.

In secure mode, YARN verifies access to the application, queue etc. before accepting the request.

Parameters:
containerId - ContainerId of the container that needs a report
Returns:
container report
Throws:
org.apache.hadoop.yarn.exceptions.YarnException
{@link - ContainerNotFoundException} if container not found
IOException

getContainers

public abstract List<org.apache.hadoop.yarn.api.records.ContainerReport> getContainers(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId)
                                                                                throws org.apache.hadoop.yarn.exceptions.YarnException,
                                                                                       IOException

Get a report of all (Containers) of ApplicationAttempt in the cluster.

Parameters:
applicationAttemptId -
Returns:
a list of reports of all containers for specified application attempt
Throws:
org.apache.hadoop.yarn.exceptions.YarnException
IOException


Copyright © 2014 Apache Software Foundation. All Rights Reserved.