Package org.apache.flink.test.util
Class JobSubmission.JobSubmissionBuilder
- java.lang.Object
-
- org.apache.flink.test.util.JobSubmission.JobSubmissionBuilder
-
- Enclosing class:
- JobSubmission
public static class JobSubmission.JobSubmissionBuilder extends Object
Builder for theJobSubmission
.
-
-
Constructor Summary
Constructors Constructor Description JobSubmissionBuilder(Path jar)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JobSubmission.JobSubmissionBuilder
addArgument(String argument)
Adds a program argument.JobSubmission.JobSubmissionBuilder
addArgument(String key, String value)
Convenience method for providing key-value program arguments.JobSubmission
build()
JobSubmission.JobSubmissionBuilder
setDetached(boolean detached)
Sets whether the job should be submitted in a detached manner.JobSubmission.JobSubmissionBuilder
setMainClass(String mainClass)
Sets the main class for the job.JobSubmission.JobSubmissionBuilder
setParallelism(int parallelism)
Sets the parallelism for the job.
-
-
-
Constructor Detail
-
JobSubmissionBuilder
public JobSubmissionBuilder(Path jar)
-
-
Method Detail
-
setMainClass
public JobSubmission.JobSubmissionBuilder setMainClass(String mainClass)
Sets the main class for the job.- Parameters:
mainClass
- main class for the job- Returns:
- the modified builder
-
setParallelism
public JobSubmission.JobSubmissionBuilder setParallelism(int parallelism)
Sets the parallelism for the job.- Parameters:
parallelism
- parallelism for the job- Returns:
- the modified builder
-
setDetached
public JobSubmission.JobSubmissionBuilder setDetached(boolean detached)
Sets whether the job should be submitted in a detached manner.- Parameters:
detached
- whether to submit the job in a detached manner- Returns:
- the modified builder
-
addArgument
public JobSubmission.JobSubmissionBuilder addArgument(String argument)
Adds a program argument.- Parameters:
argument
- argument argument- Returns:
- the modified builder
-
addArgument
public JobSubmission.JobSubmissionBuilder addArgument(String key, String value)
Convenience method for providing key-value program arguments. Invoking this method is equivalent to invokingaddArgument(String)
twice.- Parameters:
key
- argument keyvalue
- argument value- Returns:
- the modified builder
-
build
public JobSubmission build()
-
-