Class JobSearchResult

java.lang.Object
com.netflix.genie.common.dto.search.BaseSearchResult
com.netflix.genie.common.dto.search.JobSearchResult
All Implemented Interfaces:
Serializable

public class JobSearchResult extends BaseSearchResult
This class represents the subset of data returned from a Job when a search for Jobs is conducted.
Since:
3.0.0
See Also:
  • Constructor Details

    • JobSearchResult

      public JobSearchResult(@NotBlank @NotBlank String id, @NotBlank @NotBlank String name, @NotBlank @NotBlank String user, @NotNull @NotNull JobStatus status, @Nullable Instant started, @Nullable Instant finished, @Nullable String clusterName, @Nullable String commandName)
      Constructor.
      Parameters:
      id - The id of the job
      name - The name of the job
      user - The user of the job
      status - The current status of the job
      started - The start time of the job
      finished - The finish time of the job
      clusterName - The name of the cluster this job is or was run on
      commandName - The name fo the command this job is or was run with
    • JobSearchResult

      public JobSearchResult(@NotBlank @NotBlank String id, @NotBlank @NotBlank String name, @NotBlank @NotBlank String user, @NotBlank @NotBlank String status, @Nullable Instant started, @Nullable Instant finished, @Nullable String clusterName, @Nullable String commandName) throws IllegalArgumentException
      Constructor.
      Parameters:
      id - The id of the job
      name - The name of the job
      user - The user of the job
      status - The current status of the job
      started - The start time of the job
      finished - The finish time of the job
      clusterName - The name of the cluster this job is or was run on
      commandName - The name fo the command this job is or was run with
      Throws:
      IllegalArgumentException - If the status string can't be parsed into a JobStatus
  • Method Details

    • getStarted

      public Optional<Instant> getStarted()
      Get the time the job started.
      Returns:
      The started time or null if not set
    • getFinished

      public Optional<Instant> getFinished()
      Get the time the job finished.
      Returns:
      The finished time or null if not set
    • getClusterName

      public Optional<String> getClusterName()
      Get the name of the cluster running the job if there currently is one.
      Returns:
      The name of the cluster where the job is running
    • getCommandName

      public Optional<String> getCommandName()
      Get the name of the command running this job if there currently is one.
      Returns:
      The name of the command