public interface JobService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
JOBS_URL_SUFFIX
Path to Jobs.
|
Modifier and Type | Method and Description |
---|---|
retrofit2.Call<Job> |
getJob(java.lang.String jobId)
Method to fetch a single job from Genie.
|
retrofit2.Call<java.util.List<Application>> |
getJobApplications(java.lang.String jobId)
Method to get the Applications for a job.
|
retrofit2.Call<Cluster> |
getJobCluster(java.lang.String jobId)
Method to get the cluster information on which a job is run.
|
retrofit2.Call<Command> |
getJobCommand(java.lang.String jobId)
Method to get the command information on which a job is run.
|
retrofit2.Call<JobExecution> |
getJobExecution(java.lang.String jobId)
Method to get the execution information for a job.
|
retrofit2.Call<JobMetadata> |
getJobMetadata(java.lang.String jobId)
Method to get the metadata information for a job.
|
retrofit2.Call<JobRequest> |
getJobRequest(java.lang.String jobId)
Method to get the JobRequest for a job.
|
retrofit2.Call<com.fasterxml.jackson.databind.JsonNode> |
getJobs(java.lang.String id,
java.lang.String name,
java.lang.String user,
java.util.Set<java.lang.String> statuses,
java.util.Set<java.lang.String> tags,
java.lang.String clusterName,
java.lang.String clusterId,
java.lang.String commandName,
java.lang.String commandId,
java.lang.Long minStarted,
java.lang.Long maxStarted,
java.lang.Long minFinished,
java.lang.Long maxFinished,
java.lang.String grouping,
java.lang.String groupingInstance)
Method to get all jobs from Genie.
|
retrofit2.Call<com.fasterxml.jackson.databind.JsonNode> |
getJobStatus(java.lang.String jobId)
Method to get Job status.
|
retrofit2.Call<okhttp3.ResponseBody> |
getJobStderr(java.lang.String jobId)
Method to fetch the stderr of a job from Genie.
|
retrofit2.Call<okhttp3.ResponseBody> |
getJobStdout(java.lang.String jobId)
Method to fetch the stdout of a job from Genie.
|
retrofit2.Call<java.lang.Void> |
killJob(java.lang.String jobId)
Method to send a job kill request to Genie.
|
retrofit2.Call<java.lang.Void> |
submitJob(JobRequest request)
Method to submit a job to Genie.
|
retrofit2.Call<java.lang.Void> |
submitJobWithAttachments(JobRequest request,
java.util.List<okhttp3.MultipartBody.Part> attachments)
Submit a job with attachments.
|
static final java.lang.String JOBS_URL_SUFFIX
@POST(value="/api/v3/jobs") retrofit2.Call<java.lang.Void> submitJob(@Body JobRequest request)
request
- The request object containing all the@Multipart @POST(value="/api/v3/jobs") retrofit2.Call<java.lang.Void> submitJobWithAttachments(@Part(value="request") JobRequest request, @Part java.util.List<okhttp3.MultipartBody.Part> attachments)
request
- A JobRequest object containing all the details needed to run the job.attachments
- A list of all the attachment files to be sent to the server.@GET(value="/api/v3/jobs") retrofit2.Call<com.fasterxml.jackson.databind.JsonNode> getJobs(@Query(value="id") java.lang.String id, @Query(value="name") java.lang.String name, @Query(value="user") java.lang.String user, @Query(value="status") java.util.Set<java.lang.String> statuses, @Query(value="tag") java.util.Set<java.lang.String> tags, @Query(value="clusterName") java.lang.String clusterName, @Query(value="clusterId") java.lang.String clusterId, @Query(value="commandName") java.lang.String commandName, @Query(value="commandId") java.lang.String commandId, @Query(value="minStarted") java.lang.Long minStarted, @Query(value="maxStarted") java.lang.Long maxStarted, @Query(value="minFinished") java.lang.Long minFinished, @Query(value="maxFinished") java.lang.Long maxFinished, @Query(value="grouping") java.lang.String grouping, @Query(value="groupingInstance") java.lang.String groupingInstance)
id
- id for jobname
- name of job (can be a SQL-style pattern such as HIVE%)user
- user who submitted jobstatuses
- statuses of jobs to findtags
- tags for the jobclusterName
- the name of the clusterclusterId
- the id of the clustercommandName
- the name of the command run by the jobcommandId
- the id of the command run by the jobminStarted
- The time which the job had to start after in order to be return (inclusive)maxStarted
- The time which the job had to start before in order to be returned (exclusive)minFinished
- The time which the job had to finish after in order to be return (inclusive)maxFinished
- The time which the job had to finish before in order to be returned (exclusive)grouping
- The grouping the job should be a member ofgroupingInstance
- The grouping instance the job should be a member of@GET(value="/api/v3/jobs/{id}") retrofit2.Call<Job> getJob(@Path(value="id") java.lang.String jobId)
jobId
- The id of the job to get.@Streaming @GET(value="/api/v3/jobs/{id}/output/stdout") retrofit2.Call<okhttp3.ResponseBody> getJobStdout(@Path(value="id") java.lang.String jobId)
jobId
- The id of the job whose stdout is desired.@Streaming @GET(value="/api/v3/jobs/{id}/output/stderr") retrofit2.Call<okhttp3.ResponseBody> getJobStderr(@Path(value="id") java.lang.String jobId)
jobId
- The id of the job whose stderr is desired.@GET(value="/api/v3/jobs/{id}/status") retrofit2.Call<com.fasterxml.jackson.databind.JsonNode> getJobStatus(@Path(value="id") java.lang.String jobId)
jobId
- The id of the job whose status is desired.@GET(value="/api/v3/jobs/{id}/cluster") retrofit2.Call<Cluster> getJobCluster(@Path(value="id") java.lang.String jobId)
jobId
- The id of the job.@GET(value="/api/v3/jobs/{id}/command") retrofit2.Call<Command> getJobCommand(@Path(value="id") java.lang.String jobId)
jobId
- The id of the job.@GET(value="/api/v3/jobs/{id}/request") retrofit2.Call<JobRequest> getJobRequest(@Path(value="id") java.lang.String jobId)
jobId
- The id of the job.@GET(value="/api/v3/jobs/{id}/execution") retrofit2.Call<JobExecution> getJobExecution(@Path(value="id") java.lang.String jobId)
jobId
- The id of the job.@GET(value="/api/v3/jobs/{id}/metadata") retrofit2.Call<JobMetadata> getJobMetadata(@Path(value="id") java.lang.String jobId)
jobId
- The id of the job.@GET(value="/api/v3/jobs/{id}/applications") retrofit2.Call<java.util.List<Application>> getJobApplications(@Path(value="id") java.lang.String jobId)
jobId
- The id of the job.@DELETE(value="/api/v3/jobs/{id}") retrofit2.Call<java.lang.Void> killJob(@Path(value="id") java.lang.String jobId)
jobId
- The id of the job.