Class Command
- java.lang.Object
-
- com.amazonaws.services.elasticmapreduce.model.Command
-
- All Implemented Interfaces:
Serializable,Cloneable
public class Command extends Object implements Serializable, Cloneable
An entity describing an executable that runs on a cluster.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Command()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Commandclone()booleanequals(Object obj)List<String>getArgs()Arguments for Amazon EMR to pass to the command for execution.StringgetName()The name of the command.StringgetScriptPath()The Amazon S3 location of the command script.inthashCode()voidsetArgs(Collection<String> args)Arguments for Amazon EMR to pass to the command for execution.voidsetName(String name)The name of the command.voidsetScriptPath(String scriptPath)The Amazon S3 location of the command script.StringtoString()Returns a string representation of this object; useful for testing and debugging.CommandwithArgs(String... args)Arguments for Amazon EMR to pass to the command for execution.CommandwithArgs(Collection<String> args)Arguments for Amazon EMR to pass to the command for execution.CommandwithName(String name)The name of the command.CommandwithScriptPath(String scriptPath)The Amazon S3 location of the command script.
-
-
-
Method Detail
-
setName
public void setName(String name)
The name of the command.
- Parameters:
name- The name of the command.
-
getName
public String getName()
The name of the command.
- Returns:
- The name of the command.
-
withName
public Command withName(String name)
The name of the command.
- Parameters:
name- The name of the command.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setScriptPath
public void setScriptPath(String scriptPath)
The Amazon S3 location of the command script.
- Parameters:
scriptPath- The Amazon S3 location of the command script.
-
getScriptPath
public String getScriptPath()
The Amazon S3 location of the command script.
- Returns:
- The Amazon S3 location of the command script.
-
withScriptPath
public Command withScriptPath(String scriptPath)
The Amazon S3 location of the command script.
- Parameters:
scriptPath- The Amazon S3 location of the command script.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getArgs
public List<String> getArgs()
Arguments for Amazon EMR to pass to the command for execution.
- Returns:
- Arguments for Amazon EMR to pass to the command for execution.
-
setArgs
public void setArgs(Collection<String> args)
Arguments for Amazon EMR to pass to the command for execution.
- Parameters:
args- Arguments for Amazon EMR to pass to the command for execution.
-
withArgs
public Command withArgs(String... args)
Arguments for Amazon EMR to pass to the command for execution.
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- Arguments for Amazon EMR to pass to the command for execution.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withArgs
public Command withArgs(Collection<String> args)
Arguments for Amazon EMR to pass to the command for execution.
- Parameters:
args- Arguments for Amazon EMR to pass to the command for execution.- 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()
-
-