public class HadoopJarStepConfig
extends java.lang.Object
implements java.io.Serializable, java.lang.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.
Modifier and Type | Field and Description |
---|---|
private SdkInternalList<java.lang.String> |
args
A list of command line arguments passed to the JAR file's main function
when executed.
|
private java.lang.String |
jar
A path to a JAR file run during the step.
|
private java.lang.String |
mainClass
The name of the main class in the specified Java file.
|
private SdkInternalList<KeyValue> |
properties
A list of Java properties that are set when the step runs.
|
Constructor and Description |
---|
HadoopJarStepConfig()
Default constructor for HadoopJarStepConfig object.
|
HadoopJarStepConfig(java.lang.String jar)
Constructs a new HadoopJarStepConfig object.
|
Modifier and Type | Method and Description |
---|---|
HadoopJarStepConfig |
clone() |
boolean |
equals(java.lang.Object obj) |
java.util.List<java.lang.String> |
getArgs()
A list of command line arguments passed to the JAR file's main function
when executed.
|
java.lang.String |
getJar()
A path to a JAR file run during the step.
|
java.lang.String |
getMainClass()
The name of the main class in the specified Java file.
|
java.util.List<KeyValue> |
getProperties()
A list of Java properties that are set when the step runs.
|
int |
hashCode() |
void |
setArgs(java.util.Collection<java.lang.String> args)
A list of command line arguments passed to the JAR file's main function
when executed.
|
void |
setJar(java.lang.String jar)
A path to a JAR file run during the step.
|
void |
setMainClass(java.lang.String mainClass)
The name of the main class in the specified Java file.
|
void |
setProperties(java.util.Collection<KeyValue> properties)
A list of Java properties that are set when the step runs.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
HadoopJarStepConfig |
withArgs(java.util.Collection<java.lang.String> args)
A list of command line arguments passed to the JAR file's main function
when executed.
|
HadoopJarStepConfig |
withArgs(java.lang.String... args)
A list of command line arguments passed to the JAR file's main function
when executed.
|
HadoopJarStepConfig |
withJar(java.lang.String jar)
A path to a JAR file run during the step.
|
HadoopJarStepConfig |
withMainClass(java.lang.String mainClass)
The name of the main class in the specified Java file.
|
HadoopJarStepConfig |
withProperties(java.util.Collection<KeyValue> properties)
A list of Java properties that are set when the step runs.
|
HadoopJarStepConfig |
withProperties(KeyValue... properties)
A list of Java properties that are set when the step runs.
|
private SdkInternalList<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.
private java.lang.String jar
A path to a JAR file run during the step.
private java.lang.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.
private SdkInternalList<java.lang.String> args
A list of command line arguments passed to the JAR file's main function when executed.
public HadoopJarStepConfig()
public HadoopJarStepConfig(java.lang.String jar)
jar
- A path to a JAR file run during the step.public java.util.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.
public void setProperties(java.util.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.
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.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)
or
withProperties(java.util.Collection)
if you want to override the
existing values.
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.public HadoopJarStepConfig withProperties(java.util.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.
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.public void setJar(java.lang.String jar)
A path to a JAR file run during the step.
jar
- A path to a JAR file run during the step.public java.lang.String getJar()
A path to a JAR file run during the step.
public HadoopJarStepConfig withJar(java.lang.String jar)
A path to a JAR file run during the step.
jar
- A path to a JAR file run during the step.public void setMainClass(java.lang.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.
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.public java.lang.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.
public HadoopJarStepConfig withMainClass(java.lang.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.
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.public java.util.List<java.lang.String> getArgs()
A list of command line arguments passed to the JAR file's main function when executed.
public void setArgs(java.util.Collection<java.lang.String> args)
A list of command line arguments passed to the JAR file's main function when executed.
args
- A list of command line arguments passed to the JAR file's main
function when executed.public HadoopJarStepConfig withArgs(java.lang.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)
or
withArgs(java.util.Collection)
if you want to override the
existing values.
args
- A list of command line arguments passed to the JAR file's main
function when executed.public HadoopJarStepConfig withArgs(java.util.Collection<java.lang.String> args)
A list of command line arguments passed to the JAR file's main function when executed.
args
- A list of command line arguments passed to the JAR file's main
function when executed.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public HadoopJarStepConfig clone()
clone
in class java.lang.Object