[40/43] git commit: YARN-2812. TestApplicationHistoryServer is likely to fail on less powerful machine. Contributed by Zhijie Shen

2014-11-06 Thread vinayakumarb
YARN-2812. TestApplicationHistoryServer is likely to fail on less powerful 
machine. Contributed by Zhijie Shen


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/b0b52c4e
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/b0b52c4e
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/b0b52c4e

Branch: refs/heads/HDFS-EC
Commit: b0b52c4e11336ca2ad6a02d64c0b5d5a8f1339ae
Parents: 8e33d4b
Author: Xuan 
Authored: Wed Nov 5 20:42:38 2014 -0800
Committer: Xuan 
Committed: Wed Nov 5 20:42:38 2014 -0800

--
 hadoop-yarn-project/CHANGES.txt |  3 +
 .../TestApplicationHistoryServer.java   | 77 
 2 files changed, 48 insertions(+), 32 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hadoop/blob/b0b52c4e/hadoop-yarn-project/CHANGES.txt
--
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index d65860c..aefc59f 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -874,6 +874,9 @@ Release 2.6.0 - UNRELEASED
 
 YARN-2813. Fixed NPE from MemoryTimelineStore.getDomains. (Zhijie Shen via 
xgong)
 
+YARN-2812. TestApplicationHistoryServer is likely to fail on less powerful 
machine.
+(Zhijie Shen via xgong)
+
 Release 2.5.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b0b52c4e/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryServer.java
--
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryServer.java
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryServer.java
index b11cda7..7a4062d 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryServer.java
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryServer.java
@@ -29,6 +29,8 @@ import org.apache.hadoop.service.Service.STATE;
 import org.apache.hadoop.util.ExitUtil;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import 
org.apache.hadoop.yarn.server.applicationhistoryservice.webapp.AHSWebApp;
+import org.apache.hadoop.yarn.server.timeline.MemoryTimelineStore;
+import org.apache.hadoop.yarn.server.timeline.TimelineStore;
 import 
org.apache.hadoop.yarn.server.timeline.security.TimelineAuthenticationFilterInitializer;
 import org.junit.After;
 import org.junit.Test;
