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, Service

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract class AHSClient
extends AbstractService


Constructor Summary
AHSClient(String name)
           
 
Method Summary
static AHSClient createAHSClient()
          Create a new instance of AHSClient.
abstract  ApplicationAttemptReport getApplicationAttemptReport(ApplicationAttemptId applicationAttemptId)
           Get a report of the given ApplicationAttempt.
abstract  List<ApplicationAttemptReport> getApplicationAttempts(ApplicationId applicationId)
           Get a report of all (ApplicationAttempts) of Application in the cluster.
abstract  ApplicationReport getApplicationReport(ApplicationId appId)
           Get a report of the given Application.
abstract  List<ApplicationReport> getApplications()
           Get a report (ApplicationReport) of all Applications in the cluster.
abstract  ContainerReport getContainerReport(ContainerId containerId)
           Get a report of the given Container.
abstract  List<ContainerReport> getContainers(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 ApplicationReport getApplicationReport(ApplicationId appId)
                                                throws 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:
YarnException
IOException

getApplications

public abstract List<ApplicationReport> getApplications()
                                                 throws 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:
YarnException
IOException

getApplicationAttemptReport

public abstract ApplicationAttemptReport getApplicationAttemptReport(ApplicationAttemptId applicationAttemptId)
                                                              throws 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:
YarnException
{@link - ApplicationAttemptNotFoundException} if application attempt not found
IOException

getApplicationAttempts

public abstract List<ApplicationAttemptReport> getApplicationAttempts(ApplicationId applicationId)
                                                               throws 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:
YarnException
IOException

getContainerReport

public abstract ContainerReport getContainerReport(ContainerId containerId)
                                            throws 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:
YarnException
{@link - ContainerNotFoundException} if container not found
IOException

getContainers

public abstract List<ContainerReport> getContainers(ApplicationAttemptId applicationAttemptId)
                                             throws 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:
YarnException
IOException


Copyright © 2014 Apache Software Foundation. All Rights Reserved.