@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 |
private static String |
INFO_THRESHOLD_KEY |
private long |
infoThresholdMs
log INFO if we detect a pause longer than this threshold
|
private static org.apache.commons.logging.Log |
LOG |
private Thread |
monitorThread |
private boolean |
shouldRun |
private static long |
SLEEP_INTERVAL_MS
The target sleep time
|
private static long |
WARN_THRESHOLD_DEFAULT |
private 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) |
Modifier and Type | Method and Description |
---|---|
private String |
formatMessage(long extraSleepTime,
Map<String,JvmPauseMonitor.GcTimes> gcTimesAfterSleep,
Map<String,JvmPauseMonitor.GcTimes> gcTimesBeforeSleep) |
private Map<String,JvmPauseMonitor.GcTimes> |
getGcTimes() |
static void |
main(String[] args)
Simple 'main' to facilitate manual testing of the pause monitor.
|
void |
start() |
void |
stop() |
private static final org.apache.commons.logging.Log LOG
private static final long SLEEP_INTERVAL_MS
private final long warnThresholdMs
private static final String WARN_THRESHOLD_KEY
private static final long WARN_THRESHOLD_DEFAULT
private final long infoThresholdMs
private static final String INFO_THRESHOLD_KEY
private static final long INFO_THRESHOLD_DEFAULT
private Thread monitorThread
private volatile boolean shouldRun
public JvmPauseMonitor(org.apache.hadoop.conf.Configuration conf)
public void start()
public void stop()
private String formatMessage(long extraSleepTime, Map<String,JvmPauseMonitor.GcTimes> gcTimesAfterSleep, Map<String,JvmPauseMonitor.GcTimes> gcTimesBeforeSleep)
private Map<String,JvmPauseMonitor.GcTimes> getGcTimes()
public static void main(String[] args) throws Exception
Exception
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.