Search in sources :

Example 1 with JobCounterInfo

use of org.apache.hadoop.mapreduce.v2.app.webapp.dao.JobCounterInfo in project hadoop by apache.

the class AMWebServices method getJobCounters.

@GET
@Path("/jobs/{jobid}/counters")
@Produces({ MediaType.APPLICATION_JSON + "; " + JettyUtils.UTF_8, MediaType.APPLICATION_XML + "; " + JettyUtils.UTF_8 })
public JobCounterInfo getJobCounters(@Context HttpServletRequest hsr, @PathParam("jobid") String jid) {
    init();
    Job job = getJobFromJobIdString(jid, appCtx);
    checkAccess(job, hsr);
    return new JobCounterInfo(this.appCtx, job);
}
Also used : JobCounterInfo(org.apache.hadoop.mapreduce.v2.app.webapp.dao.JobCounterInfo) Job(org.apache.hadoop.mapreduce.v2.app.job.Job) Path(javax.ws.rs.Path) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET)

Example 2 with JobCounterInfo

use of org.apache.hadoop.mapreduce.v2.app.webapp.dao.JobCounterInfo in project hadoop by apache.

the class HsWebServices method getJobCounters.

@GET
@Path("/mapreduce/jobs/{jobid}/counters")
@Produces({ MediaType.APPLICATION_JSON + "; " + JettyUtils.UTF_8, MediaType.APPLICATION_XML + "; " + JettyUtils.UTF_8 })
public JobCounterInfo getJobCounters(@Context HttpServletRequest hsr, @PathParam("jobid") String jid) {
    init();
    Job job = AMWebServices.getJobFromJobIdString(jid, ctx);
    checkAccess(job, hsr);
    return new JobCounterInfo(this.ctx, job);
}
Also used : JobCounterInfo(org.apache.hadoop.mapreduce.v2.app.webapp.dao.JobCounterInfo) Job(org.apache.hadoop.mapreduce.v2.app.job.Job) Path(javax.ws.rs.Path) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET)

Aggregations

GET (javax.ws.rs.GET)2 Path (javax.ws.rs.Path)2 Produces (javax.ws.rs.Produces)2 Job (org.apache.hadoop.mapreduce.v2.app.job.Job)2 JobCounterInfo (org.apache.hadoop.mapreduce.v2.app.webapp.dao.JobCounterInfo)2