com.amazonaws.services.elasticmapreduce.model
Class HadoopStepConfig

java.lang.Object
  extended by com.amazonaws.services.elasticmapreduce.model.HadoopStepConfig
All Implemented Interfaces:
Serializable

public class HadoopStepConfig
extends Object
implements Serializable

A cluster 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
HadoopStepConfig()
           
 
Method Summary
 HadoopStepConfig addPropertiesEntry(String key, String value)
          The list of Java properties that are set when the step runs.
 HadoopStepConfig clearPropertiesEntries()
          Removes all the entries added into Properties.
 boolean equals(Object obj)
           
 List<String> getArgs()
          The list of command line arguments to pass to the JAR file's main function for execution.
 String getJar()
          The path to the JAR file that runs during the step.
 String getMainClass()
          The name of the main class in the specified Java file.
 Map<String,String> getProperties()
          The list of Java properties that are set when the step runs.
 int hashCode()
           
 void setArgs(Collection<String> args)
          The list of command line arguments to pass to the JAR file's main function for execution.
 void setJar(String jar)
          The path to the JAR file that runs during the step.
 void setMainClass(String mainClass)
          The name of the main class in the specified Java file.
 void setProperties(Map<String,String> properties)
          The list of Java properties that are set when the step runs.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 HadoopStepConfig withArgs(Collection<String> args)
          The list of command line arguments to pass to the JAR file's main function for execution.
 HadoopStepConfig withArgs(String... args)
          The list of command line arguments to pass to the JAR file's main function for execution.
 HadoopStepConfig withJar(String jar)
          The path to the JAR file that runs during the step.
 HadoopStepConfig withMainClass(String mainClass)
          The name of the main class in the specified Java file.
 HadoopStepConfig withProperties(Map<String,String> properties)
          The list of Java properties that are set when the step runs.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HadoopStepConfig

public HadoopStepConfig()
Method Detail

getJar

public String getJar()
The path to the JAR file that runs during the step.

Returns:
The path to the JAR file that runs during the step.

setJar

public void setJar(String jar)
The path to the JAR file that runs during the step.

Parameters:
jar - The path to the JAR file that runs during the step.

withJar

public HadoopStepConfig withJar(String jar)
The path to the JAR file that runs during the step.

Returns a reference to this object so that method calls can be chained together.

Parameters:
jar - The path to the JAR file that runs during the step.
Returns:
A reference to this updated object so that method calls can be chained together.

getProperties

public Map<String,String> getProperties()
The 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:
The 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(Map<String,String> properties)
The 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 - The 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 HadoopStepConfig withProperties(Map<String,String> properties)
The 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 reference to this object so that method calls can be chained together.

Parameters:
properties - The 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 reference to this updated object so that method calls can be chained together.

addPropertiesEntry

public HadoopStepConfig addPropertiesEntry(String key,
                                           String value)
The 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.

The method adds a new key-value pair into Properties parameter, and returns a reference to this object so that method calls can be chained together.

Parameters:
key - The key of the entry to be added into Properties.
value - The corresponding value of the entry to be added into Properties.

clearPropertiesEntries

public HadoopStepConfig clearPropertiesEntries()
Removes all the entries added into Properties.

Returns a reference to this object so that method calls can be chained together.


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.

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.

withMainClass

public HadoopStepConfig 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.

Returns a reference to this object so that method calls can be chained together.

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:
A reference to this updated object so that method calls can be chained together.

getArgs

public List<String> getArgs()
The list of command line arguments to pass to the JAR file's main function for execution.

Returns:
The list of command line arguments to pass to the JAR file's main function for execution.

setArgs

public void setArgs(Collection<String> args)
The list of command line arguments to pass to the JAR file's main function for execution.

Parameters:
args - The list of command line arguments to pass to the JAR file's main function for execution.

withArgs

public HadoopStepConfig withArgs(String... args)
The list of command line arguments to pass to the JAR file's main function for execution.

Returns a reference to this object so that method calls can be chained together.

Parameters:
args - The list of command line arguments to pass to the JAR file's main function for execution.
Returns:
A reference to this updated object so that method calls can be chained together.

withArgs

public HadoopStepConfig withArgs(Collection<String> args)
The list of command line arguments to pass to the JAR file's main function for execution.

Returns a reference to this object so that method calls can be chained together.

Parameters:
args - The list of command line arguments to pass to the JAR file's main function for execution.
Returns:
A reference to this updated 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:
toString in class Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2016. All rights reserved.