public class GcTracker extends Object
Modifier and Type | Field and Description |
---|---|
static IntConfOption |
LAST_GCS_TO_KEEP
How many last gcs to keep
|
Constructor and Description |
---|
GcTracker()
Constructor with default number of last gcs to keep
|
GcTracker(org.apache.hadoop.conf.Configuration conf)
Constructor with configuration
|
Modifier and Type | Method and Description |
---|---|
void |
gcOccurred(com.sun.management.GcInfo gcInfo)
Called to notify gc tracker that gc occurred
|
long |
gcTimeSpentSince(long timeSinceJvmStarted)
Check how much time was spent doing gc since some timestamp
|
public static final IntConfOption LAST_GCS_TO_KEEP
public GcTracker()
public GcTracker(org.apache.hadoop.conf.Configuration conf)
conf
- Configurationpublic void gcOccurred(com.sun.management.GcInfo gcInfo)
gcInfo
- GC infopublic long gcTimeSpentSince(long timeSinceJvmStarted)
timeSinceJvmStarted
- Timestamp to measure from, you can use
ManagementFactory.getRuntimeMXBean().getUptime() to get itCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.