Class PortProbe
java.lang.Object
org.apache.hadoop.yarn.service.monitor.probe.Probe
org.apache.hadoop.yarn.service.monitor.probe.DefaultProbe
org.apache.hadoop.yarn.service.monitor.probe.PortProbe
- All Implemented Interfaces:
MonitorKeys
A probe that checks whether a container has a specified port open. This
probe also performs the checks of the
DefaultProbe. Additional
configurable properties include:
port - required port for socket connection
timeout - connection timeout (default 1000)-
Field Summary
FieldsFields 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 TypeMethodDescriptionstatic PortProbeping(ComponentInstance instance) Try to connect to the (host,port); a failure to connect within the specified timeout is a failure.Methods inherited from class org.apache.hadoop.yarn.service.monitor.probe.DefaultProbe
create, isDnsCheckEnabledMethods inherited from class org.apache.hadoop.yarn.service.monitor.probe.Probe
getName, getProperty, getPropertyBool, getPropertyInt, init, setName, toString
-
Field Details
-
log
protected static final org.slf4j.Logger log
-
-
Constructor Details
-
PortProbe
-
-
Method Details
-
create
- Throws:
IOException
-
ping
Try to connect to the (host,port); a failure to connect within the specified timeout is a failure.- Overrides:
pingin classDefaultProbe- Parameters:
instance- role instance- Returns:
- the outcome
-