Package org.apache.nemo.common.test
Class ArgBuilder
- java.lang.Object
-
- org.apache.nemo.common.test.ArgBuilder
-
public final class ArgBuilder extends java.lang.Object
Argument builder.
-
-
Constructor Summary
Constructors Constructor Description ArgBuilder()
Constructor with default values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArgBuilder
addDAGDirectory(java.lang.String directory)
ArgBuilder
addJobId(java.lang.String jobId)
ArgBuilder
addMaxTaskAttempt(int maxAttempt)
ArgBuilder
addOptimizationPolicy(java.lang.String policy)
ArgBuilder
addResourceJson(java.lang.String executorJsonFileName)
ArgBuilder
addScheduler(java.lang.String schedulerName)
ArgBuilder
addUserArgs(java.lang.String... userArgs)
ArgBuilder
addUserMain(java.lang.String main)
java.lang.String[]
build()
-
-
-
Method Detail
-
addJobId
public ArgBuilder addJobId(java.lang.String jobId)
- Parameters:
jobId
- job id.- Returns:
- builder with the job id.
-
addUserMain
public ArgBuilder addUserMain(java.lang.String main)
- Parameters:
main
- user main class.- Returns:
- builder with the user main class.
-
addUserArgs
public ArgBuilder addUserArgs(java.lang.String... userArgs)
- Parameters:
userArgs
- user arguments.- Returns:
- builder with the user arguments.
-
addOptimizationPolicy
public ArgBuilder addOptimizationPolicy(java.lang.String policy)
- Parameters:
policy
- optimization policy.- Returns:
- builder with the optimization policy.
-
addMaxTaskAttempt
public ArgBuilder addMaxTaskAttempt(int maxAttempt)
- Parameters:
maxAttempt
- maximum number of the attempts- Returns:
- builder with the maximum number of the attempts
-
addDAGDirectory
public ArgBuilder addDAGDirectory(java.lang.String directory)
- Parameters:
directory
- directory to save the DAG.- Returns:
- builder with the DAG directory.
-
addResourceJson
public ArgBuilder addResourceJson(java.lang.String executorJsonFileName)
- Parameters:
executorJsonFileName
- the name of the executor resource file to use.- Returns:
- builder with the executor resource file.
-
addScheduler
public ArgBuilder addScheduler(java.lang.String schedulerName)
- Parameters:
schedulerName
- scheduler.- Returns:
- builder with the scheduler.
-
build
public java.lang.String[] build()
- Returns:
- the built arguments.
-
-