org.apache.hadoop.mapred.gridmix.emulators.resourceusage
Class ResourceUsageMatcher

java.lang.Object
  extended by org.apache.hadoop.mapred.gridmix.emulators.resourceusage.ResourceUsageMatcher
All Implemented Interfaces:
Progressive

public class ResourceUsageMatcher
extends Object
implements Progressive

This is the driver class for managing all the resource usage emulators. ResourceUsageMatcher expects a comma separated list of ResourceUsageEmulatorPlugin implementations specified using RESOURCE_USAGE_EMULATION_PLUGINS as the configuration parameter.

Note that the order in which the emulators are invoked is same as the order in which they are configured.


Field Summary
static String RESOURCE_USAGE_EMULATION_PLUGINS
          Configuration key to set resource usage emulators.
 
Constructor Summary
ResourceUsageMatcher()
           
 
Method Summary
 void configure(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.yarn.util.ResourceCalculatorPlugin monitor, org.apache.hadoop.tools.rumen.ResourceUsageMetrics metrics, Progressive progress)
          Configure the ResourceUsageMatcher to load the configured plugins and initialize them.
 float getProgress()
          Returns the average progress.
 void matchResourceUsage()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE_USAGE_EMULATION_PLUGINS

public static final String RESOURCE_USAGE_EMULATION_PLUGINS
Configuration key to set resource usage emulators.

See Also:
Constant Field Values
Constructor Detail

ResourceUsageMatcher

public ResourceUsageMatcher()
Method Detail

configure

public void configure(org.apache.hadoop.conf.Configuration conf,
                      org.apache.hadoop.yarn.util.ResourceCalculatorPlugin monitor,
                      org.apache.hadoop.tools.rumen.ResourceUsageMetrics metrics,
                      Progressive progress)
Configure the ResourceUsageMatcher to load the configured plugins and initialize them.


matchResourceUsage

public void matchResourceUsage()
                        throws IOException,
                               InterruptedException
Throws:
IOException
InterruptedException

getProgress

public float getProgress()
Returns the average progress.

Specified by:
getProgress in interface Progressive


Copyright © 2014 Apache Software Foundation. All Rights Reserved.