hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rohithsharm...@apache.org
Subject hadoop git commit: MAPREDUCE-6419. JobHistoryServer doesn't sort properly based on Job ID when Job id's exceed 9999. (Mohammad Shahid Khan via rohithsharmaks)
Date Thu, 24 Dec 2015 06:28:42 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 0af492b4b -> a308e8662


MAPREDUCE-6419. JobHistoryServer doesn't sort properly based on Job ID when Job id's exceed
9999. (Mohammad Shahid Khan via rohithsharmaks)


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

Branch: refs/heads/trunk
Commit: a308e86621b1a7692fe1004ed14c919fdaba03cd
Parents: 0af492b
Author: Rohith Sharma K S <rohithsharmaks@apache.org>
Authored: Thu Dec 24 11:55:42 2015 +0530
Committer: Rohith Sharma K S <rohithsharmaks@apache.org>
Committed: Thu Dec 24 11:55:42 2015 +0530

----------------------------------------------------------------------
 hadoop-mapreduce-project/CHANGES.txt            |  3 +++
 .../mapreduce/v2/hs/webapp/HsTaskPage.java      |  2 +-
 .../mapreduce/v2/hs/webapp/HsTasksPage.java     |  2 +-
 .../mapreduce/v2/hs/webapp/TestHSWebApp.java    | 26 ++++++++++++++++++++
 4 files changed, 31 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/a308e866/hadoop-mapreduce-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt
index bdbdc22..838df71 100644
--- a/hadoop-mapreduce-project/CHANGES.txt
+++ b/hadoop-mapreduce-project/CHANGES.txt
@@ -671,6 +671,9 @@ Release 2.8.0 - UNRELEASED
     MAPREDUCE-6550. archive-logs tool changes log ownership to the Yarn
     user when using DefaultContainerExecutor (rkanter)
 
+   MAPREDUCE-6419. JobHistoryServer doesn't sort properly based on Job ID when Job id's 
+   exceed 9999. (Mohammad Shahid Khan via rohithsharmaks)
+
 Release 2.7.3 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/a308e866/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTaskPage.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTaskPage.java
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTaskPage.java
index ba75018..6403e3b 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTaskPage.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTaskPage.java
@@ -298,7 +298,7 @@ public class HsTaskPage extends HsView {
       .append("\n{'aTargets': [ 4 ]")
       .append(", 'bSearchable': false }")
 
-      .append("\n, {'sType':'numeric', 'aTargets': [ 0 ]")
+      .append("\n, {'sType':'natural', 'aTargets': [ 0 ]")
       .append(", 'mRender': parseHadoopID }")
 
       .append("\n, {'sType':'numeric', 'aTargets': [ 5, 6")

http://git-wip-us.apache.org/repos/asf/hadoop/blob/a308e866/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTasksPage.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTasksPage.java
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTasksPage.java
index 2619dff..42507d0 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTasksPage.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/webapp/HsTasksPage.java
@@ -76,7 +76,7 @@ public class HsTasksPage extends HsView {
     .append(", bProcessing: true")
 
     .append("\n, aoColumnDefs: [\n")
-    .append("{'sType':'string', 'aTargets': [ 0 ]")
+    .append("{'sType':'natural', 'aTargets': [ 0 ]")
     .append(", 'mRender': parseHadoopID }")
 
     .append(", {'sType':'numeric', 'aTargets': [ 4")

http://git-wip-us.apache.org/repos/asf/hadoop/blob/a308e866/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/test/java/org/apache/hadoop/mapreduce/v2/hs/webapp/TestHSWebApp.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/test/java/org/apache/hadoop/mapreduce/v2/hs/webapp/TestHSWebApp.java
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/test/java/org/apache/hadoop/mapreduce/v2/hs/webapp/TestHSWebApp.java
index d148da4..d4f0d70 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/test/java/org/apache/hadoop/mapreduce/v2/hs/webapp/TestHSWebApp.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/test/java/org/apache/hadoop/mapreduce/v2/hs/webapp/TestHSWebApp.java
@@ -46,8 +46,10 @@ import org.apache.hadoop.mapreduce.v2.app.MockJobs;
 import org.apache.hadoop.mapreduce.v2.app.webapp.TestAMWebApp;
 import org.apache.hadoop.yarn.api.records.NodeId;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
+import org.apache.hadoop.yarn.webapp.View;
 import org.apache.hadoop.yarn.webapp.log.AggregatedLogsPage;
 import org.apache.hadoop.yarn.webapp.test.WebAppTests;
+import org.junit.Assert;
 import org.junit.Test;
 
 import com.google.inject.AbstractModule;
@@ -81,6 +83,18 @@ public class TestHSWebApp {
   }
 
   @Test
+  public void testTasksViewNaturalSortType() {
+    LOG.info("HsTasksPage");
+    AppContext appContext = new MockAppContext(0, 1, 1, 1);
+    Map<String, String> params = TestAMWebApp.getTaskParams(appContext);
+    Injector testPage = WebAppTests.testPage(HsTasksPage.class, AppContext.class, appContext,
params);
+    View viewInstance = testPage.getInstance(HsTasksPage.class);
+    Map<String, String> moreParams = viewInstance.context().requestContext().moreParams();
+    String appTableColumnsMeta = moreParams.get("ui.dataTables.selector.init");
+    Assert.assertTrue(appTableColumnsMeta.indexOf("natural") != -1);
+  }
+
+  @Test
   public void testTaskView() {
     LOG.info("HsTaskPage");
     AppContext appContext = new MockAppContext(0, 1, 1, 1);
@@ -89,6 +103,18 @@ public class TestHSWebApp {
         .testPage(HsTaskPage.class, AppContext.class, appContext, params);
   }
 
+  @Test
+  public void testTaskViewNaturalSortType() {
+    LOG.info("HsTaskPage");
+    AppContext appContext = new MockAppContext(0, 1, 1, 1);
+    Map<String, String> params = TestAMWebApp.getTaskParams(appContext);
+    Injector testPage = WebAppTests.testPage(HsTaskPage.class, AppContext.class, appContext,
params);
+    View viewInstance = testPage.getInstance(HsTaskPage.class);
+    Map<String, String> moreParams = viewInstance.context().requestContext().moreParams();
+    String appTableColumnsMeta = moreParams.get("ui.dataTables.attempts.init");
+    Assert.assertTrue(appTableColumnsMeta.indexOf("natural") != -1);
+  }
+
   @Test public void testAttemptsWithJobView() {
     LOG.info("HsAttemptsPage with data");
     MockAppContext ctx = new MockAppContext(0, 1, 1, 1);


Mime
View raw message