Amazon EMR enables you to run Hive scripts or queries in two modes:
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.