@Validated
public interface JobSearchService
Modifier and Type | Method and Description |
---|---|
org.springframework.data.domain.Page<JobSearchResult> |
findJobs(java.lang.String id,
java.lang.String name,
java.lang.String user,
java.util.Set<JobStatus> 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.time.Instant minStarted,
java.time.Instant maxStarted,
java.time.Instant minFinished,
java.time.Instant maxFinished,
java.lang.String grouping,
java.lang.String groupingInstance,
@NotNull org.springframework.data.domain.Pageable page)
Search for jobs which match the given filter criteria.
|
java.util.Set<java.lang.String> |
getActiveDisconnectedAgentJobs()
Get the IDs of all agent jobs that are active but currently not connected to any node.
|
long |
getActiveJobCountForUser(@NotBlank java.lang.String user)
Get the count of 'active' jobs for a given user across all instances.
|
java.util.Set<Job> |
getAllActiveJobsOnHost(@NotBlank java.lang.String hostname)
Given a hostname return a set of all the jobs currently active on that host.
|
java.util.Set<java.lang.String> |
getAllHostsWithActiveJobs()
Get a set of host names which are currently have active jobs in the Genie cluster.
|
Job |
getJob(@NotBlank(message="No id entered. Unable to get job.") java.lang.String id)
Get job information for given job id.
|
java.util.List<Application> |
getJobApplications(@NotBlank java.lang.String id)
Get the applications the job was run with or exception if not found.
|
Cluster |
getJobCluster(@NotBlank java.lang.String id)
Get the cluster the job was run on or exception if not found.
|
Command |
getJobCommand(@NotBlank java.lang.String id)
Get the command the job was run with or exception if not found.
|
JobExecution |
getJobExecution(@NotBlank java.lang.String id)
Get job execution for given job id.
|
java.lang.String |
getJobHost(@NotBlank java.lang.String jobId)
Get the hostname a job is running on.
|
JobMetadata |
getJobMetadata(@NotBlank java.lang.String id)
Get the metadata about a job.
|
JobRequest |
getJobRequest(@NotBlank java.lang.String id)
Get job request for given job id.
|
JobStatus |
getJobStatus(@NotBlank java.lang.String id)
Deprecated.
Use
JobPersistenceService.getJobStatus(String) instead |
java.util.Map<java.lang.String,UserResourcesSummary> |
getUserResourcesSummaries()
Get a map of summaries of resources usage for each user with at least one running job.
|
org.springframework.data.domain.Page<JobSearchResult> findJobs(@Nullable java.lang.String id, @Nullable java.lang.String name, @Nullable java.lang.String user, @Nullable java.util.Set<JobStatus> statuses, @Nullable java.util.Set<java.lang.String> tags, @Nullable java.lang.String clusterName, @Nullable java.lang.String clusterId, @Nullable java.lang.String commandName, @Nullable java.lang.String commandId, @Nullable java.time.Instant minStarted, @Nullable java.time.Instant maxStarted, @Nullable java.time.Instant minFinished, @Nullable java.time.Instant maxFinished, @Nullable java.lang.String grouping, @Nullable java.lang.String groupingInstance, @NotNull @NotNull org.springframework.data.domain.Pageable page)
id
- id for jobname
- name of job (can be a SQL-style pattern such as HIVE%)user
- user who submitted jobstatuses
- statuses of jobtags
- tags for the jobclusterName
- name of cluster for jobclusterId
- id of cluster for jobcommandName
- name of the command run in the jobcommandId
- id of the command run in 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 job grouping to search forgroupingInstance
- The job grouping instance to search forpage
- Page information of job to getjava.util.Set<Job> getAllActiveJobsOnHost(@NotBlank @NotBlank java.lang.String hostname)
hostname
- The host name to search for. Not null or empty.java.util.Set<java.lang.String> getAllHostsWithActiveJobs()
Job getJob(@NotBlank(message="No id entered. Unable to get job.") @NotBlank(message="No id entered. Unable to get job.") java.lang.String id) throws GenieException
id
- id of job to look upGenieException
- if there is an error@Deprecated JobStatus getJobStatus(@NotBlank @NotBlank java.lang.String id) throws GenieException
JobPersistenceService.getJobStatus(String)
insteadid
- The id of the job to get status forGenieException
- When any error, including not found, is encounteredJobRequest getJobRequest(@NotBlank @NotBlank java.lang.String id) throws GenieException
id
- id of job request to look upGenieException
- if there is an errorJobExecution getJobExecution(@NotBlank @NotBlank java.lang.String id) throws GenieException
id
- id of job execution to look upGenieException
- if there is an errorCluster getJobCluster(@NotBlank @NotBlank java.lang.String id) throws GenieException
id
- The id of the job to get the cluster forGenieException
- If either the job or the cluster is not foundCommand getJobCommand(@NotBlank @NotBlank java.lang.String id) throws GenieException
id
- The id of the job to get the command forGenieException
- If either the job or the command is not foundjava.util.List<Application> getJobApplications(@NotBlank @NotBlank java.lang.String id) throws GenieException
id
- The id of the job to get the applications forGenieException
- If either the job or the applications were not foundjava.lang.String getJobHost(@NotBlank @NotBlank java.lang.String jobId) throws GenieNotFoundException
jobId
- The id of the job to get the hostname forGenieNotFoundException
- If the job host cannot be foundlong getActiveJobCountForUser(@NotBlank @NotBlank java.lang.String user) throws GenieException
user
- The user nameGenieException
- If any error occursJobMetadata getJobMetadata(@NotBlank @NotBlank java.lang.String id) throws GenieException
id
- The id of the job to get metadata forGenieException
- If any error occursjava.util.Map<java.lang.String,UserResourcesSummary> getUserResourcesSummaries()
java.util.Set<java.lang.String> getActiveDisconnectedAgentJobs()