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

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

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

AllocationConfiguration.<init>介绍

暂无

代码示例

代码示例来源:origin: apache/hive

allocConf.set(new AllocationConfiguration(conf));

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

private void updateConfiguredLeafQueues(QueueManager queueMgr, String... confLeafQueues) {
  AllocationConfiguration allocConf = new AllocationConfiguration(conf);
  allocConf.configuredQueues.get(FSQueueType.LEAF).addAll(Sets.newHashSet(confLeafQueues));
  queueMgr.updateAllocationConfiguration(allocConf);
 }
}

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

private void updateConfiguredLeafQueues(QueueManager queueMgr, String... confLeafQueues) {
 AllocationConfiguration allocConf = new AllocationConfiguration(conf);
 allocConf.configuredQueues.get(FSQueueType.LEAF).addAll(Sets.newHashSet(confLeafQueues));
 queueMgr.updateAllocationConfiguration(allocConf);
}

代码示例来源:origin: org.spark-project.hive.shims/hive-shims-scheduler

allocConf.set(new AllocationConfiguration(conf));

代码示例来源:origin: org.apache.hive.shims/hive-shims-scheduler

allocConf.set(new AllocationConfiguration(conf));

代码示例来源:origin: com.github.hyukjinkwon.shims/hive-shims-scheduler

allocConf.set(new AllocationConfiguration(conf));

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

AllocationConfiguration info = new AllocationConfiguration(minQueueResources,
  maxQueueResources, queueMaxApps, userMaxApps, queueWeights,
  queueMaxAMShares, userMaxAppsDefault, queueMaxAppsDefault,

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

createReservationQueueConfig(allocationFileParser);
AllocationConfiguration info = new AllocationConfiguration(queueProperties,
  allocationFileParser, newPlacementPolicy, globalReservationQueueConfig);

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

@Before
public void setUp() throws Exception {
 conf = new FairSchedulerConfiguration();
 FairScheduler scheduler = mock(FairScheduler.class);
 AllocationConfiguration allocConf = new AllocationConfiguration(conf);
 when(scheduler.getAllocationConfiguration()).thenReturn(allocConf);
 when(scheduler.getConf()).thenReturn(conf);
 SystemClock clock = new SystemClock();
 when(scheduler.getClock()).thenReturn(clock);
 notEmptyQueues = new HashSet<FSQueue>();
 queueManager = new QueueManager(scheduler) {
  @Override
  public boolean isEmpty(FSQueue queue) {
   return !notEmptyQueues.contains(queue);
  }
 };
 FSQueueMetrics.forQueue("root", null, true, conf);
 queueManager.initialize(conf);
}

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

@Before
public void setup() throws Exception {
 Configuration conf = new Configuration();
 clock = new TestFairScheduler.MockClock();
 scheduler = mock(FairScheduler.class);
 when(scheduler.getConf()).thenReturn(
   new FairSchedulerConfiguration(conf));
 when(scheduler.getClock()).thenReturn(clock);
 AllocationConfiguration allocConf = new AllocationConfiguration(
   conf);
 when(scheduler.getAllocationConfiguration()).thenReturn(allocConf);
 
 queueManager = new QueueManager(scheduler);
 queueManager.initialize(conf);
 queueMaxApps = allocConf.queueMaxApps;
 userMaxApps = allocConf.userMaxApps;
 maxAppsEnforcer = new MaxRunningAppsEnforcer(scheduler);
 appNum = 0;
 rmContext = mock(RMContext.class);
 when(rmContext.getEpoch()).thenReturn(0L);
}

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

@Before
public void setUp() throws Exception {
 conf = new FairSchedulerConfiguration();
 scheduler = mock(FairScheduler.class);
 AllocationConfiguration allocConf = new AllocationConfiguration(conf);
 // Set up some queues to test default child max resource inheritance
 allocConf.configuredQueues.get(FSQueueType.PARENT).add("root.test");
 allocConf.configuredQueues.get(FSQueueType.LEAF).add("root.test.childA");
 allocConf.configuredQueues.get(FSQueueType.PARENT).add("root.test.childB");
 when(scheduler.getAllocationConfiguration()).thenReturn(allocConf);
 when(scheduler.getConf()).thenReturn(conf);
 when(scheduler.getResourceCalculator()).thenReturn(
   new DefaultResourceCalculator());
 SystemClock clock = SystemClock.getInstance();
 when(scheduler.getClock()).thenReturn(clock);
 notEmptyQueues = new HashSet<>();
 queueManager = new QueueManager(scheduler) {
  @Override
  public boolean isEmpty(FSQueue queue) {
   return !notEmptyQueues.contains(queue);
  }
 };
 FSQueueMetrics.forQueue("root", null, true, conf);
 queueManager.initialize(conf);
}

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

@Before
public void setUp() throws Exception {
 conf = new FairSchedulerConfiguration();
 FairScheduler scheduler = mock(FairScheduler.class);
 AllocationConfiguration allocConf = new AllocationConfiguration(conf);
 when(scheduler.getAllocationConfiguration()).thenReturn(allocConf);
 when(scheduler.getConf()).thenReturn(conf);
 when(scheduler.getResourceCalculator()).thenReturn(
   new DefaultResourceCalculator());
 SystemClock clock = SystemClock.getInstance();
 when(scheduler.getClock()).thenReturn(clock);
 notEmptyQueues = new HashSet<FSQueue>();
 queueManager = new QueueManager(scheduler) {
  @Override
  public boolean isEmpty(FSQueue queue) {
   return !notEmptyQueues.contains(queue);
  }
 };
 FSQueueMetrics.forQueue("root", null, true, conf);
 queueManager.initialize(conf);
}

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

@Before
public void setup() throws Exception {
 Configuration conf = new Configuration();
 clock = new ControlledClock();
 scheduler = mock(FairScheduler.class);
 when(scheduler.getConf()).thenReturn(
   new FairSchedulerConfiguration(conf));
 when(scheduler.getClock()).thenReturn(clock);
 AllocationConfiguration allocConf = new AllocationConfiguration(
   conf);
 when(scheduler.getAllocationConfiguration()).thenReturn(allocConf);
 when(scheduler.getResourceCalculator()).thenReturn(
   new DefaultResourceCalculator());
 queueManager = new QueueManager(scheduler);
 queueManager.initialize(conf);
 userMaxApps = allocConf.userMaxApps;
 maxAppsEnforcer = new MaxRunningAppsEnforcer(scheduler);
 appNum = 0;
 rmContext = mock(RMContext.class);
 when(rmContext.getEpoch()).thenReturn(0L);
}

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

@Test
 public void testEmptyChildQueues() throws Exception {
  FairSchedulerConfiguration conf = new FairSchedulerConfiguration();
  FairScheduler scheduler = mock(FairScheduler.class);
  AllocationConfiguration allocConf = new AllocationConfiguration(conf);
  when(scheduler.getAllocationConfiguration()).thenReturn(allocConf);
  when(scheduler.getConf()).thenReturn(conf);
  when(scheduler.getClusterResource()).thenReturn(Resource.newInstance(1, 1));
  when(scheduler.getResourceCalculator()).thenReturn(
    new DefaultResourceCalculator());
  SystemClock clock = SystemClock.getInstance();
  when(scheduler.getClock()).thenReturn(clock);
  QueueManager queueManager = new QueueManager(scheduler);
  queueManager.initialize(conf);

  FSQueue testQueue = queueManager.getLeafQueue("test", true);
  FairSchedulerQueueInfo queueInfo =
    new FairSchedulerQueueInfo(testQueue, scheduler);
  Collection<FairSchedulerQueueInfo> childQueues =
    queueInfo.getChildQueues();
  Assert.assertNotNull(childQueues);
  Assert.assertEquals("Child QueueInfo was not empty", 0, childQueues.size());
 }
}

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

