MAPREDUCE-6408. Queue name and user name should be printed on the job page. (Siqi Li via gera)

This commit is contained in:
Gera Shegalov 2015-06-22 14:23:22 -07:00
parent 7b424f938c
commit 11ac848207
4 changed files with 12 additions and 1 deletions

View File

@ -358,6 +358,9 @@ Release 2.8.0 - UNRELEASED
MAPREDUCE-6305. AM/Task log page should be able to link back to the job.
(Siqi Li via gera)
MAPREDUCE-6408. Queue name and user name should be printed on the job page.
(Siqi Li via gera)
OPTIMIZATIONS
BUG FIXES

View File

@ -78,6 +78,8 @@ public class JobBlock extends HtmlBlock {
JobInfo jinfo = new JobInfo(job, true);
info("Job Overview").
_("Job Name:", jinfo.getName()).
_("User Name:", jinfo.getUserName()).
_("Queue Name:", jinfo.getQueueName()).
_("State:", jinfo.getState()).
_("Uberized:", jinfo.isUberized()).
_("Started:", new Date(jinfo.getStartTime())).

View File

@ -51,6 +51,7 @@ public class JobInfo {
protected String id;
protected String name;
protected String user;
protected String queue;
protected JobState state;
protected int mapsTotal;
protected int mapsCompleted;
@ -97,6 +98,7 @@ public class JobInfo {
}
this.name = job.getName().toString();
this.user = job.getUserName();
this.queue = job.getQueueName();
this.state = job.getState();
this.mapsTotal = job.getTotalMaps();
this.mapsCompleted = job.getCompletedMaps();
@ -223,6 +225,10 @@ public class JobInfo {
return this.name;
}
public String getQueueName() {
return this.queue;
}
public String getId() {
return this.id;
}

View File

@ -413,7 +413,7 @@ public class TestAMWebServicesJobs extends JerseyTest {
public void verifyAMJob(JSONObject info, Job job) throws JSONException {
assertEquals("incorrect number of elements", 30, info.length());
assertEquals("incorrect number of elements", 31, info.length());
// everyone access fields
verifyAMJobGeneric(job, info.getString("id"), info.getString("user"),