本文整理汇总了Java中org.apache.hadoop.mapred.gridmix.Progressive类的典型用法代码示例。如果您正苦于以下问题:Java Progressive类的具体用法?Java Progressive怎么用?Java Progressive使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Progressive类属于org.apache.hadoop.mapred.gridmix包,在下文中一共展示了Progressive类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initialize
import org.apache.hadoop.mapred.gridmix.Progressive; //导入依赖的package包/类
@Override
public void initialize(Configuration conf, ResourceUsageMetrics metrics,
ResourceCalculatorPlugin monitor,
Progressive progress) {
this.monitor = monitor;
this.progress = progress;
// get the target CPU usage
targetCpuUsage = metrics.getCumulativeCpuUsage();
if (targetCpuUsage <= 0 ) {
enabled = false;
return;
} else {
enabled = true;
}
emulationInterval = conf.getFloat(CPU_EMULATION_PROGRESS_INTERVAL,
DEFAULT_EMULATION_FREQUENCY);
// calibrate the core cpu-usage utility
emulatorCore.calibrate(monitor, targetCpuUsage);
// initialize the states
lastSeenProgress = 0;
lastSeenCpuUsage = 0;
}
开发者ID:naver,项目名称:hadoop,代码行数:27,代码来源:CumulativeCpuUsageEmulatorPlugin.java
示例2: initialize
import org.apache.hadoop.mapred.gridmix.Progressive; //导入依赖的package包/类
@Override
public void initialize(Configuration conf, ResourceUsageMetrics metrics,
ResourceCalculatorPlugin monitor,
Progressive progress) {
this.progress = progress;
// get the target heap usage
targetHeapUsageInMB = metrics.getHeapUsage() / ONE_MB;
if (targetHeapUsageInMB <= 0 ) {
enabled = false;
return;
} else {
// calibrate the core heap-usage utility
emulatorCore.initialize(monitor, targetHeapUsageInMB);
enabled = true;
}
emulationInterval =
conf.getFloat(HEAP_EMULATION_PROGRESS_INTERVAL,
DEFAULT_EMULATION_PROGRESS_INTERVAL);
minFreeHeapRatio = conf.getFloat(MIN_HEAP_FREE_RATIO,
DEFAULT_MIN_FREE_HEAP_RATIO);
heapLoadRatio = conf.getFloat(HEAP_LOAD_RATIO, DEFAULT_HEAP_LOAD_RATIO);
prevEmulationProgress = 0;
}
开发者ID:naver,项目名称:hadoop,代码行数:29,代码来源:TotalHeapUsageEmulatorPlugin.java
示例3: configure
import org.apache.hadoop.mapred.gridmix.Progressive; //导入依赖的package包/类
/**
* Configure the {@link ResourceUsageMatcher} to load the configured plugins
* and initialize them.
*/
@SuppressWarnings("unchecked")
public void configure(Configuration conf, ResourceCalculatorPlugin monitor,
ResourceUsageMetrics metrics, Progressive progress) {
Class[] plugins = conf.getClasses(RESOURCE_USAGE_EMULATION_PLUGINS);
if (plugins == null) {
System.out.println("No resource usage emulator plugins configured.");
} else {
for (Class clazz : plugins) {
if (clazz != null) {
if (ResourceUsageEmulatorPlugin.class.isAssignableFrom(clazz)) {
ResourceUsageEmulatorPlugin plugin =
(ResourceUsageEmulatorPlugin) ReflectionUtils.newInstance(clazz,
conf);
emulationPlugins.add(plugin);
} else {
throw new RuntimeException("Misconfigured resource usage plugins. "
+ "Class " + clazz.getClass().getName() + " is not a resource "
+ "usage plugin as it does not extend "
+ ResourceUsageEmulatorPlugin.class.getName());
}
}
}
}
// initialize the emulators once all the configured emulator plugins are
// loaded
for (ResourceUsageEmulatorPlugin emulator : emulationPlugins) {
emulator.initialize(conf, metrics, monitor, progress);
}
}
开发者ID:naver,项目名称:hadoop,代码行数:35,代码来源:ResourceUsageMatcher.java
示例4: initialize
import org.apache.hadoop.mapred.gridmix.Progressive; //导入依赖的package包/类
/**
* Initialize the plugin. This might involve
* - initializing the variables
* - calibrating the plugin
*/
void initialize(Configuration conf, ResourceUsageMetrics metrics,
ResourceCalculatorPlugin monitor,
Progressive progress);
开发者ID:naver,项目名称:hadoop,代码行数:9,代码来源:ResourceUsageEmulatorPlugin.java
注:本文中的org.apache.hadoop.mapred.gridmix.Progressive类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论