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 Command
clone()
boolean
equals(Object obj)
List<String>
getArgs()
Arguments for Amazon EMR to pass to the command for execution.String
getName()
The name of the command.String
getScriptPath()
The Amazon S3 location of the command script.int
hashCode()
void
setArgs(Collection<String> args)
Arguments for Amazon EMR to pass to the command for execution.void
setName(String name)
The name of the command.void
setScriptPath(String scriptPath)
The Amazon S3 location of the command script.String
toString()
Returns a string representation of this object; useful for testing and debugging.Command
withArgs(String... args)
Arguments for Amazon EMR to pass to the command for execution.Command
withArgs(Collection<String> args)
Arguments for Amazon EMR to pass to the command for execution.Command
withName(String name)
The name of the command.Command
withScriptPath(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:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-