public class JvmPauseMonitor
Class which sets up a simple thread which runs in a loop sleeping
for a short interval of time. If the sleep takes significantly longer
than its target time, it implies that the JVM or host machine has
paused processing, which may cause other problems. If such a pause is
detected, the thread logs a message.
The original JvmPauseMonitor is:
r1503806 | cmccabe | 2013-07-17 01:48:24 +0800 (Wed, 17 Jul 2013) | 1 line
HADOOP-9618. thread which detects GC pauses(Todd Lipcon)
Simple 'main' to facilitate manual testing of the pause monitor.
This main function just leaks memory into a list. Running this class
with a 1GB heap will very quickly go into "GC hell" and result in
log messages about the GC pauses.