hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vinayakum...@apache.org
Subject [30/45] hadoop git commit: YARN-2766. Made ApplicationHistoryManager return a sorted list of apps, attempts and containers. Contributed by Robert Kanter.
Date Mon, 17 Nov 2014 06:30:32 GMT
YARN-2766. Made ApplicationHistoryManager return a sorted list of apps, attempts and containers.
Contributed by Robert Kanter.


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

Branch: refs/heads/HDFS-EC
Commit: 3648cb57c9f018a3a339c26f5a0ca2779485521a
Parents: 4ae9780
Author: Zhijie Shen <zjshen@apache.org>
Authored: Thu Nov 13 13:47:42 2014 -0800
Committer: Zhijie Shen <zjshen@apache.org>
Committed: Thu Nov 13 13:47:42 2014 -0800

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                               | 3 +++
 .../ApplicationHistoryManagerOnTimelineStore.java             | 7 ++++---
 .../TestApplicationHistoryClientService.java                  | 4 ++--
 3 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/3648cb57/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 60f88ca..5c794bd 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -81,6 +81,9 @@ Release 2.7.0 - UNRELEASED
     YARN-2713. "RM Home" link in NM should point to one of the RMs in an 
     HA setup. (kasha)
 
+    YARN-2766. Made ApplicationHistoryManager return a sorted list of apps,
+    attempts and containers. (Robert Kanter via zjshen)
+
 Release 2.6.0 - 2014-11-18
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/3648cb57/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryManagerOnTimelineStore.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryManagerOnTimelineStore.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryManagerOnTimelineStore.java
index cd429d0..c88cccc 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryManagerOnTimelineStore.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryManagerOnTimelineStore.java
@@ -21,6 +21,7 @@ package org.apache.hadoop.yarn.server.applicationhistoryservice;
 import java.io.IOException;
 import java.util.EnumSet;
 import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -102,7 +103,7 @@ public class ApplicationHistoryManagerOnTimelineStore extends AbstractService
         null, null, Long.MAX_VALUE, EnumSet.allOf(Field.class),
         UserGroupInformation.getLoginUser());
     Map<ApplicationId, ApplicationReport> apps =
-        new HashMap<ApplicationId, ApplicationReport>();
+        new LinkedHashMap<ApplicationId, ApplicationReport>();
     if (entities != null && entities.getEntities() != null) {
       for (TimelineEntity entity : entities.getEntities()) {
         ApplicationReportExt app =
@@ -128,7 +129,7 @@ public class ApplicationHistoryManagerOnTimelineStore extends AbstractService
         Long.MAX_VALUE, EnumSet.allOf(Field.class),
         UserGroupInformation.getLoginUser());
     Map<ApplicationAttemptId, ApplicationAttemptReport> appAttempts =
-        new HashMap<ApplicationAttemptId, ApplicationAttemptReport>();
+        new LinkedHashMap<ApplicationAttemptId, ApplicationAttemptReport>();
     for (TimelineEntity entity : entities.getEntities()) {
       ApplicationAttemptReport appAttempt =
           convertToApplicationAttemptReport(entity);
@@ -198,7 +199,7 @@ public class ApplicationHistoryManagerOnTimelineStore extends AbstractService
         null, null, Long.MAX_VALUE, EnumSet.allOf(Field.class),
         UserGroupInformation.getLoginUser());
     Map<ContainerId, ContainerReport> containers =
-        new HashMap<ContainerId, ContainerReport>();
+        new LinkedHashMap<ContainerId, ContainerReport>();
     if (entities != null && entities.getEntities() != null) {
       for (TimelineEntity entity : entities.getEntities()) {
         ContainerReport container = convertToContainerReport(

http://git-wip-us.apache.org/repos/asf/hadoop/blob/3648cb57/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryClientService.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/TestApplicationHistoryClientService.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryClientService.java
index 7c2593d..2a38d0a 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryClientService.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/TestApplicationHistoryClientService.java
@@ -168,7 +168,7 @@ public class TestApplicationHistoryClientService {
         clientService.getClientHandler().getContainers(request);
     List<ContainerReport> containers = response.getContainerList();
     Assert.assertNotNull(containers);
-    Assert.assertEquals(containerId, containers.get(1).getContainerId());
-    Assert.assertEquals(containerId1, containers.get(0).getContainerId());
+    Assert.assertEquals(containerId, containers.get(0).getContainerId());
+    Assert.assertEquals(containerId1, containers.get(1).getContainerId());
   }
 }


Mime
View raw message