org.apache.hadoop.hbase.util
Class JvmPauseMonitor

java.lang.Object
  extended by org.apache.hadoop.hbase.util.JvmPauseMonitor

@InterfaceAudience.Private
public class JvmPauseMonitor
extends Object

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: ${hadoop-common-project}/hadoop-common/src/main/java/org/apache/hadoop/util/ JvmPauseMonitor.java r1503806 | cmccabe | 2013-07-17 01:48:24 +0800 (Wed, 17 Jul 2013) | 1 line HADOOP-9618. thread which detects GC pauses(Todd Lipcon)


Constructor Summary
JvmPauseMonitor(org.apache.hadoop.conf.Configuration conf)
           
 
Method Summary
static void main(String[] args)
          Simple 'main' to facilitate manual testing of the pause monitor.
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JvmPauseMonitor

public JvmPauseMonitor(org.apache.hadoop.conf.Configuration conf)
Method Detail

start

public void start()

stop

public void stop()

main

public static void main(String[] args)
                 throws Exception
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.

Throws:
Exception


Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.