Class RemoteAppChecker

java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.service.CompositeService
org.apache.hadoop.yarn.server.sharedcachemanager.AppChecker
org.apache.hadoop.yarn.server.sharedcachemanager.RemoteAppChecker
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.service.Service

@Private @Unstable public class RemoteAppChecker extends AppChecker
An implementation of AppChecker that queries the resource manager remotely to determine whether the app is running.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.hadoop.service.CompositeService

    org.apache.hadoop.service.CompositeService.CompositeServiceShutdownHook

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

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

    Fields inherited from class org.apache.hadoop.service.CompositeService

    STOP_ONLY_STARTED_SERVICES
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Collection<org.apache.hadoop.yarn.api.records.ApplicationId>
    Returns the list of all active apps at the given time.
    boolean
    isApplicationActive(org.apache.hadoop.yarn.api.records.ApplicationId id)
    Returns whether the app is in an active state.
    protected void
    serviceInit(org.apache.hadoop.conf.Configuration conf)
     

    Methods inherited from class org.apache.hadoop.service.CompositeService

    addIfService, addService, getServices, removeService, serviceStart, serviceStop

    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

    • RemoteAppChecker

      public RemoteAppChecker()
  • Method Details

    • serviceInit

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

      @Private public boolean isApplicationActive(org.apache.hadoop.yarn.api.records.ApplicationId id) throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from class: AppChecker
      Returns whether the app is in an active state.
      Specified by:
      isApplicationActive in class AppChecker
      Returns:
      true if the app is found and is not in one of the completed states; false otherwise
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if there is an error in determining the app state
    • getActiveApplications

      @Private public Collection<org.apache.hadoop.yarn.api.records.ApplicationId> getActiveApplications() throws org.apache.hadoop.yarn.exceptions.YarnException
      Description copied from class: AppChecker
      Returns the list of all active apps at the given time.
      Specified by:
      getActiveApplications in class AppChecker
      Returns:
      the list of active apps, or an empty list if there is none
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - if there is an error in obtaining the list