Class ExceptionReporter

java.lang.Object
org.apache.hadoop.yarn.server.nodemanager.health.ExceptionReporter
All Implemented Interfaces:
HealthReporter

public class ExceptionReporter extends Object implements HealthReporter
Simple HealthReporter implementation which reports whether a fatal exception has happened in the NodeManager. See the reportException call of NodeStatusUpdaterImpl
  • Method Details

    • isHealthy

      public boolean isHealthy()
      Description copied from interface: HealthReporter
      Gets whether the node is healthy or not.
      Specified by:
      isHealthy in interface HealthReporter
      Returns:
      true if node is healthy
    • getHealthReport

      public String getHealthReport()
      Description copied from interface: HealthReporter
      Returns output from health check. If node is healthy then an empty string is returned.
      Specified by:
      getHealthReport in interface HealthReporter
      Returns:
      output from health check
    • getLastHealthReportTime

      public long getLastHealthReportTime()
      Description copied from interface: HealthReporter
      Returns time stamp when node health check was last run.
      Specified by:
      getLastHealthReportTime in interface HealthReporter
      Returns:
      timestamp when node health script was last run
    • reportException

      public void reportException(Exception ex)
      Report an exception to mark the node as unhealthy.
      Parameters:
      ex - the exception that makes the node unhealthy