MAPREDUCE-5137. AM web UI: clicking on Map Task results in 500 error. Contributed by Thomas Graves
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1466948 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
972eb9bbfe
commit
d04e65b797
|
@ -277,6 +277,9 @@ Release 2.0.5-beta - UNRELEASED
|
||||||
MAPREDUCE-5086. MR app master deletes staging dir when sent a reboot
|
MAPREDUCE-5086. MR app master deletes staging dir when sent a reboot
|
||||||
command from the RM. (Jian He via jlowe)
|
command from the RM. (Jian He via jlowe)
|
||||||
|
|
||||||
|
MAPREDUCE-5137. AM web UI: clicking on Map Task results in 500 error
|
||||||
|
(Thomas Graves via jlowe)
|
||||||
|
|
||||||
Release 2.0.4-alpha - UNRELEASED
|
Release 2.0.4-alpha - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -884,6 +887,9 @@ Release 0.23.7 - UNRELEASED
|
||||||
MAPREDUCE-5007. fix coverage org.apache.hadoop.mapreduce.v2.hs (Aleksey
|
MAPREDUCE-5007. fix coverage org.apache.hadoop.mapreduce.v2.hs (Aleksey
|
||||||
Gorshkov via tgraves)
|
Gorshkov via tgraves)
|
||||||
|
|
||||||
|
MAPREDUCE-5137. AM web UI: clicking on Map Task results in 500 error
|
||||||
|
(Thomas Graves via jlowe)
|
||||||
|
|
||||||
Release 0.23.6 - UNRELEASED
|
Release 0.23.6 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -33,6 +33,9 @@ import org.apache.hadoop.mapreduce.v2.app.job.TaskAttempt;
|
||||||
import org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptInfo;
|
import org.apache.hadoop.mapreduce.v2.app.webapp.dao.TaskAttemptInfo;
|
||||||
import org.apache.hadoop.yarn.webapp.SubView;
|
import org.apache.hadoop.yarn.webapp.SubView;
|
||||||
import org.apache.hadoop.yarn.webapp.view.HtmlBlock;
|
import org.apache.hadoop.yarn.webapp.view.HtmlBlock;
|
||||||
|
import org.apache.hadoop.yarn.webapp.hamlet.Hamlet;
|
||||||
|
import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE;
|
||||||
|
import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TBODY;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
|
|
||||||
|
@ -53,7 +56,7 @@ public class TaskPage extends AppView {
|
||||||
h2($(TITLE));
|
h2($(TITLE));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
html.
|
TBODY<TABLE<Hamlet>> tbody = html.
|
||||||
table("#attempts").
|
table("#attempts").
|
||||||
thead().
|
thead().
|
||||||
tr().
|
tr().
|
||||||
|
@ -65,7 +68,8 @@ public class TaskPage extends AppView {
|
||||||
th(".tsh", "Started").
|
th(".tsh", "Started").
|
||||||
th(".tsh", "Finished").
|
th(".tsh", "Finished").
|
||||||
th(".tsh", "Elapsed").
|
th(".tsh", "Elapsed").
|
||||||
th(".note", "Note")._()._();
|
th(".note", "Note")._()._().
|
||||||
|
tbody();
|
||||||
// Write all the data into a JavaScript array of arrays for JQuery
|
// Write all the data into a JavaScript array of arrays for JQuery
|
||||||
// DataTables to display
|
// DataTables to display
|
||||||
StringBuilder attemptsTableData = new StringBuilder("[\n");
|
StringBuilder attemptsTableData = new StringBuilder("[\n");
|
||||||
|
@ -105,6 +109,9 @@ public class TaskPage extends AppView {
|
||||||
attemptsTableData.append("]");
|
attemptsTableData.append("]");
|
||||||
html.script().$type("text/javascript").
|
html.script().$type("text/javascript").
|
||||||
_("var attemptsTableData=" + attemptsTableData)._();
|
_("var attemptsTableData=" + attemptsTableData)._();
|
||||||
|
|
||||||
|
tbody._()._();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean isValidRequest() {
|
protected boolean isValidRequest() {
|
||||||
|
|
|
@ -144,7 +144,10 @@ public class TestAMWebApp {
|
||||||
@Test public void testTaskView() {
|
@Test public void testTaskView() {
|
||||||
AppContext appContext = new TestAppContext();
|
AppContext appContext = new TestAppContext();
|
||||||
Map<String, String> params = getTaskParams(appContext);
|
Map<String, String> params = getTaskParams(appContext);
|
||||||
WebAppTests.testPage(TaskPage.class, AppContext.class, appContext, params);
|
App app = new App(appContext);
|
||||||
|
app.setJob(appContext.getAllJobs().values().iterator().next());
|
||||||
|
app.setTask(app.getJob().getTasks().values().iterator().next());
|
||||||
|
WebAppTests.testPage(TaskPage.class, App.class, app, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Map<String, String> getJobParams(AppContext appContext) {
|
public static Map<String, String> getJobParams(AppContext appContext) {
|
||||||
|
|
Loading…
Reference in New Issue