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.
ResourceUsageMatcher
.Modifier and Type | Method and Description |
---|---|
void |
emulate()
Emulate the resource usage to match the usage target.
|
void |
initialize(Configuration conf,
ResourceUsageMetrics metrics,
ResourceCalculatorPlugin monitor,
Progressive progress)
Initialize the plugin.
|
getProgress
void initialize(Configuration conf, ResourceUsageMetrics metrics, ResourceCalculatorPlugin monitor, Progressive progress)
void emulate() throws IOException, InterruptedException
ResourceCalculatorPlugin
to query for the current
resource usage.IOException
InterruptedException
Copyright © 2013 Apache Software Foundation. All rights reserved.