Class ApplicationHistoryManagerImpl

java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.yarn.server.applicationhistoryservice.ApplicationHistoryManagerImpl
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.service.Service, ApplicationHistoryManager

public class ApplicationHistoryManagerImpl extends org.apache.hadoop.service.AbstractService implements ApplicationHistoryManager
  • Nested Class Summary

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

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    createApplicationHistoryStore(org.apache.hadoop.conf.Configuration conf)
     
    org.apache.hadoop.yarn.api.records.ContainerReport
    getAMContainer(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
    This method returns ContainerReport for specified ApplicationAttemptId.
    org.apache.hadoop.yarn.api.records.ApplicationReport
    getApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId)
    This method returns Application ApplicationReport for the specified ApplicationId.
    org.apache.hadoop.yarn.api.records.ApplicationAttemptReport
    getApplicationAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
    This method returns ApplicationAttemptReport for specified ApplicationId.
    Map<org.apache.hadoop.yarn.api.records.ApplicationAttemptId,org.apache.hadoop.yarn.api.records.ApplicationAttemptReport>
    getApplicationAttempts(org.apache.hadoop.yarn.api.records.ApplicationId appId)
    Application can have multiple application attempts ApplicationAttemptReport.
    Map<org.apache.hadoop.yarn.api.records.ApplicationId,org.apache.hadoop.yarn.api.records.ApplicationReport>
    getApplications(long appsNum, long appStartedTimeBegin, long appStartedTimeEnd)
    This method returns the given number of Application in the given appStartedTime period.
    org.apache.hadoop.yarn.api.records.ContainerReport
    getContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
    This method returns ContainerReport for specified ContainerId.
    Map<org.apache.hadoop.yarn.api.records.ContainerId,org.apache.hadoop.yarn.api.records.ContainerReport>
    getContainers(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
    This method returns Map of ContainerId to ContainerReport for specified ApplicationAttemptId.
     
    protected void
    serviceInit(org.apache.hadoop.conf.Configuration conf)
     
    protected void
     
    protected void
     

    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
  • Constructor Details

    • ApplicationHistoryManagerImpl

      public ApplicationHistoryManagerImpl()
  • 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
    • createApplicationHistoryStore

      protected ApplicationHistoryStore createApplicationHistoryStore(org.apache.hadoop.conf.Configuration conf)
    • getAMContainer

      public org.apache.hadoop.yarn.api.records.ContainerReport getAMContainer(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId) throws IOException
      Description copied from interface: ApplicationHistoryManager
      This method returns ContainerReport for specified ApplicationAttemptId.
      Specified by:
      getAMContainer in interface ApplicationHistoryManager
      Parameters:
      appAttemptId - ApplicationAttemptId
      Returns:
      ContainerReport for ApplicationAttemptId
      Throws:
      IOException
    • getApplications

      public Map<org.apache.hadoop.yarn.api.records.ApplicationId,org.apache.hadoop.yarn.api.records.ApplicationReport> getApplications(long appsNum, long appStartedTimeBegin, long appStartedTimeEnd) throws IOException
      Description copied from interface: ApplicationHistoryManager
      This method returns the given number of Application in the given appStartedTime period. ApplicationReports.
      Specified by:
      getApplications in interface ApplicationHistoryManager
      Returns:
      map of ApplicationId to ApplicationReports.
      Throws:
      IOException
    • getApplication

      public org.apache.hadoop.yarn.api.records.ApplicationReport getApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId) throws IOException
      Description copied from interface: ApplicationHistoryManager
      This method returns Application ApplicationReport for the specified ApplicationId.
      Specified by:
      getApplication in interface ApplicationHistoryManager
      Returns:
      ApplicationReport for the ApplicationId.
      Throws:
      IOException
    • getApplicationAttempt

      public org.apache.hadoop.yarn.api.records.ApplicationAttemptReport getApplicationAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId) throws IOException
      Description copied from interface: ApplicationHistoryManager
      This method returns ApplicationAttemptReport for specified ApplicationId.
      Specified by:
      getApplicationAttempt in interface ApplicationHistoryManager
      Parameters:
      appAttemptId - ApplicationAttemptId
      Returns:
      ApplicationAttemptReport for ApplicationAttemptId
      Throws:
      IOException
    • getApplicationAttempts

      public Map<org.apache.hadoop.yarn.api.records.ApplicationAttemptId,org.apache.hadoop.yarn.api.records.ApplicationAttemptReport> getApplicationAttempts(org.apache.hadoop.yarn.api.records.ApplicationId appId) throws IOException
      Description copied from interface: ApplicationHistoryManager
      Application can have multiple application attempts ApplicationAttemptReport. This method returns the all ApplicationAttemptReports for the Application.
      Specified by:
      getApplicationAttempts in interface ApplicationHistoryManager
      Returns:
      all ApplicationAttemptReports for the Application.
      Throws:
      IOException
    • getContainer

      public org.apache.hadoop.yarn.api.records.ContainerReport getContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId) throws IOException
      Description copied from interface: ApplicationHistoryManager
      This method returns ContainerReport for specified ContainerId.
      Specified by:
      getContainer in interface ApplicationHistoryManager
      Parameters:
      containerId - ContainerId
      Returns:
      ContainerReport for ContainerId
      Throws:
      IOException
    • getContainers

      public Map<org.apache.hadoop.yarn.api.records.ContainerId,org.apache.hadoop.yarn.api.records.ContainerReport> getContainers(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId) throws IOException
      Description copied from interface: ApplicationHistoryManager
      This method returns Map of ContainerId to ContainerReport for specified ApplicationAttemptId.
      Specified by:
      getContainers in interface ApplicationHistoryManager
      Parameters:
      appAttemptId - ApplicationAttemptId
      Returns:
      Map of ContainerId to ContainerReport for ApplicationAttemptId
      Throws:
      IOException
    • getHistoryStore

      @Private @VisibleForTesting public ApplicationHistoryStore getHistoryStore()