allocConf = new AllocationConfiguration(conf);
try {
 queueMgr.initialize(conf);

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

@Test
public void testReloadTurnsLeafToParentWithNoLeaf() {
 AllocationConfiguration allocConf = new AllocationConfiguration(conf);
 // Create a leaf queue1
 allocConf.configuredQueues.get(FSQueueType.LEAF).add("root.queue1");
 queueManager.updateAllocationConfiguration(allocConf);
 assertNotNull(queueManager.getLeafQueue("root.queue1", false));
 // Lets say later on admin makes queue1 a parent queue by
 // specifying "type=parent" in the alloc xml and lets say apps running in
 // queue1
 notEmptyQueues.add(queueManager.getLeafQueue("root.queue1", false));
 allocConf = new AllocationConfiguration(conf);
 allocConf.configuredQueues.get(FSQueueType.PARENT)
   .add("root.queue1");
 // When allocs are reloaded queue1 shouldn't be converter to parent
 queueManager.updateAllocationConfiguration(allocConf);
 assertNotNull(queueManager.getLeafQueue("root.queue1", false));
 assertNull(queueManager.getParentQueue("root.queue1", false));
 // Now lets assume apps completed and there are no apps in queue1
 notEmptyQueues.clear();
 // We should see queue1 transform from leaf queue to parent queue.
 queueManager.updateAllocationConfiguration(allocConf);
 assertNull(queueManager.getLeafQueue("root.queue1", false));
 assertNotNull(queueManager.getParentQueue("root.queue1", false));
 // this parent should not have any children
 assertTrue(queueManager.getParentQueue("root.queue1", false)
   .getChildQueues().isEmpty());
}

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

@Test
public void testReloadTurnsLeafToParentWithNoLeaf() {
 AllocationConfiguration allocConf = new AllocationConfiguration(conf);
 // Create a leaf queue1
 allocConf.configuredQueues.get(FSQueueType.LEAF).add("root.queue1");
 queueManager.updateAllocationConfiguration(allocConf);
 assertNotNull(queueManager.getLeafQueue("root.queue1", false));
 // Lets say later on admin makes queue1 a parent queue by
 // specifying "type=parent" in the alloc xml and lets say apps running in
 // queue1
 notEmptyQueues.add(queueManager.getLeafQueue("root.queue1", false));
 allocConf = new AllocationConfiguration(conf);
 allocConf.configuredQueues.get(FSQueueType.PARENT)
   .add("root.queue1");
 // When allocs are reloaded queue1 shouldn't be converter to parent
 queueManager.updateAllocationConfiguration(allocConf);
 assertNotNull(queueManager.getLeafQueue("root.queue1", false));
 assertNull(queueManager.getParentQueue("root.queue1", false));
 // Now lets assume apps completed and there are no apps in queue1
 notEmptyQueues.clear();
 // We should see queue1 transform from leaf queue to parent queue.
 queueManager.updateAllocationConfiguration(allocConf);
 assertNull(queueManager.getLeafQueue("root.queue1", false));
 assertNotNull(queueManager.getParentQueue("root.queue1", false));
 // this parent should not have any children
 assertTrue(queueManager.getParentQueue("root.queue1", false)
   .getChildQueues().isEmpty());
}

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

eventLog.init(this.conf);
allocConf = new AllocationConfiguration(conf);
try {
 queueMgr.initialize(conf);

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

eventLog.init(this.conf);
allocConf = new AllocationConfiguration(conf);
try {
 queueMgr.initialize(conf);

代码示例来源:origin: com.cloudera.llama/llama

allocConf.set(new AllocationConfiguration(yarnConf));

相关文章

微信公众号

最新文章

更多