|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.mapred.gridmix.emulators.resourceusage.TotalHeapUsageEmulatorPlugin
public class TotalHeapUsageEmulatorPlugin
A ResourceUsageEmulatorPlugin that emulates the total heap
usage by loading the JVM heap memory. Adding smaller chunks of data to the
heap will essentially use up some heap space thus forcing the JVM to expand
its heap and thus resulting into increase in the heap usage.
TotalHeapUsageEmulatorPlugin emulates the heap usage in steps.
The frequency of emulation can be configured via
HEAP_EMULATION_PROGRESS_INTERVAL.
Heap usage values are matched via emulation only at specific interval
boundaries.
TotalHeapUsageEmulatorPlugin is a wrapper program for managing
the heap usage emulation feature. It internally uses an emulation algorithm
(called as core and described using TotalHeapUsageEmulatorPlugin.HeapUsageEmulatorCore) for
performing the actual emulation. Multiple calls to this core engine should
use up some amount of heap.
| Nested Class Summary | |
|---|---|
static class |
TotalHeapUsageEmulatorPlugin.DefaultHeapUsageEmulator
This is the core engine to emulate the heap usage. |
static interface |
TotalHeapUsageEmulatorPlugin.HeapUsageEmulatorCore
Defines the core heap usage emulation algorithm. |
| Field Summary | |
|---|---|
protected TotalHeapUsageEmulatorPlugin.HeapUsageEmulatorCore |
emulatorCore
|
static String |
HEAP_EMULATION_PROGRESS_INTERVAL
The frequency (based on task progress) with which memory-emulation code is run. |
static String |
HEAP_LOAD_RATIO
Determines the unit increase per call to the core engine's load API. |
static String |
MIN_HEAP_FREE_RATIO
The minimum buffer reserved for other non-emulation activities. |
static int |
ONE_MB
|
| Constructor Summary | |
|---|---|
TotalHeapUsageEmulatorPlugin()
|
|
TotalHeapUsageEmulatorPlugin(TotalHeapUsageEmulatorPlugin.HeapUsageEmulatorCore core)
For testing. |
|
| Method Summary | |
|---|---|
void |
emulate()
Emulate the resource usage to match the usage target. |
protected long |
getMaxHeapUsageInMB()
|
float |
getProgress()
|
protected long |
getTotalHeapUsageInMB()
|
void |
initialize(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.tools.rumen.ResourceUsageMetrics metrics,
org.apache.hadoop.yarn.util.ResourceCalculatorPlugin monitor,
Progressive progress)
Initialize the plugin. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected TotalHeapUsageEmulatorPlugin.HeapUsageEmulatorCore emulatorCore
public static final String HEAP_EMULATION_PROGRESS_INTERVAL
DEFAULT_EMULATION_PROGRESS_INTERVAL.
public static final String MIN_HEAP_FREE_RATIO
public static final String HEAP_LOAD_RATIO
public static final int ONE_MB
| Constructor Detail |
|---|
public TotalHeapUsageEmulatorPlugin()
public TotalHeapUsageEmulatorPlugin(TotalHeapUsageEmulatorPlugin.HeapUsageEmulatorCore core)
| Method Detail |
|---|
protected long getTotalHeapUsageInMB()
protected long getMaxHeapUsageInMB()
public float getProgress()
getProgress in interface Progressive
public void emulate()
throws IOException,
InterruptedException
ResourceUsageEmulatorPluginResourceCalculatorPlugin to query for the current
resource usage.
emulate in interface ResourceUsageEmulatorPluginIOException
InterruptedException
public void initialize(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.tools.rumen.ResourceUsageMetrics metrics,
org.apache.hadoop.yarn.util.ResourceCalculatorPlugin monitor,
Progressive progress)
ResourceUsageEmulatorPlugin
initialize in interface ResourceUsageEmulatorPlugin
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||