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

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

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

Resources.normalize介绍

暂无

代码示例

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

/**
 * Utility method to normalize a resource request, by insuring that the
 * requested memory is a multiple of increment resource and is not zero.
 *
 * @return normalized resource
 */
public static Resource getNormalizedResource(
  Resource ask,
  ResourceCalculator resourceCalculator,
  Resource minimumResource,
  Resource maximumResource,
  Resource incrementResource) {
 Resource normalized = Resources.normalize(
   resourceCalculator, ask, minimumResource,
   maximumResource, incrementResource);
 return normalized;
}

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

/**
 * Utility method to normalize a resource request, by insuring that the
 * requested memory is a multiple of minMemory and is not zero.
 */
public static void normalizeRequest(
 ResourceRequest ask,
 ResourceCalculator resourceCalculator,
 Resource clusterResource,
 Resource minimumResource,
 Resource maximumResource) {
 Resource normalized =
  Resources.normalize(
   resourceCalculator, ask.getCapability(), minimumResource,
   maximumResource, minimumResource);
 ask.setCapability(normalized);
}

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

/**
 * Utility method to normalize a resource request, by insuring that the
 * requested memory is a multiple of minMemory and is not zero.
 */
public static void normalizeRequest(
 ResourceRequest ask,
 ResourceCalculator resourceCalculator,
 Resource clusterResource,
 Resource minimumResource,
 Resource maximumResource) {
 Resource normalized =
  Resources.normalize(
   resourceCalculator, ask.getCapability(), minimumResource,
   maximumResource, minimumResource);
 ask.setCapability(normalized);
}

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

/**
 * Utility method to normalize a resource request, by insuring that the
 * requested memory is a multiple of minMemory and is not zero.
 */
public static void normalizeRequest(
  ResourceRequest ask, 
  ResourceCalculator resourceCalculator, 
  Resource clusterResource,
  Resource minimumResource,
  Resource maximumResource,
  Resource incrementResource) {
 Resource normalized = 
   Resources.normalize(
     resourceCalculator, ask.getCapability(), minimumResource,
     maximumResource, incrementResource);
 ask.setCapability(normalized);
}

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

/**
 * Utility method to normalize a resource request, by insuring that the
 * requested memory is a multiple of minMemory and is not zero.
 */
public static void normalizeRequest(
  ResourceRequest ask, 
  ResourceCalculator resourceCalculator, 
  Resource clusterResource,
  Resource minimumResource,
  Resource maximumResource,
  Resource incrementResource) {
 Resource normalized = 
   Resources.normalize(
     resourceCalculator, ask.getCapability(), minimumResource,
     maximumResource, incrementResource);
 ask.setCapability(normalized);
}

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

Resource increment = Resource.newInstance(1024, 4);
if (resourceCalculator instanceof DefaultResourceCalculator) {
 Resource result = Resources.normalize(resourceCalculator,
   ask, min, max, increment);
 Resource result = Resources.normalize(resourceCalculator,
   ask, min, max, increment);
increment = Resource.newInstance(1024, 1);
if (resourceCalculator instanceof DefaultResourceCalculator) {
 Resource result = Resources.normalize(resourceCalculator,
   ask, min, max, increment);
 Resource result = Resources.normalize(resourceCalculator,
   ask, min, max, increment);
increment = Resource.newInstance(1024, 1);
if (resourceCalculator instanceof DefaultResourceCalculator) {
 Resource result = Resources.normalize(resourceCalculator,
   ask, min, max, increment);
 Resource result = Resources.normalize(resourceCalculator,
   ask, min, max, increment);
increment = Resource.newInstance(0, 0);
if (resourceCalculator instanceof DefaultResourceCalculator) {
 Resource result = Resources.normalize(resourceCalculator,
   ask, min, max, increment);

相关文章