@Validated
public interface JobSearchService
| Modifier and Type | Method and Description |
|---|---|
org.springframework.data.domain.Page<com.netflix.genie.common.dto.search.JobSearchResult> |
findJobs(java.lang.String id,
java.lang.String name,
java.lang.String user,
java.util.Set<com.netflix.genie.common.dto.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<com.netflix.genie.common.dto.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.
|
com.netflix.genie.common.dto.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<com.netflix.genie.common.dto.Application> |
getJobApplications(@NotBlank java.lang.String id)
Get the applications the job was run with or exception if not found.
|
com.netflix.genie.common.dto.Cluster |
getJobCluster(@NotBlank java.lang.String id)
Get the cluster the job was run on or exception if not found.
|
com.netflix.genie.common.dto.Command |
getJobCommand(@NotBlank java.lang.String id)
Get the command the job was run with or exception if not found.
|
com.netflix.genie.common.dto.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.
|
com.netflix.genie.common.dto.JobMetadata |
getJobMetadata(@NotBlank java.lang.String id)
Get the metadata about a job.
|
com.netflix.genie.common.dto.JobRequest |
getJobRequest(@NotBlank java.lang.String id)
Get job request for given job id.
|
com.netflix.genie.common.dto.JobStatus |
getJobStatus(@NotBlank java.lang.String id)
Deprecated.
Use
JobPersistenceService.getJobStatus(String) instead |
java.util.Map<java.lang.String,com.netflix.genie.common.dto.UserResourcesSummary> |
getUserResourcesSummaries()
Get a map of summaries of resources usage for each user with at least one running job.
|
org.springframework.data.domain.Page<com.netflix.genie.common.dto.search.JobSearchResult> findJobs(@Nullable
java.lang.String id,
@Nullable
java.lang.String name,
@Nullable
java.lang.String user,
@Nullable
java.util.Set<com.netflix.genie.common.dto.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<com.netflix.genie.common.dto.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()
com.netflix.genie.common.dto.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 com.netflix.genie.common.exceptions.GenieException
id - id of job to look upcom.netflix.genie.common.exceptions.GenieException - if there is an error@Deprecated
com.netflix.genie.common.dto.JobStatus getJobStatus(@NotBlank
@NotBlank java.lang.String id)
throws com.netflix.genie.common.exceptions.GenieException
JobPersistenceService.getJobStatus(String) insteadid - The id of the job to get status forcom.netflix.genie.common.exceptions.GenieException - When any error, including not found, is encounteredcom.netflix.genie.common.dto.JobRequest getJobRequest(@NotBlank
@NotBlank java.lang.String id)
throws com.netflix.genie.common.exceptions.GenieException
id - id of job request to look upcom.netflix.genie.common.exceptions.GenieException - if there is an errorcom.netflix.genie.common.dto.JobExecution getJobExecution(@NotBlank
@NotBlank java.lang.String id)
throws com.netflix.genie.common.exceptions.GenieException
id - id of job execution to look upcom.netflix.genie.common.exceptions.GenieException - if there is an errorcom.netflix.genie.common.dto.Cluster getJobCluster(@NotBlank
@NotBlank java.lang.String id)
throws com.netflix.genie.common.exceptions.GenieException
id - The id of the job to get the cluster forcom.netflix.genie.common.exceptions.GenieException - If either the job or the cluster is not foundcom.netflix.genie.common.dto.Command getJobCommand(@NotBlank
@NotBlank java.lang.String id)
throws com.netflix.genie.common.exceptions.GenieException
id - The id of the job to get the command forcom.netflix.genie.common.exceptions.GenieException - If either the job or the command is not foundjava.util.List<com.netflix.genie.common.dto.Application> getJobApplications(@NotBlank
@NotBlank java.lang.String id)
throws com.netflix.genie.common.exceptions.GenieException
id - The id of the job to get the applications forcom.netflix.genie.common.exceptions.GenieException - If either the job or the applications were not foundjava.lang.String getJobHost(@NotBlank
@NotBlank java.lang.String jobId)
throws com.netflix.genie.common.exceptions.GenieNotFoundException
jobId - The id of the job to get the hostname forcom.netflix.genie.common.exceptions.GenieNotFoundException - If the job host cannot be foundlong getActiveJobCountForUser(@NotBlank
@NotBlank java.lang.String user)
throws com.netflix.genie.common.exceptions.GenieException
user - The user namecom.netflix.genie.common.exceptions.GenieException - If any error occurscom.netflix.genie.common.dto.JobMetadata getJobMetadata(@NotBlank
@NotBlank java.lang.String id)
throws com.netflix.genie.common.exceptions.GenieException
id - The id of the job to get metadata forcom.netflix.genie.common.exceptions.GenieException - If any error occursjava.util.Map<java.lang.String,com.netflix.genie.common.dto.UserResourcesSummary> getUserResourcesSummaries()
java.util.Set<java.lang.String> getActiveDisconnectedAgentJobs()