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

(cherry picked from commit 11ac848207)
This commit is contained in:
Gera Shegalov 2015-06-22 14:23:22 -07:00
parent cbd11681ce
commit d8cc8f54dd
4 changed files with 12 additions and 1 deletions

View File

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

View File

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

View File

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

View File

@ -413,7 +413,7 @@ public class TestAMWebServicesJobs extends JerseyTest {
public void verifyAMJob(JSONObject info, Job job) throws JSONException { 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 // everyone access fields
verifyAMJobGeneric(job, info.getString("id"), info.getString("user"), verifyAMJobGeneric(job, info.getString("id"), info.getString("user"),