| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
The Amazon EMR command line interface (CLI) supports the following options.
| Option | Description |
|---|---|
--a
| Sets the AWS access identifier. |
--access-id
| Sets the AWS access identifier. |
--active |
Modifies a command to apply only to clusters in the RUNNING, STARTING or WAITING states. Used with Usage: View Cluster Details |
--add-instance-group |
Adds an instance group to an existing cluster. The role may be Usage: Resize a Running Cluster, Change the Number of Spot Instances in a Cluster |
--alive |
Used with Usage: Add Steps to a Cluster |
--all |
Modifies a command to apply only to all clusters, regardless of status. Used with |
--ami-version |
Used with --create to specify the version of the AMI to use when launching the cluster. Usage: Choose a Machine Image |
--apps-path |
Specifies the Amazon S3 path to the base of the Amazon EMR bucket to use, for example: |
--arg |
Passes in a single argument value to a script or application running on the cluster. Usage: Launch a Hive Cluster, Launch a Pig Cluster, Launch a Cascading Cluster, Add Steps to a Cluster, Create Bootstrap Actions to Install Additional Software (Optional) |
--args |
Passes in multiple arguments, separated by commas, to a script or application running on the cluster. This is a shorthand for specifying multiple --arg options. The arguments passed in with --args, however, cannot contain unescaped commas. The argument string may be surrounded with double-quotes. Usage: Launch a Hive Cluster, Launch a Pig Cluster, Launch a Cascading Cluster, Add Steps to a Cluster, Create Bootstrap Actions to Install Additional Software (Optional) |
--availability-zone |
The Availability Zone to launch the cluster in. For more information about Availability Zones supported by Amazon EMR, see Regions and Endpoints in the Amazon Web Services General Reference. |
--backup-dir |
The directory where an Hbase backup exists or should be created. Usage: Back Up and Restore HBase |
--backup-version |
Specifies the version number of an existing Hbase backup to restore. Usage: Back Up and Restore HBase |
--beta-path |
Specifies the Amazon S3 path to the base of the Amazon EMR bucket to use, for example: |
--bid-price |
The bid price, in U.S. dollars, for a group of Spot Instances. |
--bootstrap-action |
Used with Usage: Create Bootstrap Actions to Install Additional Software (Optional) |
--bootstrap-name |
Sets the name of the bootstrap action. Usage: Create Bootstrap Actions to Install Additional Software (Optional) |
--c |
Specifies the credentials file that contains the AWS access identifier and the AWS private key to use when contacting the Amazon EMR web service. |
--cache |
Adds an individual file to the Distributed Cache. |
--cache-archive |
Adds an archive file to the Distributed Cache |
--consistent |
Pauses all write operations to the HBase cluster during the backup process, to ensure a consistent backup. Usage: Back Up and Restore HBase |
--create |
Launches a new cluster. Usage: Launch a Streaming Cluster, Launch a Hive Cluster, Launch a Pig Cluster, Launch a Cascading Cluster, Launch an HBase Cluster on Amazon EMR |
--created-after |
Lists all clusters created after the specified time and date in XML date-time format. |
--created-before= |
Lists all clusters created before the specified time and date in XML date-time format. |
--credentials |
Specifies the credentials file that contains the AWS access identifier and the AWS private key to use when contacting the Amazon EMR web service. |
--eip |
Associates an elastic IP to the master node. If no elastic IP is specified, allocate a new elastic IP and associate it to the master node. |
--enable-debugging |
Used with |
--endpoint |
Specifies the endpoint of the Amazon EMR web service to connect to. |
--debug |
Prints stack traces when exceptions occur. |
--describe |
Returns information about the specified cluster or clusters. Usage: View Cluster Details |
--disable-full-backups |
Turns off scheduled full Hbase backups by passing this flag into a call
with Usage: Back Up and Restore HBase |
--disable-incremental-backups |
Turns off scheduled incremental Hbase backups by passing this flag into a call
with Usage: Back Up and Restore HBase |
--full-backup-time-interval INTERVAL |
An integer that specifies the period of time units to elapse between automated full backups of the HBase cluster. Usage: Back Up and Restore HBase |
--full-backup-time-unit TIME_UNIT |
The unit of time to use with
Usage: Back Up and Restore HBase |
--get |
Copies the specified file from the master node using scp. |
--h |
Displays help information from the CLI. |
--hadoop-version |
Used with Usage: Supported Hadoop Versions |
--hbase |
Used to launch an Hbase cluster. |
--hbase-backup |
Creates a one-time backup of HBase data to the location specified by Usage: Back Up and Restore HBase |
--hbase-restore |
Restores a backup from the location specified by
Usage: Back Up and Restore HBase |
--hbase-schedule-backup |
Schedules an automated backup of HBase data. Usage: Back Up and Restore HBase |
--help |
Displays help information from the CLI. |
--hive-interactive |
Used with --create to launch a cluster with Hive installed. |
--hive-script |
The Hive script to run in the cluster. |
--hive-site |
Installs the configuration values in hive-site.xml in the specified
location. The Usage: Create a Metastore Outside the Hadoop Cluster, Additional Features of Hive in Amazon EMR |
--hive-versions |
The Hive version or versions to load. This can be a Hive version number or "latest" to load the latest version. When you specify more than one Hive version, separate the versions with a comma. Usage: Supported Hive Versions |
--incremental-backup-time-interval TIME_INTERVAL |
An integer that specifies the period of time units to elapse
between automated incremental backups of the HBase cluster.
Used with Usage: Back Up and Restore HBase |
--incremental-backup-time-unit ITME_UNIT |
The unit of time to use with
Usage: Back Up and Restore HBase |
--info |
Specifies additional information during cluster creation. |
--input |
Specifies the input location for the cluster. Usage: Launch a Streaming Cluster |
--instance-count |
Sets the count of nodes for an instance group. Usage: Resize a Running Cluster, Change the Number of Spot Instances in a Cluster |
--instance-group |
Sets the instance group type. A type is MASTER, CORE, or TASK. Usage: Resize a Running Cluster |
--instance-type |
Sets the type of EC2 instance to create nodes for an instance group. Usage: Resize a Running Cluster, Launch Spot Instances in a Cluster |
--j |
Specifies the cluster with the given cluster identifier. Usage: View Cluster Details, Add Steps to a Cluster, Resize a Running Cluster, Change the Number of Spot Instances in a Cluster |
--jar |
Specifies the location of a Java archive (JAR) file. Typically, the JAR file is stored in an Amazon S3 bucket. Usage: Resize a Running Cluster, Distributed Copy Using S3DistCp |
--jobconf |
Specifies jobconf arguments to pass to a streaming cluster, for example |
--jobflow |
Specifies the cluster with the given cluster identifier. Usage: View Cluster Details, Add Steps to a Cluster, Resize a Running Cluster, Change the Number of Spot Instances in a Cluster |
--jobflow-role |
Launches the EC2 instances of a cluster with the specified IAM role. |
--json |
Adds a sequence of steps stored in the specified JSON file to the cluster. |
--key-pair |
The name of the Amazon EC2 key pair to set as the connection credential when you launch the cluster. |
--key-pair-file |
The path to the local PEM file of the Amazon EC2 key pair to set as the connection credential when you launch the cluster. |
--list |
Lists clusters created in the last two days. Usage: View Cluster Details |
--logs |
Displays the step logs for the step most recently executed. |
--log-uri |
Specifies the Amazon S3 bucket to receive log files. Used with Usage: View HBase Log Files |
--main-class |
Specifies the JAR file's main class. This parameter is not needed if your JAR file has a manifest. Usage: Add Steps to a Cluster |
--mapper |
The name of a Hadoop built-in class or the location of a mapper script. Usage: Launch a Streaming Cluster |
--master-instance-type |
The type of EC2 instances to launch as the master nodes in the cluster. |
--modify-instance-group |
Modifies an existing instance group. Usage: Resize a Running Cluster, Change the Number of Spot Instances in a Cluster |
--name " |
Specifies a name for the cluster. This can only be set when the jobflow is created. Usage: Launch a Streaming Cluster, Launch a Hive Cluster, Launch a Pig Cluster, Launch a Cascading Cluster, Launch an HBase Cluster on Amazon EMR |
--no-wait |
Don't wait for the master node to start before executing scp or ssh or assigning an eip. |
--no-steps |
Prevents the CLI from listing steps when listing clusters. |
--num-instances |
Used with Usage: Launch a Streaming Cluster, Launch a Hive Cluster, Launch a Pig Cluster, Launch a Cascading Cluster, Launch an HBase Cluster on Amazon EMR, Change the Number of Spot Instances in a Cluster |
--output |
Specifies the output location for the cluster. Usage: Launch a Streaming Cluster |
--p |
Specifies the AWS private key to use when contacting the Amazon EMR web service. |
--param |
Substitutes the string |
--pig-interactive |
Used with Usage: Launch a Pig Cluster |
--pig-versions |
Specifies the version or versions of Pig to install on the cluster. If specifying more than one version of Pig, separated the versions with commas. Usage: Supported Pig Versions |
--pig-script |
The Pig script to run in the cluster. Usage: Launch a Pig Cluster |
--plain-output |
Returns the cluster identifier from the create step as simple text. |
--put |
Copies a file to the master node using scp. |
--print-hive-version |
Prints the version of Hive that is currently active on the cluster. Usage: Supported Hive Versions |
--print-pig-version |
Prints the version of Pig that is currently active on the cluster. Usage: Supported Pig Versions |
--private-key |
Specifies the AWS private key to use when contacting the Amazon EMR web service. |
--reducer |
The name of a Hadoop built-in class or the location of a reducer script. Usage: Launch a Streaming Cluster |
--region |
Specifies the region in which to launch the cluster. Usage: Choose an AWS Region |
--resize-jobflow |
Adds a step to resize the cluster. |
--scp |
Copies a file from your local directory to the master node of the cluster. Usage: Add Steps to a Cluster |
--script | Specifies the location of a script. Typically, the script is stored in an Amazon S3 bucket. |
--set-termination-protection |
Enables or disables termination protection on the specified cluster or clusters. To enable termination protection, set this value to true. To disable termination protection, set this value to false. |
--set-visible-to-all-users |
Makes the instances in an existing cluster visible to all IAM users of the AWS account that launched the cluster. |
--slave-instance-type |
The type of EC2 instances to launch as the slave nodes in the cluster. |
--socks |
Uses SSH to create a tunnel to the master node of the specified cluster. You can then use this as a SOCKS proxy to view web interfaces hosted on the master node. Usage: Open an SSH Tunnel to the Master Node, Configure FoxyProxy to View Websites Hosted on the Master Node |
--ssh COMMAND |
Uses SSH to connect to the master node of the specified cluster and, optionally, run a command. This option requires that you have an SSH client, such as OpenSSH, installed on your desktop. |
--start-time |
Specifies the time that a Hbase backup schedule should start. If this is not set, the first backup begins immediately. This should be in ISO date-time format.You can use this to ensure your first data load process has completed before performing the initial backup or to have the backup occur at a specific time each day. Usage: Back Up and Restore HBase |
--state |
Specifies the state of the cluster. You can specify more than one state by adding multiple state options to the command. The cluster state will be one of the following values: STARTING, RUNNING, WAITING, TERMINATED. Usage: View Cluster Details |
--step-name |
Specifies a name for a cluster step. |
--step-action |
Specifies the action the cluster should take when the step finishes. This can be one of |
--stream |
Used with Usage: Launch a Streaming Cluster |
--subnet |
Launches a cluster in an Amazon VPC subnet. Usage: Select a Amazon VPC Subnet for the Cluster (Optional) |
--supported-product |
Installs third-party software on an Amazon EMR cluster; for example, installing a
third-party distribution of Hadoop. It accepts optional arguments
for the third-party software to read and act on. It is used with
Usage: Use Karmasphere Analytics, Using the MapR Distribution for Hadoop |
--terminate |
Terminates the specified cluster or clusters. Usage: Terminate a Cluster |
--to |
Specifies the destination location when copying files to and from the master node using scp. |
--trace |
Traces commands made to the web service. |
--unarrest-instance-group INSTANCE_ROLE |
Unarrests an instance group of the cluster. |
--v |
Turns on verbose logging of program interaction. |
--verbose |
Turns on verbose logging of program interaction. |
--version |
Displays the version of the CLI. |
--visible-to-all-users |
Makes a cluster visible to all IAM users. Used with |
--wait-for-steps |
Causes the cluster to wait until a step has completed. Usage: Add Steps to a Cluster |
--with-termination-protection |
Used with |