Ejemplo n.º 1
0
 public void initialize(DragonConfiguration conf, JobId id)
     throws IOException, ClassNotFoundException, InterruptedException {
   Class<? extends ResourceCalculatorPlugin> clazz =
       conf.getClass(
           DragonConfig.RESOURCE_CALCULATOR_PLUGIN, null, ResourceCalculatorPlugin.class);
   resourceCalculator = ResourceCalculatorPlugin.getResourceCalculatorPlugin(clazz, conf);
   LOG.info(" Using ResourceCalculatorPlugin : " + resourceCalculator);
   if (resourceCalculator != null) {
     initCpuCumulativeTime = resourceCalculator.getProcResourceValues().getCumulativeCpuTime();
   }
 }
 public void init(LinuxContainerExecutor lce) throws IOException {
   this.init(lce, ResourceCalculatorPlugin.getResourceCalculatorPlugin(null, conf));
 }