Class JobSubmission.Builder
-
- All Implemented Interfaces:
public final class JobSubmission.Builder
-
-
Constructor Summary
Constructors Constructor Description JobSubmission.Builder()
-
Method Summary
Modifier and Type Method Description final HashIDgetJobID()final UnitsetJobID(HashID jobID)final JsonNodegetConfig()final UnitsetConfig(JsonNode config)final JobSubmission.BuilderjobID(HashID jobID)final JobSubmission.Builderconfig(JsonNode config)final JobSubmission.BuilderaddInputFile(File file)Adds the given file to the job submission inputs. final JobSubmission.BuilderaddInputFile(String name, File file)Adds the given file to the job submission inputs. final JobSubmission.BuilderaddInputFile(String name, String content)Adds the given content as a file to the job submission inputs. final JobSubmission.BuilderaddInputFile(String name, InputStream content)Adds the given content as a file to the job submission inputs. final JobSubmission.BuilderaddInputFile(String name, JsonNode content)Adds the given content as a file to the job submission inputs. final JobSubmission.BuilderaddInputFile(String name, Reader content)Adds the given content as a file to the job submission inputs. final JobSubmissionbuild()Validates the configuration set on this builder and constructs a new JobSubmission instance. -
-
Method Detail
-
getJobID
final HashID getJobID()
-
getConfig
final JsonNode getConfig()
-
jobID
final JobSubmission.Builder jobID(HashID jobID)
-
config
final JobSubmission.Builder config(JsonNode config)
-
addInputFile
final JobSubmission.Builder addInputFile(File file)
Adds the given file to the job submission inputs.
Job submission inputs are persisted to the S3 store and will be made available to the job in the local scratch workspace on execution.
The name of the input file will be kept and used as the filename in both S3 and the local scratch space.
The input file name must not be one of the reserved file names listed in the project documentation.
- Parameters:
file- File to add as an input to this job.- Returns:
This Builder instance.
-
addInputFile
final JobSubmission.Builder addInputFile(String name, File file)
Adds the given file to the job submission inputs.
Job submission inputs are persisted to the S3 store and will be made available to the job in the local scratch workspace on execution.
The given name will be used as the filename in both S3 and the local scratch space.
The given name must not be one of the reserved file names listed in the project documentation.
- Parameters:
name- Name to use for the file in S3 and the local scratch space.file- File to add as an input to this job.- Returns:
This Builder instance.
-
addInputFile
final JobSubmission.Builder addInputFile(String name, String content)
Adds the given content as a file to the job submission inputs.
Job submission inputs are persisted to the S3 store and will be made available to the job in the local scratch workspace on execution.
The given name will be used as the filename in both S3 and the local scratch space.
The given name must not be one of the reserved file names listed in the project documentation.
- Parameters:
name- Name to use for the file in S3 and the local scratch space.content- Content to be written to file in S3 and the local scratch space.- Returns:
This Builder instance.
-
addInputFile
final JobSubmission.Builder addInputFile(String name, InputStream content)
Adds the given content as a file to the job submission inputs.
Job submission inputs are persisted to the S3 store and will be made available to the job in the local scratch workspace on execution.
The given name will be used as the filename in both S3 and the local scratch space.
The given name must not be one of the reserved file names listed in the project documentation.
- Parameters:
name- Name to use for the file in S3 and the local scratch space.content- Content to be written to file in S3 and the local scratch space.- Returns:
This Builder instance.
-
addInputFile
final JobSubmission.Builder addInputFile(String name, JsonNode content)
Adds the given content as a file to the job submission inputs.
Job submission inputs are persisted to the S3 store and will be made available to the job in the local scratch workspace on execution.
The given name will be used as the filename in both S3 and the local scratch space.
The given name must not be one of the reserved file names listed in the project documentation.
- Parameters:
name- Name to use for the file in S3 and the local scratch space.content- Content to be written to file in S3 and the local scratch space.- Returns:
This Builder instance.
-
addInputFile
final JobSubmission.Builder addInputFile(String name, Reader content)
Adds the given content as a file to the job submission inputs.
Job submission inputs are persisted to the S3 store and will be made available to the job in the local scratch workspace on execution.
The given name will be used as the filename in both S3 and the local scratch space.
The given name must not be one of the reserved file names listed in the project documentation.
- Parameters:
name- Name to use for the file in S3 and the local scratch space.content- Content to be written to file in S3 and the local scratch space.- Returns:
This Builder instance.
-
build
final JobSubmission build()
Validates the configuration set on this builder and constructs a new JobSubmission instance.
-
-
-
-