Class HttpProbe
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.HttpProbe
- All Implemented Interfaces:
MonitorKeys
A probe that checks whether a successful HTTP response code can be obtained
from a container. A well-formed URL must be provided. The URL is intended
to contain a token ${THIS_HOST} that will be replaced by the IP of the
container. This probe also performs the checks of the
DefaultProbe.
Additional configurable properties include:
url - required URL for HTTP connection, e.g. http://${THIS_HOST}:8080
timeout - connection timeout (default 1000)
min.success - minimum response code considered successful (default 200)
max.success - maximum response code considered successful (default 299)-
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 HttpProbeping(ComponentInstance instance) Ping the endpoint.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
-
HttpProbe
-
-
Method Details
-
create
- Throws:
IOException
-
ping
Description copied from class:ProbePing the endpoint. All exceptions must be caught and included in the (failure) status.- Overrides:
pingin classDefaultProbe- Parameters:
instance- instance to ping- Returns:
- the status
-