From 5adf7d851cfd1d79e045c9f00362d687ad84a112 Mon Sep 17 00:00:00 2001 From: Junping Du Date: Thu, 10 Dec 2015 02:44:30 -0800 Subject: [PATCH] YARN-3623. Add a config to indicate the Timeline Service version. Contributed by Xuan Gong. (cherry picked from commit f910e4f639dc311fcb257bfcb869b1aa8b2c0643) (cherry picked from commit 0b5e76e9ff14811ad2617e632854f21d82558e5e) --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../apache/hadoop/yarn/conf/YarnConfiguration.java | 3 +++ .../src/main/resources/yarn-default.xml | 14 ++++++++++++++ 3 files changed, 20 insertions(+) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 9915479b5d6..9998713cb66 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -200,6 +200,9 @@ Release 2.8.0 - UNRELEASED YARN-4349. Support CallerContext in YARN. (wtan via jianhe) + YARN-3623. Add a new config to indicate the Timeline Service version. + (Xuan Gong via junping_du) + IMPROVEMENTS YARN-644. Basic null check is not performed on passed in arguments before diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java index 5a36bd130f2..1b2565fe803 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java @@ -1538,6 +1538,9 @@ public class YarnConfiguration extends Configuration { public static final String TIMELINE_SERVICE_PREFIX = YARN_PREFIX + "timeline-service."; + public static final String TIMELINE_SERVICE_VERSION = TIMELINE_SERVICE_PREFIX + + "version"; + public static final float DEFAULT_TIMELINE_SERVICE_VERSION = 1.0f; /** * Comma seperated list of names for UIs hosted in the timeline server * (For pluggable UIs). diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml index 9bbdb94e74b..f86eab964b9 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml @@ -1765,6 +1765,20 @@ + + Indicate what is the current version of the running + timeline service. For example, if "yarn.timeline-service.version" is 1.5, + and "yarn.timeline-service.enabled" is true, it means the cluster will and + should bring up the timeline service v.1.5 (and nothing else). + On the client side, if the client uses the same version of timeline service, + it should succeed. If the client chooses to use a smaller version in spite of this, + then depending on how robust the compatibility story is between versions, + the results may vary. + + yarn.timeline-service.version + 1.0f + + Indicate to clients whether timeline service is enabled or not. If enabled, clients will put entities and events to the timeline server.