public class Command
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
An entity describing an executable that runs on a cluster.
Modifier and Type | Field and Description |
---|---|
private SdkInternalList<java.lang.String> |
args
Arguments for Amazon EMR to pass to the command for execution.
|
private java.lang.String |
name
The name of the command.
|
private java.lang.String |
scriptPath
The Amazon S3 location of the command script.
|
Constructor and Description |
---|
Command() |
Modifier and Type | Method and Description |
---|---|
Command |
clone() |
boolean |
equals(java.lang.Object obj) |
java.util.List<java.lang.String> |
getArgs()
Arguments for Amazon EMR to pass to the command for execution.
|
java.lang.String |
getName()
The name of the command.
|
java.lang.String |
getScriptPath()
The Amazon S3 location of the command script.
|
int |
hashCode() |
void |
setArgs(java.util.Collection<java.lang.String> args)
Arguments for Amazon EMR to pass to the command for execution.
|
void |
setName(java.lang.String name)
The name of the command.
|
void |
setScriptPath(java.lang.String scriptPath)
The Amazon S3 location of the command script.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Command |
withArgs(java.util.Collection<java.lang.String> args)
Arguments for Amazon EMR to pass to the command for execution.
|
Command |
withArgs(java.lang.String... args)
Arguments for Amazon EMR to pass to the command for execution.
|
Command |
withName(java.lang.String name)
The name of the command.
|
Command |
withScriptPath(java.lang.String scriptPath)
The Amazon S3 location of the command script.
|
private java.lang.String name
The name of the command.
private java.lang.String scriptPath
The Amazon S3 location of the command script.
private SdkInternalList<java.lang.String> args
Arguments for Amazon EMR to pass to the command for execution.
public void setName(java.lang.String name)
The name of the command.
name
- The name of the command.public java.lang.String getName()
The name of the command.
public Command withName(java.lang.String name)
The name of the command.
name
- The name of the command.public void setScriptPath(java.lang.String scriptPath)
The Amazon S3 location of the command script.
scriptPath
- The Amazon S3 location of the command script.public java.lang.String getScriptPath()
The Amazon S3 location of the command script.
public Command withScriptPath(java.lang.String scriptPath)
The Amazon S3 location of the command script.
scriptPath
- The Amazon S3 location of the command script.public java.util.List<java.lang.String> getArgs()
Arguments for Amazon EMR to pass to the command for execution.
public void setArgs(java.util.Collection<java.lang.String> args)
Arguments for Amazon EMR to pass to the command for execution.
args
- Arguments for Amazon EMR to pass to the command for execution.public Command withArgs(java.lang.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)
or
withArgs(java.util.Collection)
if you want to override the
existing values.
args
- Arguments for Amazon EMR to pass to the command for execution.public Command withArgs(java.util.Collection<java.lang.String> args)
Arguments for Amazon EMR to pass to the command for execution.
args
- Arguments for Amazon EMR to pass to the command for execution.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 Command clone()
clone
in class java.lang.Object