Amazon Elastic MapReduce
Developer Guide (API Version 2009-03-31)
Did this page help you?  Yes | No |  Tell us about it...
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.

Using Hive Interactively or in Batch Mode

Amazon EMR enables you to run Hive scripts or queries in two modes:

  • Interactive

  • Batch

When you launch a long-running cluster using the console or the AWS CLI, you can ssh into the master node as the Hadoop user and use the Hive Command Line Interface to develop and run your Hive scripts interactively. Using Hive interactively enables you to revise the Hive script more easily than batch mode. After you successfully revise the Hive script in interactive mode, you can upload the script to Amazon S3 and use batch mode to run the script in production.

In batch mode, you upload your Hive script to Amazon S3, and then submit the work to the cluster as a step. Hive steps can be submitted to a long-running cluster or a transient cluster. For more information on submitting work to a cluster, see Submit Work to a Cluster. An example of launching a long-running cluster and submitting a Hive step can be found here: Submit Hive Work.