MAPREDUCE-6300. Task list sort by task id broken. Contributed by Siqi Li.
(cherry picked from commit 1fa8075794
)
This commit is contained in:
parent
9123f26c73
commit
51c458a5c4
|
@ -101,6 +101,8 @@ Release 2.7.1 - UNRELEASED
|
|||
|
||||
BUG FIXES
|
||||
|
||||
MAPREDUCE-6300. Task list sort by task id broken. (Siqi Li via aajisaka)
|
||||
|
||||
Release 2.7.0 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -43,7 +43,7 @@ public class TasksPage extends AppView {
|
|||
.append(", bProcessing: true")
|
||||
|
||||
.append("\n, aoColumnDefs: [\n")
|
||||
.append("{'sType':'numeric', 'aTargets': [0]")
|
||||
.append("{'sType':'string', 'aTargets': [0]")
|
||||
.append(", 'mRender': parseHadoopID }")
|
||||
|
||||
.append("\n, {'sType':'numeric', bSearchable:false, 'aTargets': [1]")
|
||||
|
|
|
@ -76,7 +76,7 @@ public class HsTasksPage extends HsView {
|
|||
.append(", bProcessing: true")
|
||||
|
||||
.append("\n, aoColumnDefs: [\n")
|
||||
.append("{'sType':'numeric', 'aTargets': [ 0 ]")
|
||||
.append("{'sType':'string', 'aTargets': [ 0 ]")
|
||||
.append(", 'mRender': parseHadoopID }")
|
||||
|
||||
.append(", {'sType':'numeric', 'aTargets': [ 4")
|
||||
|
|
|
@ -139,6 +139,9 @@ function renderHadoopElapsedTime(data, type, full) {
|
|||
return data;
|
||||
}
|
||||
|
||||
//JSON array element is formatted like
|
||||
//"<a href="/proxy/application_1360183373897_0001>">application_1360183373897_0001</a>"
|
||||
//this function removes <a> tag and return a string value for sorting
|
||||
function parseHadoopID(data, type, full) {
|
||||
if (type === 'display') {
|
||||
return data;
|
||||
|
|
|
@ -53,8 +53,8 @@ public class AppAttemptPage extends AHSView {
|
|||
|
||||
protected String getContainersTableColumnDefs() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
return sb.append("[\n").append("{'sType':'numeric', 'aTargets': [0]")
|
||||
return sb.append("[\n").append("{'sType':'string', 'aTargets': [0]")
|
||||
.append(", 'mRender': parseHadoopID }]").toString();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public class AppPage extends AHSView {
|
|||
|
||||
protected String getAttemptsTableColumnDefs() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
return sb.append("[\n").append("{'sType':'numeric', 'aTargets': [0]")
|
||||
return sb.append("[\n").append("{'sType':'string', 'aTargets': [0]")
|
||||
.append(", 'mRender': parseHadoopID }")
|
||||
|
||||
.append("\n, {'sType':'numeric', 'aTargets': [1]")
|
||||
|
|
|
@ -158,8 +158,6 @@ public class AppAttemptBlock extends HtmlBlock {
|
|||
StringBuilder containersTableData = new StringBuilder("[\n");
|
||||
for (ContainerReport containerReport : containers) {
|
||||
ContainerInfo container = new ContainerInfo(containerReport);
|
||||
// ConatinerID numerical value parsed by parseHadoopID in
|
||||
// yarn.dt.plugins.js
|
||||
containersTableData
|
||||
.append("[\"<a href='")
|
||||
.append(url("container", container.getContainerId()))
|
||||
|
|
|
@ -285,8 +285,6 @@ public class AppBlock extends HtmlBlock {
|
|||
logsLink = containerReport.getLogUrl();
|
||||
nodeLink = containerReport.getNodeHttpAddress();
|
||||
}
|
||||
// AppAttemptID numerical value parsed by parseHadoopID in
|
||||
// yarn.dt.plugins.js
|
||||
attemptsTableData
|
||||
.append("[\"<a href='")
|
||||
.append(url("appattempt", appAttempt.getAppAttemptId()))
|
||||
|
|
|
@ -124,7 +124,6 @@ public class AppsBlock extends HtmlBlock {
|
|||
}
|
||||
AppInfo app = new AppInfo(appReport);
|
||||
String percent = String.format("%.1f", app.getProgress());
|
||||
// AppID numerical value parsed by parseHadoopID in yarn.dt.plugins.js
|
||||
appsTableData
|
||||
.append("[\"<a href='")
|
||||
.append(url("app", app.getAppId()))
|
||||
|
|
|
@ -116,7 +116,6 @@ public class FairSchedulerAppsBlock extends HtmlBlock {
|
|||
// FairScheduler#applications don't have the entry. Skip it.
|
||||
continue;
|
||||
}
|
||||
//AppID numerical value parsed by parseHadoopID in yarn.dt.plugins.js
|
||||
appsTableData.append("[\"<a href='")
|
||||
.append(url("app", appInfo.getAppId())).append("'>")
|
||||
.append(appInfo.getAppId()).append("</a>\",\"")
|
||||
|
|
|
@ -172,8 +172,6 @@ public class RMAppBlock extends AppBlock{
|
|||
blacklistedNodesCount = String.valueOf(nodes.size());
|
||||
}
|
||||
|
||||
// AppAttemptID numerical value parsed by parseHadoopID in
|
||||
// yarn.dt.plugins.js
|
||||
attemptsTableData
|
||||
.append("[\"<a href='")
|
||||
.append(url("appattempt", appAttempt.getAppAttemptId()))
|
||||
|
|
|
@ -81,7 +81,6 @@ public class RMAppsBlock extends AppsBlock {
|
|||
blacklistedNodesCount = String.valueOf(nodes.size());
|
||||
}
|
||||
String percent = String.format("%.1f", app.getProgress());
|
||||
// AppID numerical value parsed by parseHadoopID in yarn.dt.plugins.js
|
||||
appsTableData
|
||||
.append("[\"<a href='")
|
||||
.append(url("app", app.getAppId()))
|
||||
|
|
Loading…
Reference in New Issue