• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Progressive类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ShimmerFrameLayout类代码示例发布时间:2022-05-22
下一篇:
Java EV3TouchSensor类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap