- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.hadoop.yarn.conf.YarnConfiguration.timelineServiceV1Enabled()
方法的一些代码示例,展示了YarnConfiguration.timelineServiceV1Enabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YarnConfiguration.timelineServiceV1Enabled()
方法的具体详情如下:
包路径:org.apache.hadoop.yarn.conf.YarnConfiguration
类名称:YarnConfiguration
方法名:timelineServiceV1Enabled
[英]Returns whether the timeline service v.1 is enabled via configuration.
[中]返回timeline service v.1是否通过配置启用。
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-client
if (YarnConfiguration.timelineServiceV1Enabled(conf)) {
timelineV1ServiceEnabled = true;
timelineDTRenewer = getTimelineDelegationTokenRenewer(conf);
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
protected SystemMetricsPublisher createSystemMetricsPublisher() {
List<SystemMetricsPublisher> publishers =
new ArrayList<SystemMetricsPublisher>();
if (YarnConfiguration.timelineServiceV1Enabled(conf)) {
SystemMetricsPublisher publisherV1 = new TimelineServiceV1Publisher();
publishers.add(publisherV1);
}
if (YarnConfiguration.timelineServiceV2Enabled(conf)) {
// we're dealing with the v.2.x publisher
LOG.info("system metrics publisher with the timeline service V2 is "
+ "configured");
SystemMetricsPublisher publisherV2 = new TimelineServiceV2Publisher(
rmContext.getRMTimelineCollectorManager());
publishers.add(publisherV2);
}
if (publishers.isEmpty()) {
LOG.info("TimelineServicePublisher is not configured");
SystemMetricsPublisher noopPublisher = new NoOpSystemMetricPublisher();
publishers.add(noopPublisher);
}
for (SystemMetricsPublisher publisher : publishers) {
addIfService(publisher);
}
SystemMetricsPublisher combinedPublisher =
new CombinedSystemMetricsPublisher(publishers);
return combinedPublisher;
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common
protected void serviceInit(Configuration conf) throws Exception {
if (!YarnConfiguration.timelineServiceV1Enabled(conf)) {
throw new IOException("Timeline V1 client is not properly configured. "
+ "Either timeline service is not enabled or version is not set to"
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-applications-distributedshell
@Override
public Void run() throws Exception {
if (YarnConfiguration.timelineServiceEnabled(conf)) {
timelineServiceV1Enabled =
YarnConfiguration.timelineServiceV1Enabled(conf);
timelineServiceV2Enabled =
YarnConfiguration.timelineServiceV2Enabled(conf);
// Creating the Timeline Client
if (timelineServiceV1Enabled) {
timelineClient = TimelineClient.createTimelineClient();
timelineClient.init(conf);
timelineClient.start();
LOG.info("Timeline service V1 client is enabled");
}
if (timelineServiceV2Enabled) {
timelineV2Client = TimelineV2Client.createTimelineClient(
appAttemptID.getApplicationId());
timelineV2Client.init(conf);
timelineV2Client.start();
LOG.info("Timeline service V2 client is enabled");
}
} else {
timelineClient = null;
timelineV2Client = null;
LOG.warn("Timeline service is not enabled");
}
return null;
}
});
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
@Test(timeout = 10000)
public void testTimelineServiceConfiguration()
throws Exception {
Configuration config = new Configuration(false);
config.setBoolean(YarnConfiguration.TIMELINE_SERVICE_ENABLED, true);
config.set(YarnConfiguration.TIMELINE_SERVICE_VERSIONS, "2.0,1.5");
config.set(YarnConfiguration.TIMELINE_SERVICE_VERSION, "2.0");
Assert.assertTrue(YarnConfiguration.timelineServiceV2Enabled(config));
Assert.assertTrue(YarnConfiguration.timelineServiceV15Enabled(config));
Assert.assertTrue(YarnConfiguration.timelineServiceV1Enabled(config));
config.set(YarnConfiguration.TIMELINE_SERVICE_VERSIONS, "2.0,1");
config.set(YarnConfiguration.TIMELINE_SERVICE_VERSION, "1.5");
Assert.assertTrue(YarnConfiguration.timelineServiceV2Enabled(config));
Assert.assertFalse(YarnConfiguration.timelineServiceV15Enabled(config));
Assert.assertTrue(YarnConfiguration.timelineServiceV1Enabled(config));
config.set(YarnConfiguration.TIMELINE_SERVICE_VERSIONS, "2.0");
config.set(YarnConfiguration.TIMELINE_SERVICE_VERSION, "1.5");
Assert.assertTrue(YarnConfiguration.timelineServiceV2Enabled(config));
Assert.assertFalse(YarnConfiguration.timelineServiceV15Enabled(config));
Assert.assertFalse(YarnConfiguration.timelineServiceV1Enabled(config));
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
new ArrayList<SystemMetricsPublisher>();
if (YarnConfiguration.timelineServiceV1Enabled(conf)) {
Assert.assertTrue(enableV1);
publisherV1 = new TimelineServiceV1Publisher();
我是一名优秀的程序员,十分优秀!