org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.AllocationConfiguration.getSchedulingPolicy()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(111)

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

AllocationConfiguration.getSchedulingPolicy介绍

暂无

代码示例

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

/**
 * Recursively check policies for queues in pre-order. Get queue policies
 * from the allocation file instead of properties of {@link FSQueue} objects.
 * Set the policy for current queue if there is no policy violation for its
 * children. This method is invoked while reloading the allocation file.
 *
 * @param queueConf allocation configuration
 * @return true if no policy violation and successfully set polices
 *         for queues; false otherwise
 */
public boolean verifyAndSetPolicyFromConf(AllocationConfiguration queueConf) {
 SchedulingPolicy queuePolicy = queueConf.getSchedulingPolicy(getName());
 for (FSQueue child : getChildQueues()) {
  if (!queuePolicy.isChildPolicyAllowed(
    queueConf.getSchedulingPolicy(child.getName()))) {
   return false;
  }
  boolean success = child.verifyAndSetPolicyFromConf(queueConf);
  if (!success) {
   return false;
  }
 }
 // Set the policy if no policy violation for all children
 setPolicy(queuePolicy);
 return true;
}

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

getSchedulingPolicy(queueName);
if (!parent.getPolicy().isChildPolicyAllowed(childPolicy)) {
 LOG.error("Can't create queue '" + queueName + "'," +

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

public FSQueue(String name, FairScheduler scheduler, FSParentQueue parent) {
 this.name = name;
 this.scheduler = scheduler;
 this.authorizer =
   YarnAuthorizationProvider.getInstance(scheduler.getConf());
 this.queueEntity = new PrivilegedEntity(EntityType.QUEUE, name);
 this.metrics = FSQueueMetrics.forQueue(getName(), parent, true, scheduler.getConf());
 this.parent = parent;
 setPolicy(scheduler.getAllocationConfiguration().getSchedulingPolicy(name));
 reinit(false);
}

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

SchedulingPolicy policy = queueConf.getSchedulingPolicy(queue.getName());
policy.initialize(scheduler.getClusterResource());
queue.setPolicy(policy);

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

SchedulingPolicy policy = queueConf.getSchedulingPolicy(queue.getName());
policy.initialize(scheduler.getClusterResource());
queue.setPolicy(policy);

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

queueConf.getSchedulingPolicy("root").getName());
assertEquals(DominantResourceFairnessPolicy.NAME,
  queueConf.getSchedulingPolicy("root.queueA").getName());
  queueConf.getSchedulingPolicy("root.queueB").getName());
  queueConf.getSchedulingPolicy("root.newqueue").getName());

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

/**
  * Initialize a {@link FSQueue} with queue-specific properties and its
  * metrics.
  * @param queue the FSQueue needed to be initialized
  */
 public void initFSQueue(FSQueue queue){
  // Set queue-specific properties.
  String name = queue.getName();
  queue.setWeights(getQueueWeight(name));
  queue.setMinShare(getMinResources(name));
  queue.setMaxShare(getMaxResources(name));
  queue.setMaxRunningApps(getQueueMaxApps(name));
  queue.setMaxAMShare(getQueueMaxAMShare(name));
  queue.setMaxChildQueueResource(getMaxChildResources(name));
  queue.setMaxContainerAllocation(getQueueMaxContainerAllocation(name));

  // Set queue metrics.
  queue.getMetrics().setMinShare(queue.getMinShare());
  queue.getMetrics().setMaxShare(queue.getMaxShare());
  queue.getMetrics().setMaxApps(queue.getMaxRunningApps());
  queue.getMetrics().setSchedulingPolicy(getSchedulingPolicy(name).getName());
 }
}

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

queueConf.getSchedulingPolicy("root").getName());
assertEquals(DominantResourceFairnessPolicy.NAME,
  queueConf.getSchedulingPolicy("root.queueA").getName());
  queueConf.getSchedulingPolicy("root.queueB").getName());
  queueConf.getSchedulingPolicy("root.newqueue").getName());

相关文章

微信公众号

最新文章

更多