Class Job.Builder

    • Constructor Detail

      • Builder

        public Builder​(java.lang.String name,
                       java.lang.String user,
                       java.lang.String version)
        Constructor which has required fields.
        Parameters:
        name - The name to use for the Job
        user - The user to use for the Job
        version - The version to use for the Job
        Since:
        3.3.0
      • Builder

        @Deprecated
        public Builder​(java.lang.String name,
                       java.lang.String user,
                       java.lang.String version,
                       @Nullable
                       java.lang.String commandArgs)
        Deprecated.
        Constructor which has required fields.

        Deprecated: Command args is optional. Use new constructor. Will be removed in 4.0.0

        Parameters:
        name - The name to use for the Job
        user - The user to use for the Job
        version - The version to use for the Job
        commandArgs - The command arguments used for this job. Max length 10,000 characters
        See Also:
        Builder(String, String, String)
    • Method Detail

      • withCommandArgs

        @Deprecated
        public Job.Builder withCommandArgs​(@Nullable
                                           java.lang.String commandArgs)
        Deprecated.
        The command arguments to use in conjunction with the command executable selected for this job.

        DEPRECATED: This API will be removed in 4.0.0 in favor of the List based method for improved control over escaping of arguments.

        Parameters:
        commandArgs - The command args. The max length is 10,000 characters
        Returns:
        The builder
        Since:
        3.3.0
      • withCommandArgs

        public Job.Builder withCommandArgs​(@Nullable
                                           java.util.List<java.lang.String> commandArgs)
        The command arguments to use in conjunction with the command executable selected for this job.
        Parameters:
        commandArgs - The command args. The maximum combined size of the command args plus 1 space character between each argument must be less than or equal to 10,000 characters
        Returns:
        The builder
        Since:
        3.3.0
      • withClusterName

        public Job.Builder withClusterName​(@Nullable
                                           java.lang.String clusterName)
        Set the execution cluster name for this job.
        Parameters:
        clusterName - The execution cluster name
        Returns:
        The builder
      • withCommandName

        public Job.Builder withCommandName​(@Nullable
                                           java.lang.String commandName)
        Set the name of the command used to run this job.
        Parameters:
        commandName - The name of the command
        Returns:
        The builder
      • withStatus

        public Job.Builder withStatus​(JobStatus status)
        Set the status of the job.
        Parameters:
        status - The status
        Returns:
        The builder
        See Also:
        JobStatus
      • withStatusMsg

        public Job.Builder withStatusMsg​(@Nullable
                                         java.lang.String statusMsg)
        Set the detailed status message of the job.
        Parameters:
        statusMsg - The status message
        Returns:
        The builder
      • withStarted

        public Job.Builder withStarted​(@Nullable
                                       java.time.Instant started)
        Set the started time of the job.
        Parameters:
        started - The started time of the job
        Returns:
        The builder
      • withFinished

        public Job.Builder withFinished​(@Nullable
                                        java.time.Instant finished)
        Set the finished time of the job.
        Parameters:
        finished - The time the job finished
        Returns:
        The builder
      • withArchiveLocation

        public Job.Builder withArchiveLocation​(@Nullable
                                               java.lang.String archiveLocation)
        Set the archive location of the job.
        Parameters:
        archiveLocation - The location where the job results are archived
        Returns:
        The builder
      • withGrouping

        public Job.Builder withGrouping​(@Nullable
                                        java.lang.String grouping)
        Set the grouping to use for this job.
        Parameters:
        grouping - The grouping
        Returns:
        The builder
        Since:
        3.3.0
      • withGroupingInstance

        public Job.Builder withGroupingInstance​(@Nullable
                                                java.lang.String groupingInstance)
        Set the grouping instance to use for this job.
        Parameters:
        groupingInstance - The grouping instance
        Returns:
        The builder
        Since:
        3.3.0
      • build

        public Job build()
        Build the job.
        Returns:
        Create the final read-only Job instance