Class GlobalPolicyGenerator

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

public class GlobalPolicyGenerator extends org.apache.hadoop.service.CompositeService
Global Policy Generator (GPG) is a Yarn Federation component. By tuning the Federation policies in Federation State Store, GPG overlooks the entire federated cluster and ensures that the system is tuned and balanced all the time. The GPG operates continuously but out-of-band from all cluster operations, that allows to enforce global invariants, affect load balancing, trigger draining of sub-clusters that will undergo maintenance, etc.
  • 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
    Modifier and Type
    Field
    Description
    static final org.slf4j.Logger
     
    static final int
     

    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
    protected void
     
     
    static long
     
     
    org.apache.hadoop.yarn.webapp.WebApp
     
    protected void
    initAndStart(org.apache.hadoop.conf.Configuration conf, boolean hasToReboot)
     
    static void
    main(String[] argv)
     
    protected void
    serviceInit(org.apache.hadoop.conf.Configuration conf)
     
    protected void
     
    protected void
     
    void
    setConfig(org.apache.hadoop.conf.Configuration conf)
     
    static void
    startGPG(String[] argv, org.apache.hadoop.conf.Configuration conf)
     
    void
     

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

    addIfService, addService, getServices, removeService

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

    close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, 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

    • LOG

      public static final org.slf4j.Logger LOG
    • SHUTDOWN_HOOK_PRIORITY

      public static final int SHUTDOWN_HOOK_PRIORITY
      See Also:
  • Constructor Details

    • GlobalPolicyGenerator

      public GlobalPolicyGenerator()
  • Method Details

    • doSecureLogin

      protected void doSecureLogin() throws IOException
      Throws:
      IOException
    • initAndStart

      protected void initAndStart(org.apache.hadoop.conf.Configuration conf, boolean hasToReboot)
    • serviceInit

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

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

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

      public String getName()
      Specified by:
      getName in interface org.apache.hadoop.service.Service
      Overrides:
      getName in class org.apache.hadoop.service.AbstractService
    • getGPGContext

      public GPGContext getGPGContext()
    • startWepApp

      @VisibleForTesting public void startWepApp()
    • startGPG

      public static void startGPG(String[] argv, org.apache.hadoop.conf.Configuration conf)
    • main

      public static void main(String[] argv)
    • getGPGStartupTime

      public static long getGPGStartupTime()
    • getWebApp

      @VisibleForTesting public org.apache.hadoop.yarn.webapp.WebApp getWebApp()
    • setConfig

      public void setConfig(org.apache.hadoop.conf.Configuration conf)
      Overrides:
      setConfig in class org.apache.hadoop.service.AbstractService