Class AHSClientImpl

java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.yarn.client.api.AHSClient
org.apache.hadoop.yarn.client.api.impl.AHSClientImpl
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.service.Service

@Private @Unstable public class AHSClientImpl extends AHSClient
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service

    org.apache.hadoop.service.Service.STATE
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
    protected org.apache.hadoop.yarn.api.ApplicationHistoryProtocol
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.hadoop.yarn.api.records.ApplicationAttemptReport
    getApplicationAttemptReport(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId)
    Get a report of the given ApplicationAttempt.
    List<org.apache.hadoop.yarn.api.records.ApplicationAttemptReport>
    getApplicationAttempts(org.apache.hadoop.yarn.api.records.ApplicationId appId)
    Get a report of all (ApplicationAttempts) of Application 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.ApplicationReport>
    Get a report (ApplicationReport) of all Applications in the cluster.
    org.apache.hadoop.yarn.api.records.ContainerReport
    getContainerReport(org.apache.hadoop.yarn.api.records.ContainerId containerId)
    Get a report of the given Container.
    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.
    protected void
    serviceInit(org.apache.hadoop.conf.Configuration conf)
     
    protected void
     
    protected void
     

    Methods inherited from class org.apache.hadoop.yarn.client.api.AHSClient

    createAHSClient, createAHSv2Client

    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, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • ahsClient

      protected org.apache.hadoop.yarn.api.ApplicationHistoryProtocol ahsClient
    • ahsAddress

      protected InetSocketAddress ahsAddress
  • Constructor Details

    • AHSClientImpl

      public AHSClientImpl()
  • Method Details

    • serviceInit

      protected void serviceInit(org.apache.hadoop.conf.Configuration conf) throws Exception
      Overrides:
      serviceInit in class org.apache.hadoop.service.AbstractService
      Throws:
      Exception
    • serviceStart

      protected void serviceStart() throws Exception
      Overrides:
      serviceStart in class org.apache.hadoop.service.AbstractService
      Throws:
      Exception
    • serviceStop

      protected void serviceStop() throws Exception
      Overrides:
      serviceStop in class org.apache.hadoop.service.AbstractService
      Throws:
      Exception
    • getApplicationReport

      public org.apache.hadoop.yarn.api.records.ApplicationReport getApplicationReport(org.apache.hadoop.yarn.api.records.ApplicationId appId) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Description copied from class: AHSClient
      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:

      • host - set to "N/A"
      • RPC port - set to -1
      • client token - set to "N/A"
      • diagnostics - set to "N/A"
      • tracking URL - set to "N/A"
      • original tracking URL - set to "N/A"
      • resource usage report - all values are -1
      Specified by:
      getApplicationReport in class AHSClient
      Parameters:
      appId - ApplicationId of the application that needs a report
      Returns:
      application report
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getApplications

      public List<org.apache.hadoop.yarn.api.records.ApplicationReport> getApplications() throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Description copied from class: AHSClient

      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 AHSClient.getApplicationReport(ApplicationId).

      Specified by:
      getApplications in class AHSClient
      Returns:
      a list of reports for all applications
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getApplicationAttemptReport

      public org.apache.hadoop.yarn.api.records.ApplicationAttemptReport getApplicationAttemptReport(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Description copied from class: AHSClient

      Get a report of the given ApplicationAttempt.

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

      Specified by:
      getApplicationAttemptReport in class AHSClient
      Parameters:
      applicationAttemptId - ApplicationAttemptId of the application attempt that needs a report
      Returns:
      application attempt report
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      org.apache.hadoop.yarn.exceptions.ApplicationAttemptNotFoundException - if application attempt not found
      IOException
    • getApplicationAttempts

      public List<org.apache.hadoop.yarn.api.records.ApplicationAttemptReport> getApplicationAttempts(org.apache.hadoop.yarn.api.records.ApplicationId appId) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Description copied from class: AHSClient

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

      Specified by:
      getApplicationAttempts in class AHSClient
      Returns:
      a list of reports for all application attempts for specified application
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getContainerReport

      public org.apache.hadoop.yarn.api.records.ContainerReport getContainerReport(org.apache.hadoop.yarn.api.records.ContainerId containerId) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Description copied from class: AHSClient

      Get a report of the given Container.

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

      Specified by:
      getContainerReport in class AHSClient
      Parameters:
      containerId - ContainerId of the container that needs a report
      Returns:
      container report
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      org.apache.hadoop.yarn.exceptions.ContainerNotFoundException - if container not found
      IOException
    • getContainers

      public 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
      Description copied from class: AHSClient

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

      Specified by:
      getContainers in class AHSClient
      Returns:
      a list of reports of all containers for specified application attempt
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException