org.apache.hadoop.mapred.gridmix.emulators.resourceusage
Interface ResourceUsageEmulatorPlugin

All Superinterfaces:
Progressive
All Known Implementing Classes:
CumulativeCpuUsageEmulatorPlugin, TotalHeapUsageEmulatorPlugin

public interface ResourceUsageEmulatorPlugin
extends Progressive

Each resource to be emulated should have a corresponding implementation class that implements ResourceUsageEmulatorPlugin.



ResourceUsageEmulatorPlugin will be configured using the initialize(Configuration, ResourceUsageMetrics, ResourceCalculatorPlugin, Progressive) call. Every ResourceUsageEmulatorPlugin is also configured with a feedback module i.e a ResourceCalculatorPlugin, to monitor the current resource usage. ResourceUsageMetrics decides the final resource usage value to emulate. Progressive keeps track of the task's progress.



For configuring GridMix to load and and use a resource usage emulator, see ResourceUsageMatcher.


Method Summary
 void emulate()
          Emulate the resource usage to match the usage target.
 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 interface org.apache.hadoop.mapred.gridmix.Progressive
getProgress
 

Method Detail

initialize

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. This might involve - initializing the variables - calibrating the plugin


emulate

void emulate()
             throws IOException,
                    InterruptedException
Emulate the resource usage to match the usage target. The plugin can use the given ResourceCalculatorPlugin to query for the current resource usage.

Throws:
IOException
InterruptedException


Copyright © 2014 Apache Software Foundation. All Rights Reserved.