Running Hive

Run Hive as a server or as a client. HiveServer is an optional service for remote clients to submit programmatic requests to Hive.

You can run Hive as a server or as a client. Use a Hive client on a node in the cluster under these conditions:
  • To connect to the Hive server running on another node
  • To use Hive in a single-node cluster

Start a Hive client

You can start a Hive client on any analytics node and run MapReduce queries directly on data already stored in Cassandra. You run Hive as a client to perform the examples in this document.

Procedure

  1. Start DataStax Enterprise as an analytics (Hadoop) node.
    • Packaged installs:
      1. Enable Hadoop mode by setting this option in /etc/default/dse:
        HADOOP_ENABLED=1
      2. Use this command to start the service:
        $ sudo service dse start
    • Tarball installs:

      From the installation directory:

      $ bin/dse cassandra -t
  2. Start a Hive client.
    • Packaged installs:
      $ dse hive
    • Tarball installs:
      $ install_location/bin/dse hive
    The hive prompt appears and you can now enter HiveQL shell commands.