java.lang.Object
org.apache.hadoop.yarn.service.monitor.probe.ProbeStatus
All Implemented Interfaces:
Serializable

public final class ProbeStatus extends Object implements Serializable
Status message of a probe. This is designed to be sent over the wire, though the exception Had better be unserializable at the far end if that is to work.
See Also:
  • Constructor Details

    • ProbeStatus

      public ProbeStatus()
    • ProbeStatus

      public ProbeStatus(long timestamp, String message, Throwable thrown)
    • ProbeStatus

      public ProbeStatus(long timestamp, String message)
  • Method Details

    • getTimestamp

      public long getTimestamp()
    • setTimestamp

      public void setTimestamp(long timestamp)
    • isSuccess

      public boolean isSuccess()
    • setSuccess

      public void setSuccess(boolean success)
      Set both the success and the real outcome bits to the same value
      Parameters:
      success - the new value
    • getTimestampText

      public String getTimestampText()
    • getRealOutcome

      public boolean getRealOutcome()
    • getMessage

      public String getMessage()
    • setMessage

      public void setMessage(String message)
    • getThrown

      public Throwable getThrown()
    • setThrown

      public void setThrown(Throwable thrown)
    • getOriginator

      public Probe getOriginator()
      Get the probe that generated this result. May be null
      Returns:
      a possibly null reference to a probe
    • succeed

      public void succeed(Probe probe)
      The probe has succeeded -capture the current timestamp, set success to true, and record any other data needed.
      Parameters:
      probe - probe
    • fail

      public void fail(Probe probe, Throwable thrown)
      A probe has failed either because the test returned false, or an exception was thrown. The success field is set to false, any exception thrown is recorded.
      Parameters:
      probe - probe that failed
      thrown - an exception that was thrown.
    • finish

      public void finish(Probe probe, boolean succeeded, String text, Throwable thrown)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • markAsSuccessful

      public void markAsSuccessful()
      Flip the success bit on while the real outcome bit is kept false