@@ -38,45 +40,56 @@ import java.util.Map;
 
 public class TestApplicationHistoryServer {
 
-  ApplicationHistoryServer historyServer = null;
-
   // simple test init/start/stop ApplicationHistoryServer. Status should 
change.
-  @Test(timeout = 5)
+  @Test(timeout = 6)
   public void testStartStopServer() throws Exception {
-historyServer = new ApplicationHistoryServer();
+ApplicationHistoryServer historyServer = new ApplicationHistoryServer();
 Configuration config = new YarnConfiguration();
-historyServer.init(config);
-assertEquals(STATE.INITED, historyServer.getServiceState());
-assertEquals(5, historyServer.getServices().size());
-ApplicationHistoryClientService historyService =
-historyServer.getClientService();
-assertNotNull(historyServer.getClientService());
-assertEquals(STATE.INITED, historyService.getServiceState());
+config.setClass(YarnConfiguration.TIMELINE_SERVICE_STORE,
+MemoryTimelineStore.class, TimelineStore.class);
+config.set(YarnConfiguration.TIMELINE_SERVICE_WEBAPP_ADDRESS, 
"localhost:0");
+try {
+  historyServer.init(config);
+  assertEquals(STATE.INITED, historyServer.getServiceState());
+  assertEquals(5, historyServer.getServices().size());
+  ApplicationHistoryClientService historyService =
+  historyServer.getClientService();
+  assertNotNull(historyServer.getClientService());
+  assertEquals(STATE.INITED, historyService.getServiceState());
 
-historyServer.start();
-assertEquals(STATE.STARTED, historyServer.getServiceState());
-assertEquals(STATE.STARTED, historyService.getServiceState());
-historyServer.stop();
-assertEquals(STA

git commit: YARN-2812. TestApplicationHistoryServer is likely to fail on less powerful machine. Contributed by Zhijie Shen

2014-11-05 Thread xgong
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.6 83ed42fa6 -> 43854764a


YARN-2812. TestApplicationHistoryServer is likely to fail on less powerful 
machine. Contributed by Zhijie Shen

(cherry picked from commit b0b52c4e11336ca2ad6a02d64c0b5d5a8f1339ae)
(cherry picked from commit 4aa98d599194a444c9d2e1fe95262e32bf744d35)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/43854764
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/43854764
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/43854764

Branch: refs/heads/branch-2.6
Commit: 43854764a94e542f62749bab49c4f09a90ddb0ac
Parents: 83ed42f
Author: Xuan 
Authored: Wed Nov 5 20:42:38 2014 -0800
Committer: Xuan 
Committed: Wed Nov 5 20:45:09 2014 -0800

--
 hadoop-yarn-project/CHANGES.txt |  3 +
 .../TestApplicationHistoryServer.java   | 77 
 2 files changed, 48 insertions(+), 32 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hadoop/blob/43854764/hadoop-yarn-project/CHANGES.txt
--
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 99e3d9d..56fddb8 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -802,6 +802,9 @@ Release 2.6.0 - UNRELEASED
 
 YARN-2813. Fixed NPE from MemoryTimelineStore.getDomains. (Zhijie Shen via 
xgong)
 
+YARN-2812. TestApplicationHistoryServer is likely to fail on less powerful 
machine.
+(Zhijie Shen via xgong)
+
 Release 2.5.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/43854764/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryServer.java
--
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryServer.java
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryServer.java
index b11cda7..7a4062d 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryServer.java
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryServer.java
@@ -29,6 +29,8 @@ import org.apache.hadoop.service.Service.STATE;
 import org.apache.hadoop.util.ExitUtil;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import 
org.apache.hadoop.yarn.server.applicationhistoryservice.webapp.AHSWebApp;
+import org.apache.hadoop.yarn.server.timeline.MemoryTimelineStore;
+import org.apache.hadoop.yarn.server.timeline.TimelineStore;
 import 
org.apache.hadoop.yarn.server.timeline.security.TimelineAuthenticationFilterInitializer;
 import org.junit.After;
 import org.junit.Test;
@@ -38,45 +40,56 @@ import java.util.Map;
 
 public class TestApplicationHistoryServer {
 
-  ApplicationHistoryServer historyServer = null;
-
   // simple test init/start/stop ApplicationHistoryServer. Status should 
change.
-  @Test(timeout = 5)
+  @Test(timeout = 6)
   public void testStartStopServer() throws Exception {
-historyServer = new ApplicationHistoryServer();
+ApplicationHistoryServer historyServer = new ApplicationHistoryServer();
 Configuration config = new YarnConfiguration();
-historyServer.init(config);
-assertEquals(STATE.INITED, historyServer.getServiceState());
-assertEquals(5, historyServer.getServices().size());
-ApplicationHistoryClientService historyService =
-historyServer.getClientService();
-assertNotNull(historyServer.getClientService());
-assertEquals(STATE.INITED, historyService.getServiceState());
+config.setClass(YarnConfiguration.TIMELINE_SERVICE_STORE,
+MemoryTimelineStore.class, TimelineStore.class);
+config.set(YarnConfiguration.TIMELINE_SERVICE_WEBAPP_ADDRESS, 
"localhost:0");
+try {
+  historyServer.init(config);
+  assertEquals(STATE.INITED, historyServer.getServiceState());
+  assertEquals(5, historyServer.getServices().size());
+  ApplicationHistoryClientService historyService =
+  historyServer.getClientService();
+  assertNotNull(historyServer.getClientService());
+  assertEquals(STATE.INITED, historyService.getSe

git commit: YARN-2812. TestApplicationHistoryServer is likely to fail on less powerful machine. Contributed by Zhijie Shen

2014-11-05 Thread xgong
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 ee44d8fb3 -> 4aa98d599


YARN-2812. TestApplicationHistoryServer is likely to fail on less powerful 
machine. Contributed by Zhijie Shen

(cherry picked from commit b0b52c4e11336ca2ad6a02d64c0b5d5a8f1339ae)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/4aa98d59
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/4aa98d59
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/4aa98d59

Branch: refs/heads/branch-2
Commit: 4aa98d599194a444c9d2e1fe95262e32bf744d35
Parents: ee44d8f
Author: Xuan 
Authored: Wed Nov 5 20:42:38 2014 -0800
Committer: Xuan 
Committed: Wed Nov 5 20:44:07 2014 -0800

--
 hadoop-yarn-project/CHANGES.txt |  3 +
 .../TestApplicationHistoryServer.java   | 77 
 2 files changed, 48 insertions(+), 32 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hadoop/blob/4aa98d59/hadoop-yarn-project/CHANGES.txt
--
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 8c7882f..10e6a35 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -847,6 +847,9 @@ Release 2.6.0 - UNRELEASED
 
 YARN-2813. Fixed NPE from MemoryTimelineStore.getDomains. (Zhijie Shen via 
xgong)
 
+YARN-2812. TestApplicationHistoryServer is likely to fail on less powerful 
machine.
+(Zhijie Shen via xgong)
+
 Release 2.5.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/4aa98d59/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryServer.java
--
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryServer.java
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryServer.java
index b11cda7..7a4062d 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryServer.java
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryServer.java
@@ -29,6 +29,8 @@ import org.apache.hadoop.service.Service.STATE;
 import org.apache.hadoop.util.ExitUtil;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import 
org.apache.hadoop.yarn.server.applicationhistoryservice.webapp.AHSWebApp;
+import org.apache.hadoop.yarn.server.timeline.MemoryTimelineStore;
+import org.apache.hadoop.yarn.server.timeline.TimelineStore;
 import 
org.apache.hadoop.yarn.server.timeline.security.TimelineAuthenticationFilterInitializer;
 import org.junit.After;
 import org.junit.Test;
@@ -38,45 +40,56 @@ import java.util.Map;
 
 public class TestApplicationHistoryServer {
 
-  ApplicationHistoryServer historyServer = null;
-
   // simple test init/start/stop ApplicationHistoryServer. Status should 
change.
-  @Test(timeout = 5)
+  @Test(timeout = 6)
   public void testStartStopServer() throws Exception {
-historyServer = new ApplicationHistoryServer();
+ApplicationHistoryServer historyServer = new ApplicationHistoryServer();
 Configuration config = new YarnConfiguration();
-historyServer.init(config);
-assertEquals(STATE.INITED, historyServer.getServiceState());
-assertEquals(5, historyServer.getServices().size());
-ApplicationHistoryClientService historyService =
-historyServer.getClientService();
-assertNotNull(historyServer.getClientService());
-assertEquals(STATE.INITED, historyService.getServiceState());
+config.setClass(YarnConfiguration.TIMELINE_SERVICE_STORE,
+MemoryTimelineStore.class, TimelineStore.class);
+config.set(YarnConfiguration.TIMELINE_SERVICE_WEBAPP_ADDRESS, 
"localhost:0");
+try {
+  historyServer.init(config);
+  assertEquals(STATE.INITED, historyServer.getServiceState());
+  assertEquals(5, historyServer.getServices().size());
+  ApplicationHistoryClientService historyService =
+  historyServer.getClientService();
+  assertNotNull(historyServer.getClientService());
+  assertEquals(STATE.INITED, historyService.getServiceState());
 
-historyServer.start();
-assertEquals(STATE.STAR

git commit: YARN-2812. TestApplicationHistoryServer is likely to fail on less powerful machine. Contributed by Zhijie Shen

2014-11-05 Thread xgong
Repository: hadoop
Updated Branches:
  refs/heads/trunk 8e33d4bdb -> b0b52c4e1


YARN-2812. TestApplicationHistoryServer is likely to fail on less powerful 
machine. Contributed by Zhijie Shen


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/b0b52c4e
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/b0b52c4e
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/b0b52c4e

Branch: refs/heads/trunk
Commit: b0b52c4e11336ca2ad6a02d64c0b5d5a8f1339ae
Parents: 8e33d4b
Author: Xuan 
Authored: Wed Nov 5 20:42:38 2014 -0800
Committer: Xuan 
Committed: Wed Nov 5 20:42:38 2014 -0800

--
 hadoop-yarn-project/CHANGES.txt |  3 +
 .../TestApplicationHistoryServer.java   | 77 
 2 files changed, 48 insertions(+), 32 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hadoop/blob/b0b52c4e/hadoop-yarn-project/CHANGES.txt
--
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index d65860c..aefc59f 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -874,6 +874,9 @@ Release 2.6.0 - UNRELEASED
 
 YARN-2813. Fixed NPE from MemoryTimelineStore.getDomains. (Zhijie Shen via 
xgong)
 
+YARN-2812. TestApplicationHistoryServer is likely to fail on less powerful 
machine.
+(Zhijie Shen via xgong)
+
 Release 2.5.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b0b52c4e/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryServer.java
--
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryServer.java
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryServer.java
index b11cda7..7a4062d 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryServer.java
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryServer.java
@@ -29,6 +29,8 @@ import org.apache.hadoop.service.Service.STATE;
 import org.apache.hadoop.util.ExitUtil;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import 
org.apache.hadoop.yarn.server.applicationhistoryservice.webapp.AHSWebApp;
+import org.apache.hadoop.yarn.server.timeline.MemoryTimelineStore;
+import org.apache.hadoop.yarn.server.timeline.TimelineStore;
 import 
org.apache.hadoop.yarn.server.timeline.security.TimelineAuthenticationFilterInitializer;
 import org.junit.After;
 import org.junit.Test;
@@ -38,45 +40,56 @@ import java.util.Map;
 
 public class TestApplicationHistoryServer {
 
-  ApplicationHistoryServer historyServer = null;
-
   // simple test init/start/stop ApplicationHistoryServer. Status should 
change.
-  @Test(timeout = 5)
+  @Test(timeout = 6)
   public void testStartStopServer() throws Exception {
-historyServer = new ApplicationHistoryServer();
+ApplicationHistoryServer historyServer = new ApplicationHistoryServer();
 Configuration config = new YarnConfiguration();
-historyServer.init(config);
-assertEquals(STATE.INITED, historyServer.getServiceState());
-assertEquals(5, historyServer.getServices().size());
-ApplicationHistoryClientService historyService =
-historyServer.getClientService();
-assertNotNull(historyServer.getClientService());
-assertEquals(STATE.INITED, historyService.getServiceState());
+config.setClass(YarnConfiguration.TIMELINE_SERVICE_STORE,
+MemoryTimelineStore.class, TimelineStore.class);
+config.set(YarnConfiguration.TIMELINE_SERVICE_WEBAPP_ADDRESS, 
"localhost:0");
+try {
+  historyServer.init(config);
+  assertEquals(STATE.INITED, historyServer.getServiceState());
+  assertEquals(5, historyServer.getServices().size());
+  ApplicationHistoryClientService historyService =
+  historyServer.getClientService();
+  assertNotNull(historyServer.getClientService());
+  assertEquals(STATE.INITED, historyService.getServiceState());
 
-historyServer.start();
-assertEquals(STATE.STARTED, historyServer.getServiceState());
-assertEquals(STATE.STARTED, hist