@InterfaceAudience.Private public class JvmPauseMonitor extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
JvmPauseMonitor.GcTimes |
private class |
JvmPauseMonitor.Monitor |
Modifier and Type | Field and Description |
---|---|
private static long |
INFO_THRESHOLD_DEFAULT |
static String |
INFO_THRESHOLD_KEY |
private long |
infoThresholdMs
log INFO if we detect a pause longer than this threshold
|
private static org.slf4j.Logger |
LOG |
private JvmPauseMonitorSource |
metricsSource |
private Thread |
monitorThread |
private boolean |
shouldRun |
private static long |
SLEEP_INTERVAL_MS
The target sleep time
|
private static long |
WARN_THRESHOLD_DEFAULT |
static String |
WARN_THRESHOLD_KEY |
private long |
warnThresholdMs
log WARN if we detect a pause longer than this threshold
|
Constructor and Description |
---|
JvmPauseMonitor(org.apache.hadoop.conf.Configuration conf) |
JvmPauseMonitor(org.apache.hadoop.conf.Configuration conf,
JvmPauseMonitorSource metricsSource) |
Modifier and Type | Method and Description |
---|---|
private String |
formatMessage(long extraSleepTime,
List<String> gcDiffs) |
private Map<String,JvmPauseMonitor.GcTimes> |
getGcTimes() |
JvmPauseMonitorSource |
getMetricsSource() |
static void |
main(String[] args)
Simple 'main' to facilitate manual testing of the pause monitor.
|
void |
setMetricsSource(JvmPauseMonitorSource metricsSource) |
void |
start() |
void |
stop() |
void |
updateMetrics(long sleepTime,
boolean gcDetected) |
private static final org.slf4j.Logger LOG
private static final long SLEEP_INTERVAL_MS
private final long warnThresholdMs
public static final String WARN_THRESHOLD_KEY
private static final long WARN_THRESHOLD_DEFAULT
private final long infoThresholdMs
public static final String INFO_THRESHOLD_KEY
private static final long INFO_THRESHOLD_DEFAULT
private Thread monitorThread
private volatile boolean shouldRun
private JvmPauseMonitorSource metricsSource
public JvmPauseMonitor(org.apache.hadoop.conf.Configuration conf)
public JvmPauseMonitor(org.apache.hadoop.conf.Configuration conf, JvmPauseMonitorSource metricsSource)
public void start()
public void stop()
private String formatMessage(long extraSleepTime, List<String> gcDiffs)
private Map<String,JvmPauseMonitor.GcTimes> getGcTimes()
public void updateMetrics(long sleepTime, boolean gcDetected)
public JvmPauseMonitorSource getMetricsSource()
public void setMetricsSource(JvmPauseMonitorSource metricsSource)
public static void main(String[] args) throws Exception
Exception
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.