gpt4 book ai didi

org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.conf.YarnConfigurationStore.retrieve()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 00:07:31 25 4
gpt4 key购买 nike

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

YarnConfigurationStore.retrieve介绍

[英]Retrieve the persisted configuration.
[中]检索持久化配置。

代码示例

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

@Override
public void reloadConfigurationFromStore() throws Exception {
 schedConf = confStore.retrieve();
}

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

schedConf = confStore.retrieve();
this.aclMutationPolicy = ConfigurationMutationACLPolicyFactory
  .getPolicy(config);

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

@Test
public void testPersistConfiguration() throws Exception {
 schedConf.set("key", "val");
 confStore.initialize(conf, schedConf, rmContext);
 assertEquals("val", confStore.retrieve().get("key"));
 // Create a new configuration store, and check for old configuration
 confStore = createConfStore();
 schedConf.set("key", "badVal");
 // Should ignore passed-in scheduler configuration.
 confStore.initialize(conf, schedConf, rmContext);
 assertEquals("val", confStore.retrieve().get("key"));
}

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

@Test
 public void testNullConfigurationUpdate() throws Exception {
  schedConf.set("key", "val");
  confStore.initialize(conf, schedConf, rmContext);
  assertEquals("val", confStore.retrieve().get("key"));

  Map<String, String> update = new HashMap<>();
  update.put("key", null);
  YarnConfigurationStore.LogMutation mutation =
    new YarnConfigurationStore.LogMutation(update, TEST_USER);
  confStore.logMutation(mutation);
  confStore.confirmMutation(true);
  assertNull(confStore.retrieve().get("key"));
  confStore.close();
 }
}

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

@Test
public void testPersistConfiguration() throws Exception {
 schedConf.set("key", "val");
 confStore.initialize(conf, schedConf, rmContext);
 assertEquals("val", confStore.retrieve().get("key"));
 confStore.close();
 // Create a new configuration store, and check for old configuration
 confStore = createConfStore();
 schedConf.set("key", "badVal");
 // Should ignore passed-in scheduler configuration.
 confStore.initialize(conf, schedConf, rmContext);
 assertEquals("val", confStore.retrieve().get("key"));
 confStore.close();
}

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

@Test
public void testPersistUpdatedConfiguration() throws Exception {
 confStore.initialize(conf, schedConf, rmContext);
 assertNull(confStore.retrieve().get("key"));
 Map<String, String> update = new HashMap<>();
 update.put("key", "val");
 YarnConfigurationStore.LogMutation mutation =
   new YarnConfigurationStore.LogMutation(update, TEST_USER);
 confStore.logMutation(mutation);
 confStore.confirmMutation(true);
 assertEquals("val", confStore.retrieve().get("key"));
 // Create a new configuration store, and check for updated configuration
 confStore = createConfStore();
 schedConf.set("key", "badVal");
 // Should ignore passed-in scheduler configuration.
 confStore.initialize(conf, schedConf, rmContext);
 assertEquals("val", confStore.retrieve().get("key"));
}

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

@Test
public void testConfigurationUpdate() throws Exception {
 schedConf.set("key1", "val1");
 confStore.initialize(conf, schedConf, rmContext);
 assertEquals("val1", confStore.retrieve().get("key1"));
 Map<String, String> update1 = new HashMap<>();
 update1.put("keyUpdate1", "valUpdate1");
 YarnConfigurationStore.LogMutation mutation1 =
   new YarnConfigurationStore.LogMutation(update1, TEST_USER);
 confStore.logMutation(mutation1);
 confStore.confirmMutation(true);
 assertEquals("valUpdate1", confStore.retrieve().get("keyUpdate1"));
 Map<String, String> update2 = new HashMap<>();
 update2.put("keyUpdate2", "valUpdate2");
 YarnConfigurationStore.LogMutation mutation2 =
   new YarnConfigurationStore.LogMutation(update2, TEST_USER);
 confStore.logMutation(mutation2);
 confStore.confirmMutation(false);
 assertNull("Configuration should not be updated",
   confStore.retrieve().get("keyUpdate2"));
 confStore.close();
}

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

@Test
public void testPersistUpdatedConfiguration() throws Exception {
 confStore.initialize(conf, schedConf, rmContext);
 assertNull(confStore.retrieve().get("key"));
 Map<String, String> update = new HashMap<>();
 update.put("key", "val");
 YarnConfigurationStore.LogMutation mutation =
   new YarnConfigurationStore.LogMutation(update, TEST_USER);
 confStore.logMutation(mutation);
 confStore.confirmMutation(true);
 assertEquals("val", confStore.retrieve().get("key"));
 confStore.close();
 // Create a new configuration store, and check for updated configuration
 confStore = createConfStore();
 schedConf.set("key", "badVal");
 // Should ignore passed-in scheduler configuration.
 confStore.initialize(conf, schedConf, rmContext);
 assertEquals("val", confStore.retrieve().get("key"));
 confStore.close();
}

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

confProvider.confirmPendingMutation(true);
assertEquals("val", ((MutableCSConfigurationProvider) confProvider)
  .getConfStore().retrieve().get("key"));
assertEquals("val", ((MutableCSConfigurationProvider) (
  (CapacityScheduler) rm2.getResourceScheduler())
  .getMutableConfProvider()).getConfStore().retrieve().get("key"));
assertEquals("val", ((MutableConfScheduler) rm2.getResourceScheduler())
  .getConfiguration().get("key"));

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

.getMutableConfProvider()).getConfStore().retrieve()
  .get("yarn.scheduler.capacity.root.queues"));
assertEquals("a", ((MutableConfScheduler) rm2.getResourceScheduler())

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

confProvider.confirmPendingMutation(true);
assertEquals("val", ((MutableCSConfigurationProvider) confProvider)
  .getConfStore().retrieve().get("key"));
  .getMutableConfProvider()).getConfStore().retrieve().get("key"));
assertEquals("val", ((MutableConfScheduler) rm2.getResourceScheduler())
  .getConfiguration().get("key"));

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com