Class MetricsInvariantChecker
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.monitor.invariants.InvariantsChecker
org.apache.hadoop.yarn.server.resourcemanager.monitor.invariants.MetricsInvariantChecker
- All Implemented Interfaces:
SchedulingEditPolicy
This policy checks at every invocation that a given set of invariants
(specified in a file) are respected over QueueMetrics and JvmMetrics. The
file may contain arbitrary (Javascrip) boolean expression over the metrics
variables.
The right set of invariants depends on the deployment environment, a large
number of complex invariant can make this check expensive.
The MetricsInvariantChecker can be configured to throw a RuntimeException or
simlpy warn in the logs if an invariant is not respected.
-
Field Summary
FieldsFields inherited from class org.apache.hadoop.yarn.server.resourcemanager.monitor.invariants.InvariantsChecker
INVARIANT_MONITOR_INTERVAL, THROW_ON_VIOLATION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method is invoked at regular intervals.voidinit(org.apache.hadoop.conf.Configuration config, RMContext rmContext, ResourceScheduler scheduler) Methods inherited from class org.apache.hadoop.yarn.server.resourcemanager.monitor.invariants.InvariantsChecker
getConf, getContext, getMonitoringInterval, getPolicyName, getScheduler, getThrowOnInvariantViolation, logOrThrow
-
Field Details
-
INVARIANTS_FILE
- See Also:
-
-
Constructor Details
-
MetricsInvariantChecker
public MetricsInvariantChecker()
-
-
Method Details
-
init
public void init(org.apache.hadoop.conf.Configuration config, RMContext rmContext, ResourceScheduler scheduler) - Specified by:
initin interfaceSchedulingEditPolicy- Overrides:
initin classInvariantsChecker
-
editSchedule
public void editSchedule()Description copied from interface:SchedulingEditPolicyThis method is invoked at regular intervals. Internally the policy is allowed to track containers and affect the scheduler. The "actions" performed are passed back through an EventHandler.
-