diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index bdbdc22ad1..838df71d3f 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 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 ba75018e46..6403e3bced 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 @@ private String attemptsTableInit() { .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") 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 2619dffdd0..42507d0f3a 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 @@ private String tasksTableInit() { .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") 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 d148da402f..d4f0d70603 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.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; @@ -80,6 +82,18 @@ public void testTasksView() { params); } + @Test + public void testTasksViewNaturalSortType() { + LOG.info("HsTasksPage"); + AppContext appContext = new MockAppContext(0, 1, 1, 1); + Map params = TestAMWebApp.getTaskParams(appContext); + Injector testPage = WebAppTests.testPage(HsTasksPage.class, AppContext.class, appContext, params); + View viewInstance = testPage.getInstance(HsTasksPage.class); + Map 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"); @@ -89,6 +103,18 @@ public void testTaskView() { .testPage(HsTaskPage.class, AppContext.class, appContext, params); } + @Test + public void testTaskViewNaturalSortType() { + LOG.info("HsTaskPage"); + AppContext appContext = new MockAppContext(0, 1, 1, 1); + Map params = TestAMWebApp.getTaskParams(appContext); + Injector testPage = WebAppTests.testPage(HsTaskPage.class, AppContext.class, appContext, params); + View viewInstance = testPage.getInstance(HsTaskPage.class); + Map 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);