@Path(value="/ws/v1/mapreduce") public class AMWebServices extends Object
| Constructor and Description |
|---|
AMWebServices(App app,
AppContext context) |
| Modifier and Type | Method and Description |
|---|---|
AppInfo |
get() |
AppInfo |
getAppInfo() |
BlacklistedNodesInfo |
getBlacklistedNodes() |
JobInfo |
getJob(javax.servlet.http.HttpServletRequest hsr,
String jid) |
AMAttemptsInfo |
getJobAttempts(String jid) |
ConfInfo |
getJobConf(javax.servlet.http.HttpServletRequest hsr,
String jid) |
JobCounterInfo |
getJobCounters(javax.servlet.http.HttpServletRequest hsr,
String jid) |
static Job |
getJobFromJobIdString(String jid,
AppContext appCtx)
convert a job id string to an actual job and handle all the error checking.
|
JobsInfo |
getJobs(javax.servlet.http.HttpServletRequest hsr) |
TaskInfo |
getJobTask(javax.servlet.http.HttpServletRequest hsr,
String jid,
String tid) |
TaskAttemptInfo |
getJobTaskAttemptId(javax.servlet.http.HttpServletRequest hsr,
String jid,
String tid,
String attId) |
JobTaskAttemptCounterInfo |
getJobTaskAttemptIdCounters(javax.servlet.http.HttpServletRequest hsr,
String jid,
String tid,
String attId) |
TaskAttemptsInfo |
getJobTaskAttempts(javax.servlet.http.HttpServletRequest hsr,
String jid,
String tid) |
JobTaskAttemptState |
getJobTaskAttemptState(javax.servlet.http.HttpServletRequest hsr,
String jid,
String tid,
String attId) |
TasksInfo |
getJobTasks(javax.servlet.http.HttpServletRequest hsr,
String jid,
String type) |
JobTaskCounterInfo |
getSingleTaskCounters(javax.servlet.http.HttpServletRequest hsr,
String jid,
String tid) |
static TaskAttempt |
getTaskAttemptFromTaskAttemptString(String attId,
Task task)
convert a task attempt id string to an actual task attempt and handle all
the error checking.
|
static Task |
getTaskFromTaskIdString(String tid,
Job job)
convert a task id string to an actual task and handle all the error
checking.
|
protected javax.ws.rs.core.Response |
killJobTaskAttempt(TaskAttempt ta,
org.apache.hadoop.security.UserGroupInformation callerUGI,
javax.servlet.http.HttpServletRequest hsr) |
javax.ws.rs.core.Response |
updateJobTaskAttemptState(JobTaskAttemptState targetState,
javax.servlet.http.HttpServletRequest hsr,
String jid,
String tid,
String attId) |
@Inject public AMWebServices(App app, AppContext context)
public static Job getJobFromJobIdString(String jid, AppContext appCtx) throws org.apache.hadoop.yarn.webapp.NotFoundException
org.apache.hadoop.yarn.webapp.NotFoundExceptionpublic static Task getTaskFromTaskIdString(String tid, Job job) throws org.apache.hadoop.yarn.webapp.NotFoundException
org.apache.hadoop.yarn.webapp.NotFoundExceptionpublic static TaskAttempt getTaskAttemptFromTaskAttemptString(String attId, Task task) throws org.apache.hadoop.yarn.webapp.NotFoundException
org.apache.hadoop.yarn.webapp.NotFoundException@GET
@Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"})
public AppInfo get()
@GET
@Path(value="/info")
@Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"})
public AppInfo getAppInfo()
@GET
@Path(value="/blacklistednodes")
@Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"})
public BlacklistedNodesInfo getBlacklistedNodes()
@GET
@Path(value="/jobs")
@Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"})
public JobsInfo getJobs(@Context
javax.servlet.http.HttpServletRequest hsr)
@GET
@Path(value="/jobs/{jobid}")
@Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"})
public JobInfo getJob(@Context
javax.servlet.http.HttpServletRequest hsr,
@PathParam(value="jobid")
String jid)
@GET
@Path(value="/jobs/{jobid}/jobattempts")
@Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"})
public AMAttemptsInfo getJobAttempts(@PathParam(value="jobid")
String jid)
@GET
@Path(value="/jobs/{jobid}/counters")
@Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"})
public JobCounterInfo getJobCounters(@Context
javax.servlet.http.HttpServletRequest hsr,
@PathParam(value="jobid")
String jid)
@GET
@Path(value="/jobs/{jobid}/conf")
@Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"})
public ConfInfo getJobConf(@Context
javax.servlet.http.HttpServletRequest hsr,
@PathParam(value="jobid")
String jid)
@GET
@Path(value="/jobs/{jobid}/tasks")
@Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"})
public TasksInfo getJobTasks(@Context
javax.servlet.http.HttpServletRequest hsr,
@PathParam(value="jobid")
String jid,
@QueryParam(value="type")
String type)
@GET
@Path(value="/jobs/{jobid}/tasks/{taskid}")
@Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"})
public TaskInfo getJobTask(@Context
javax.servlet.http.HttpServletRequest hsr,
@PathParam(value="jobid")
String jid,
@PathParam(value="taskid")
String tid)
@GET
@Path(value="/jobs/{jobid}/tasks/{taskid}/counters")
@Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"})
public JobTaskCounterInfo getSingleTaskCounters(@Context
javax.servlet.http.HttpServletRequest hsr,
@PathParam(value="jobid")
String jid,
@PathParam(value="taskid")
String tid)
@GET
@Path(value="/jobs/{jobid}/tasks/{taskid}/attempts")
@Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"})
public TaskAttemptsInfo getJobTaskAttempts(@Context
javax.servlet.http.HttpServletRequest hsr,
@PathParam(value="jobid")
String jid,
@PathParam(value="taskid")
String tid)
@GET
@Path(value="/jobs/{jobid}/tasks/{taskid}/attempts/{attemptid}")
@Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"})
public TaskAttemptInfo getJobTaskAttemptId(@Context
javax.servlet.http.HttpServletRequest hsr,
@PathParam(value="jobid")
String jid,
@PathParam(value="taskid")
String tid,
@PathParam(value="attemptid")
String attId)
@GET
@Path(value="/jobs/{jobid}/tasks/{taskid}/attempts/{attemptid}/state")
@Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"})
public JobTaskAttemptState getJobTaskAttemptState(@Context
javax.servlet.http.HttpServletRequest hsr,
@PathParam(value="jobid")
String jid,
@PathParam(value="taskid")
String tid,
@PathParam(value="attemptid")
String attId)
throws IOException,
InterruptedException
IOExceptionInterruptedException@PUT
@Path(value="/jobs/{jobid}/tasks/{taskid}/attempts/{attemptid}/state")
@Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"})
@Consumes(value={"application/json","application/xml"})
public javax.ws.rs.core.Response updateJobTaskAttemptState(JobTaskAttemptState targetState,
@Context
javax.servlet.http.HttpServletRequest hsr,
@PathParam(value="jobid")
String jid,
@PathParam(value="taskid")
String tid,
@PathParam(value="attemptid")
String attId)
throws IOException,
InterruptedException
IOExceptionInterruptedException@GET
@Path(value="/jobs/{jobid}/tasks/{taskid}/attempts/{attemptid}/counters")
@Produces(value={"application/json; charset=utf-8","application/xml; charset=utf-8"})
public JobTaskAttemptCounterInfo getJobTaskAttemptIdCounters(@Context
javax.servlet.http.HttpServletRequest hsr,
@PathParam(value="jobid")
String jid,
@PathParam(value="taskid")
String tid,
@PathParam(value="attemptid")
String attId)
protected javax.ws.rs.core.Response killJobTaskAttempt(TaskAttempt ta, org.apache.hadoop.security.UserGroupInformation callerUGI, javax.servlet.http.HttpServletRequest hsr) throws IOException, InterruptedException
IOExceptionInterruptedExceptionCopyright © 2008–2022 Apache Software Foundation. All rights reserved.