@Path(value="master/job")
@Produces(value="application/json")
public final class JobMasterClientRestServiceHandler
extends java.lang.Object
| Constructor and Description |
|---|
JobMasterClientRestServiceHandler(javax.servlet.ServletContext context)
Creates a new instance of
JobMasterClientRestServiceHandler. |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
cancel(long jobId)
Cancels a job.
|
javax.ws.rs.core.Response |
getServiceName() |
javax.ws.rs.core.Response |
getServiceVersion() |
javax.ws.rs.core.Response |
getStatus(long jobId)
Gets the job status.
|
javax.ws.rs.core.Response |
list(java.util.List<java.lang.String> statusList,
java.lang.String name)
Lists all the jobs in the history.
|
javax.ws.rs.core.Response |
run(JobConfig jobConfig)
Runs a job.
|
public JobMasterClientRestServiceHandler(@Context
javax.servlet.ServletContext context)
JobMasterClientRestServiceHandler.context - context for the servlet@GET @Path(value="service_name") public javax.ws.rs.core.Response getServiceName()
@GET @Path(value="service_version") public javax.ws.rs.core.Response getServiceVersion()
@POST
@Path(value="cancel")
public javax.ws.rs.core.Response cancel(@QueryParam(value="jobId")
long jobId)
jobId - the id of the job to cancel@GET
@Path(value="get_status")
public javax.ws.rs.core.Response getStatus(@QueryParam(value="jobId")
long jobId)
jobId - the job id@GET
@Path(value="list")
public javax.ws.rs.core.Response list(@QueryParam(value="status")
java.util.List<java.lang.String> statusList,
@QueryParam(value="name")
java.lang.String name)
statusList - the target status of jobsname - the name of jobs@POST @Path(value="run") @Consumes(value="application/json") public javax.ws.rs.core.Response run(JobConfig jobConfig)
jobConfig - the configuration of the jobCopyright © 2022. All Rights Reserved.