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.CompositeServiceShutdownHookNested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.slf4j.Loggerstatic final intFields inherited from class org.apache.hadoop.service.CompositeService
STOP_ONLY_STARTED_SERVICES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidstatic longgetName()org.apache.hadoop.yarn.webapp.WebAppprotected voidinitAndStart(org.apache.hadoop.conf.Configuration conf, boolean hasToReboot) static voidprotected voidserviceInit(org.apache.hadoop.conf.Configuration conf) protected voidprotected voidvoidsetConfig(org.apache.hadoop.conf.Configuration conf) static voidvoidMethods inherited from class org.apache.hadoop.service.CompositeService
addIfService, addService, getServices, removeServiceMethods 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
-
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
- Throws:
IOException
-
initAndStart
protected void initAndStart(org.apache.hadoop.conf.Configuration conf, boolean hasToReboot) -
serviceInit
- Overrides:
serviceInitin classorg.apache.hadoop.service.CompositeService- Throws:
Exception
-
serviceStart
- Overrides:
serviceStartin classorg.apache.hadoop.service.CompositeService- Throws:
Exception
-
serviceStop
- Overrides:
serviceStopin classorg.apache.hadoop.service.CompositeService- Throws:
Exception
-
getName
- Specified by:
getNamein interfaceorg.apache.hadoop.service.Service- Overrides:
getNamein classorg.apache.hadoop.service.AbstractService
-
getGPGContext
-
startWepApp
@VisibleForTesting public void startWepApp() -
startGPG
-
main
-
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:
setConfigin classorg.apache.hadoop.service.AbstractService
-