Class HadoopJarStepConfig
- java.lang.Object
-
- com.amazonaws.services.elasticmapreduce.model.HadoopJarStepConfig
-
- All Implemented Interfaces:
Serializable,Cloneable
public class HadoopJarStepConfig extends Object implements Serializable, Cloneable
A job flow step consisting of a JAR file whose main function will be executed. The main function submits a job for Hadoop to execute and waits for the job to finish or fail.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HadoopJarStepConfig()Default constructor for HadoopJarStepConfig object.HadoopJarStepConfig(String jar)Constructs a new HadoopJarStepConfig object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HadoopJarStepConfigclone()booleanequals(Object obj)List<String>getArgs()A list of command line arguments passed to the JAR file's main function when executed.StringgetJar()A path to a JAR file run during the step.StringgetMainClass()The name of the main class in the specified Java file.List<KeyValue>getProperties()A list of Java properties that are set when the step runs.inthashCode()voidsetArgs(Collection<String> args)A list of command line arguments passed to the JAR file's main function when executed.voidsetJar(String jar)A path to a JAR file run during the step.voidsetMainClass(String mainClass)The name of the main class in the specified Java file.voidsetProperties(Collection<KeyValue> properties)A list of Java properties that are set when the step runs.StringtoString()Returns a string representation of this object; useful for testing and debugging.HadoopJarStepConfigwithArgs(String... args)A list of command line arguments passed to the JAR file's main function when executed.HadoopJarStepConfigwithArgs(Collection<String> args)A list of command line arguments passed to the JAR file's main function when executed.HadoopJarStepConfigwithJar(String jar)A path to a JAR file run during the step.HadoopJarStepConfigwithMainClass(String mainClass)The name of the main class in the specified Java file.HadoopJarStepConfigwithProperties(KeyValue... properties)A list of Java properties that are set when the step runs.HadoopJarStepConfigwithProperties(Collection<KeyValue> properties)A list of Java properties that are set when the step runs.
-
-
-
Constructor Detail
-
HadoopJarStepConfig
public HadoopJarStepConfig()
Default constructor for HadoopJarStepConfig object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
-
HadoopJarStepConfig
public HadoopJarStepConfig(String jar)
Constructs a new HadoopJarStepConfig object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.- Parameters:
jar- A path to a JAR file run during the step.
-
-
Method Detail
-
getProperties
public List<KeyValue> getProperties()
A list of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.
- Returns:
- A list of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.
-
setProperties
public void setProperties(Collection<KeyValue> properties)
A list of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.
- Parameters:
properties- A list of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.
-
withProperties
public HadoopJarStepConfig withProperties(KeyValue... properties)
A list of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.
NOTE: This method appends the values to the existing list (if any). Use
setProperties(java.util.Collection)orwithProperties(java.util.Collection)if you want to override the existing values.- Parameters:
properties- A list of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withProperties
public HadoopJarStepConfig withProperties(Collection<KeyValue> properties)
A list of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.
- Parameters:
properties- A list of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setJar
public void setJar(String jar)
A path to a JAR file run during the step.
- Parameters:
jar- A path to a JAR file run during the step.
-
getJar
public String getJar()
A path to a JAR file run during the step.
- Returns:
- A path to a JAR file run during the step.
-
withJar
public HadoopJarStepConfig withJar(String jar)
A path to a JAR file run during the step.
- Parameters:
jar- A path to a JAR file run during the step.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setMainClass
public void setMainClass(String mainClass)
The name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file.
- Parameters:
mainClass- The name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file.
-
getMainClass
public String getMainClass()
The name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file.
- Returns:
- The name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file.
-
withMainClass
public HadoopJarStepConfig withMainClass(String mainClass)
The name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file.
- Parameters:
mainClass- The name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getArgs
public List<String> getArgs()
A list of command line arguments passed to the JAR file's main function when executed.
- Returns:
- A list of command line arguments passed to the JAR file's main function when executed.
-
setArgs
public void setArgs(Collection<String> args)
A list of command line arguments passed to the JAR file's main function when executed.
- Parameters:
args- A list of command line arguments passed to the JAR file's main function when executed.
-
withArgs
public HadoopJarStepConfig withArgs(String... args)
A list of command line arguments passed to the JAR file's main function when executed.
NOTE: This method appends the values to the existing list (if any). Use
setArgs(java.util.Collection)orwithArgs(java.util.Collection)if you want to override the existing values.- Parameters:
args- A list of command line arguments passed to the JAR file's main function when executed.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withArgs
public HadoopJarStepConfig withArgs(Collection<String> args)
A list of command line arguments passed to the JAR file's main function when executed.
- Parameters:
args- A list of command line arguments passed to the JAR file's main function when executed.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public HadoopJarStepConfig clone()
-
-