MAPREDUCE-6300. Task list sort by task id broken. Contributed by Siqi Li.
This commit is contained in:
parent
2e8ea780a4
commit
1fa8075794
@ -346,6 +346,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 @@ private String tasksTableInit() {
|
||||
.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 @@ private String tasksTableInit() {
|
||||
.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 @@ protected Class<? extends SubView> content() {
|
||||
|
||||
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 @@ protected Class<? extends SubView> content() {
|
||||
|
||||
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 Collection<ContainerReport> run() throws Exception {
|
||||
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 ContainerReport run() throws Exception {
|
||||
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 @@ protected void renderData(Block html) {
|
||||
}
|
||||
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 FairSchedulerAppsBlock(ResourceManager rm, ViewContext ctx,
|
||||
// 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 ContainerReport run() throws Exception {
|
||||
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 @@ protected void renderData(Block html) {
|
||||
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
Block a user