Class ProbeStatus
java.lang.Object
org.apache.hadoop.yarn.service.monitor.probe.ProbeStatus
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionProbeStatus(long timestamp, String message) ProbeStatus(long timestamp, String message, Throwable thrown) -
Method Summary
Modifier and TypeMethodDescriptionvoidA probe has failed either because the test returned false, or an exception was thrown.voidGet the probe that generated this result.booleanlongbooleanvoidFlip the success bit on while the real outcome bit is kept falsevoidsetMessage(String message) voidsetSuccess(boolean success) Set both the success and the real outcome bits to the same valuevoidvoidsetTimestamp(long timestamp) voidThe probe has succeeded -capture the current timestamp, set success to true, and record any other data needed.toString()
-
Constructor Details
-
ProbeStatus
public ProbeStatus() -
ProbeStatus
-
ProbeStatus
-
-
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
-
getRealOutcome
public boolean getRealOutcome() -
getMessage
-
setMessage
-
getThrown
-
setThrown
-
getOriginator
Get the probe that generated this result. May be null- Returns:
- a possibly null reference to a probe
-
succeed
The probe has succeeded -capture the current timestamp, set success to true, and record any other data needed.- Parameters:
probe- probe
-
fail
A probe has failed either because the test returned false, or an exception was thrown. Thesuccessfield is set to false, any exception thrown is recorded.- Parameters:
probe- probe that failedthrown- an exception that was thrown.
-
finish
-
toString
-
markAsSuccessful
public void markAsSuccessful()Flip the success bit on while the real outcome bit is kept false
-