gpt4 book ai didi

org.apache.hadoop.yarn.conf.YarnConfiguration.getBoolean()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 01:36:40 26 4
gpt4 key购买 nike

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

YarnConfiguration.getBoolean介绍

暂无

代码示例

代码示例来源:origin: Qihoo360/XLearning

System.clearProperty(XLearningConstants.Environment.HADOOP_USER_NAME.toString());
YarnConfiguration xlearningConf = new YarnConfiguration();
if (xlearningConf.getBoolean(XLearningConfiguration.XLEARNING_CLEANUP_ENABLE, XLearningConfiguration.DEFAULT_XLEARNING_CLEANUP_ENABLE)) {
 Path stagingDir = new Path(envs.get(XLearningConstants.Environment.XLEARNING_STAGING_LOCATION.toString()));
 try {

代码示例来源:origin: harbby/sylph

@Override
  public YarnClient get()
  {
    YarnClient client = YarnClient.createYarnClient();
    if (yarnConfiguration.getBoolean(YarnConfiguration.TIMELINE_SERVICE_ENABLED, false)) {
      try {
        TimelineClient.createTimelineClient();
      }
      catch (NoClassDefFoundError e) {
        logger.warn("createTimelineClient() error with {}", TimelineClient.class.getResource(TimelineClient.class.getSimpleName() + ".class"), e);
        yarnConfiguration.setBoolean(YarnConfiguration.TIMELINE_SERVICE_ENABLED, false);
      }
    }
    client.init(yarnConfiguration);
    client.start();
    return client;
  }
}

代码示例来源:origin: caskdata/cdap

if (configuration.getBoolean(Constants.Explore.TIMELINE_SERVICE_ENABLED, false)) {

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

getConf());
boolean isHAEnabled =
  yarnConf.getBoolean(YarnConfiguration.RM_HA_ENABLED,
    YarnConfiguration.DEFAULT_RM_HA_ENABLED);

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

getConf());
boolean isHAEnabled =
  yarnConf.getBoolean(YarnConfiguration.RM_HA_ENABLED,
    YarnConfiguration.DEFAULT_RM_HA_ENABLED);

代码示例来源:origin: co.cask.cdap/cdap-common

if (configuration.getBoolean(Constants.Explore.TIMELINE_SERVICE_ENABLED, false)) {

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

getConf());
boolean isHAEnabled =
  yarnConf.getBoolean(YarnConfiguration.RM_HA_ENABLED,
    YarnConfiguration.DEFAULT_RM_HA_ENABLED);

代码示例来源:origin: io.hops/hadoop-yarn-client

getConf());
boolean isHAEnabled =
  yarnConf.getBoolean(YarnConfiguration.RM_HA_ENABLED,
    YarnConfiguration.DEFAULT_RM_HA_ENABLED);

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

liveInfos = createLiveInfos();
boolean enableSecureStoreUpdate = yarnConfig.getBoolean(Configs.Keys.SECURE_STORE_UPDATE_LOCATION_ENABLED, true);

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

liveInfos = createLiveInfos();
boolean enableSecureStoreUpdate = yarnConfig.getBoolean(Configs.Keys.SECURE_STORE_UPDATE_LOCATION_ENABLED, true);

代码示例来源:origin: dremio/dremio-oss

@Test
public void testTimelineServiceIsDisabledByDefault(){
 YarnController controller = Mockito.mock(YarnController.class);
 YarnService yarnService = new YarnService(new TestListener(), controller, Mockito.mock(NodeProvider.class));
 Cluster cluster = new Cluster();
 cluster.setState(ClusterState.CREATED);
 cluster.setId(new ClusterId(UUID.randomUUID().toString()));
 ClusterConfig clusterConfig = new ClusterConfig();
 clusterConfig.setClusterSpec(new ClusterSpec(2, 4096, 4096, 2));
 List<Property> propertyList = new ArrayList<>();
 clusterConfig.setSubPropertyList(propertyList);
 RunId runId = RunIds.generate();
 cluster.setClusterConfig(clusterConfig);
 cluster.setRunId(new com.dremio.provision.RunId(runId.toString()));
 YarnConfiguration yarnConfig = new YarnConfiguration();
 // Test that it is false by default
 yarnConfig.setBoolean(YarnConfiguration.TIMELINE_SERVICE_ENABLED, true);
 yarnService.updateYarnConfiguration(cluster, yarnConfig);
 assertFalse(yarnConfig.getBoolean(YarnConfiguration.TIMELINE_SERVICE_ENABLED, true));
 // Test that it can be overwritten
 yarnConfig.setBoolean(YarnConfiguration.TIMELINE_SERVICE_ENABLED, false);
 cluster.getClusterConfig().getSubPropertyList().add(new Property(YarnConfiguration.TIMELINE_SERVICE_ENABLED, "true"));
 yarnService.updateYarnConfiguration(cluster, yarnConfig);
 assertTrue(yarnConfig.getBoolean(YarnConfiguration.TIMELINE_SERVICE_ENABLED, false));
}

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