java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.yarn.util.AbstractLivelinessMonitor<RMAppToMonitor>
org.apache.hadoop.yarn.server.resourcemanager.rmapp.monitor.RMAppLifetimeMonitor
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.service.Service

public class RMAppLifetimeMonitor extends org.apache.hadoop.yarn.util.AbstractLivelinessMonitor<RMAppToMonitor>
This service will monitor the applications against the lifetime value given. The applications will be killed if it running beyond the given time.
  • Nested Class Summary

    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.yarn.util.AbstractLivelinessMonitor

    DEFAULT_EXPIRE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    expire(RMAppToMonitor monitoredAppKey)
     
    void
    registerApp(org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.yarn.api.records.ApplicationTimeoutType timeoutType, long expireTime)
     
    protected void
    serviceInit(org.apache.hadoop.conf.Configuration conf)
     
    void
    unregisterApp(org.apache.hadoop.yarn.api.records.ApplicationId appId, Set<org.apache.hadoop.yarn.api.records.ApplicationTimeoutType> timeoutTypes)
     
    void
    unregisterApp(org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.yarn.api.records.ApplicationTimeoutType timeoutType)
     
    void
    updateApplicationTimeouts(org.apache.hadoop.yarn.api.records.ApplicationId appId, Map<org.apache.hadoop.yarn.api.records.ApplicationTimeoutType,Long> timeouts)
     

    Methods inherited from class org.apache.hadoop.yarn.util.AbstractLivelinessMonitor

    getExpireInterval, receivedPing, register, register, resetTimer, serviceStart, serviceStop, setExpireInterval, setMonitorInterval, setResetTimeOnStart, unregister

    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

    • RMAppLifetimeMonitor

      public RMAppLifetimeMonitor(RMContext rmContext)
  • 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
    • expire

      protected void expire(RMAppToMonitor monitoredAppKey)
      Specified by:
      expire in class org.apache.hadoop.yarn.util.AbstractLivelinessMonitor<RMAppToMonitor>
    • registerApp

      public void registerApp(org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.yarn.api.records.ApplicationTimeoutType timeoutType, long expireTime)
    • unregisterApp

      public void unregisterApp(org.apache.hadoop.yarn.api.records.ApplicationId appId, org.apache.hadoop.yarn.api.records.ApplicationTimeoutType timeoutType)
    • unregisterApp

      public void unregisterApp(org.apache.hadoop.yarn.api.records.ApplicationId appId, Set<org.apache.hadoop.yarn.api.records.ApplicationTimeoutType> timeoutTypes)
    • updateApplicationTimeouts

      public void updateApplicationTimeouts(org.apache.hadoop.yarn.api.records.ApplicationId appId, Map<org.apache.hadoop.yarn.api.records.ApplicationTimeoutType,Long> timeouts)