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

public class MetricsInvariantChecker extends InvariantsChecker
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 Details

  • Constructor Details

    • MetricsInvariantChecker

      public MetricsInvariantChecker()
  • Method Details

    • init

      public void init(org.apache.hadoop.conf.Configuration config, RMContext rmContext, ResourceScheduler scheduler)
      Specified by:
      init in interface SchedulingEditPolicy
      Overrides:
      init in class InvariantsChecker
    • editSchedule

      public void editSchedule()
      Description copied from interface: SchedulingEditPolicy
      This 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.