Class JobSearchResult
java.lang.Object
com.netflix.genie.common.dto.search.BaseSearchResult
com.netflix.genie.common.dto.search.JobSearchResult
- All Implemented Interfaces:
Serializable
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 Summary
ConstructorsConstructorDescriptionJobSearchResult
(@NotBlank String id, @NotBlank String name, @NotBlank String user, @NotBlank String status, Instant started, Instant finished, String clusterName, String commandName) Constructor.JobSearchResult
(@NotBlank String id, @NotBlank String name, @NotBlank String user, @NotNull JobStatus status, Instant started, Instant finished, String clusterName, String commandName) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGet the name of the cluster running the job if there currently is one.Get the name of the command running this job if there currently is one.Get the time the job finished.Get the time the job started.Methods inherited from class com.netflix.genie.common.dto.search.BaseSearchResult
toString
-
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 jobname
- The name of the jobuser
- The user of the jobstatus
- The current status of the jobstarted
- The start time of the jobfinished
- The finish time of the jobclusterName
- The name of the cluster this job is or was run oncommandName
- 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 jobname
- The name of the jobuser
- The user of the jobstatus
- The current status of the jobstarted
- The start time of the jobfinished
- The finish time of the jobclusterName
- The name of the cluster this job is or was run oncommandName
- The name fo the command this job is or was run with- Throws:
IllegalArgumentException
- If the status string can't be parsed into aJobStatus
-
-
Method Details
-
getStarted
Get the time the job started.- Returns:
- The started time or null if not set
-
getFinished
Get the time the job finished.- Returns:
- The finished time or null if not set
-
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
Get the name of the command running this job if there currently is one.- Returns:
- The name of the command
-