List of usage examples for org.apache.hadoop.yarn.util ResourceCalculatorProcessTree getResourceCalculatorProcessTree
public static ResourceCalculatorProcessTree getResourceCalculatorProcessTree(String pid, Class<? extends ResourceCalculatorProcessTree> clazz, Configuration conf)
From source file:org.apache.tez.runtime.metrics.TaskCounterUpdater.java
License:Apache License
private void initResourceCalculatorPlugin() { Class<? extends ResourceCalculatorProcessTree> clazz = this.conf.getClass( TezConfiguration.TEZ_TASK_RESOURCE_CALCULATOR_PROCESS_TREE_CLASS, null, ResourceCalculatorProcessTree.class); pTree = ResourceCalculatorProcessTree.getResourceCalculatorProcessTree(pid, clazz, conf); LOG.info(" Using ResourceCalculatorProcessTree : " + pTree); }
From source file:org.apache.tez.util.TestTezMxBeanResourceCalculator.java
License:Apache License
@Before public void setup() throws Exception { Configuration conf = new TezConfiguration(); conf.set(TezConfiguration.TEZ_TASK_RESOURCE_CALCULATOR_PROCESS_TREE_CLASS, TezMxBeanResourceCalculator.class.getName()); Class<? extends ResourceCalculatorProcessTree> clazz = conf.getClass( TezConfiguration.TEZ_TASK_RESOURCE_CALCULATOR_PROCESS_TREE_CLASS, null, ResourceCalculatorProcessTree.class); resourceCalculator = ResourceCalculatorProcessTree.getResourceCalculatorProcessTree("", clazz, conf); }