Class Probe
java.lang.Object
org.apache.hadoop.yarn.service.monitor.probe.Probe
- All Implemented Interfaces:
MonitorKeys
- Direct Known Subclasses:
DefaultProbe
Base class of all probes.
-
Field Summary
Fields inherited from interface org.apache.hadoop.yarn.service.monitor.probe.MonitorKeys
DEFAULT_PROBE_DNS_ADDRESS, DEFAULT_PROBE_DNS_CHECK_ENABLED, DEFAULT_PROBE_DNS_CHECK_ENABLED_DEFAULT, PORT_PROBE_CONNECT_TIMEOUT, PORT_PROBE_CONNECT_TIMEOUT_DEFAULT, PORT_PROBE_PORT, WEB_PROBE_CONNECT_TIMEOUT, WEB_PROBE_CONNECT_TIMEOUT_DEFAULT, WEB_PROBE_MAX_SUCCESS, WEB_PROBE_MAX_SUCCESS_DEFAULT, WEB_PROBE_MIN_SUCCESS, WEB_PROBE_MIN_SUCCESS_DEFAULT, WEB_PROBE_URL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()static Stringstatic booleangetPropertyBool(Map<String, String> props, String name, boolean defaultValue) static intvoidinit()perform any prelaunch initializationabstract ProbeStatusping(ComponentInstance instance) Ping the endpoint.protected voidtoString()
-
Constructor Details
-
Probe
protected Probe() -
Probe
Create a probe of a specific name- Parameters:
name- probe name
-
-
Method Details
-
setName
-
getName
-
toString
-
getProperty
public static String getProperty(Map<String, String> props, String name, String defaultValue) throws IOException- Throws:
IOException
-
getPropertyInt
public static int getPropertyInt(Map<String, String> props, String name, Integer defaultValue) throws IOException- Throws:
IOException
-
getPropertyBool
-
init
perform any prelaunch initialization- Throws:
IOException
-
ping
Ping the endpoint. All exceptions must be caught and included in the (failure) status.- Parameters:
instance- instance to ping- Returns:
- the status
-