diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 65dca26149a..b4ca510dfa8 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -98,6 +98,10 @@ Release 2.4.1 - UNRELEASED
YARN-1701. Improved default paths of the timeline store and the generic
history store. (Tsuyoshi Ozawa via zjshen)
+ YARN-1962. Changed Timeline Service client configuration to be off by default
+ given the non-readiness of the feature yet. (Mohammad Kamrul Islam via
+ vinodkv)
+
OPTIMIZATIONS
BUG FIXES
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 0a11948fc23..fe3c1e11517 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
@@ -1105,7 +1105,7 @@ public class YarnConfiguration extends Configuration {
/** The setting that controls whether timeline service is enabled or not. */
public static final String TIMELINE_SERVICE_ENABLED =
TIMELINE_SERVICE_PREFIX + "enabled";
- public static final boolean DEFAULT_TIMELINE_SERVICE_ENABLED = true;
+ public static final boolean DEFAULT_TIMELINE_SERVICE_ENABLED = false;
/** host:port address for timeline service RPC APIs. */
public static final String TIMELINE_SERVICE_ADDRESS =
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestTimelineClient.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestTimelineClient.java
index 8f61a05b27e..3c5272a56b3 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestTimelineClient.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestTimelineClient.java
@@ -49,7 +49,9 @@ public class TestTimelineClient {
@Before
public void setup() {
- client = createTimelineClient(new YarnConfiguration());
+ YarnConfiguration conf = new YarnConfiguration();
+ conf.setBoolean(YarnConfiguration.TIMELINE_SERVICE_ENABLED, true);
+ client = createTimelineClient(conf);
}
@After
@@ -127,6 +129,25 @@ public class TestTimelineClient {
}
}
+ @Test
+ public void testPostEntitiesTimelineServiceDefaultNotEnabled()
+ throws Exception {
+ YarnConfiguration conf = new YarnConfiguration();
+ // Unset the timeline service's enabled properties.
+ // Make sure default value is pickup up
+ conf.unset(YarnConfiguration.TIMELINE_SERVICE_ENABLED);
+ TimelineClientImpl client = createTimelineClient(conf);
+ mockClientResponse(client, ClientResponse.Status.INTERNAL_SERVER_ERROR,
+ false, false);
+ try {
+ TimelinePutResponse response = client.putEntities(generateEntity());
+ Assert.assertEquals(0, response.getErrors().size());
+ } catch (YarnException e) {
+ Assert
+ .fail("putEntities should already return before throwing the exception");
+ }
+ }
+
private static ClientResponse mockClientResponse(TimelineClientImpl client,
ClientResponse.Status status, boolean hasError, boolean hasRuntimeError) {
ClientResponse response = mock(ClientResponse.class);
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 ef50aeaf6d2..9aaeea09d98 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
@@ -1112,7 +1112,7 @@
If enabled, clients will put entities and events to the timeline server.
yarn.timeline-service.enabled
- true
+ false