org.apache.hadoop.yarn.util.resource.Resources.multiplyAndRoundDown()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(101)

本文整理了Java中org.apache.hadoop.yarn.util.resource.Resources.multiplyAndRoundDown方法的一些代码示例,展示了Resources.multiplyAndRoundDown的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Resources.multiplyAndRoundDown方法的具体详情如下:
包路径:org.apache.hadoop.yarn.util.resource.Resources
类名称:Resources
方法名:multiplyAndRoundDown

Resources.multiplyAndRoundDown介绍

暂无

代码示例

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

@Test
public void testMultiplyAndRoundDown() {
 assertEquals(createResource(4, 1),
   multiplyAndRoundDown(createResource(3, 1), 1.5));
 assertEquals(createResource(4, 1, 0),
   multiplyAndRoundDown(createResource(3, 1), 1.5));
 assertEquals(createResource(1, 4),
   multiplyAndRoundDown(createResource(1, 3), 1.5));
 assertEquals(createResource(1, 4, 0),
   multiplyAndRoundDown(createResource(1, 3), 1.5));
 assertEquals(createResource(7, 7, 0),
   multiplyAndRoundDown(createResource(3, 3, 0), 2.5));
 assertEquals(createResource(2, 2, 7),
   multiplyAndRoundDown(createResource(1, 1, 3), 2.5));
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-server-resourcemanager

Resources.divideAndCeil(
      resourceCalculator, 
      Resources.multiplyAndRoundDown(
        currentCapacity, userLimit), 
      100)
    ), 
  Resources.multiplyAndRoundDown(queueCapacity, userLimitFactor)
  ), 
minimumAllocation);

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

Resources.divideAndCeil(
      resourceCalculator, 
      Resources.multiplyAndRoundDown(
        currentCapacity, userLimit), 
      100)
    ), 
  Resources.multiplyAndRoundDown(queueCapacity, userLimitFactor)
  ), 
minimumAllocation);

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

usersSummedByWeight),
  Resources.divideAndCeil(resourceCalculator,
    Resources.multiplyAndRoundDown(currentCapacity, getUserLimit()),
    100));
 maxUserLimit = Resources.multiplyAndRoundDown(queueCapacity,
   getUserLimitFactor());
} else if (schedulingMode == SchedulingMode.IGNORE_PARTITION_EXCLUSIVITY) {

相关文章