Install and Configure Hive

  1. Install and configure Hive if it is not already installed. See Installing Hive for details.
  2. Execute the jps command and ensure that all relevant Hadoop, MapR, and Zookeeper processes are running. Example:
    $ jps
    1549 jenkins.war
    15051 QuorumPeerMain
    30935 Jps
    15551 CommandServer
    15293 ResourceManager
    15328 NodeManager
    15131 WardenMain
  3. Open the hive-site.xml file with your favorite editor, or create a hive-site.xml file if it doesn't already exist:
    $ cd $HIVE_HOME
    $ vi conf/hive-site.xml
  4. Copy the following XML code and paste it into the hive-site.xml file.
    Note: If you already have an existing hive-site.xml file with a configuration element block, just copy the property element block code below and paste it inside the configuration element block in the hive-site.xml file. Be sure to use the correct values for the paths to your auxiliary JARs and ZooKeeper IP numbers.
    Example configuration:
    file:///opt/mapr/hbase/hbase-<version>/lib/hbase-client-<version>-mapr.jar, file:///opt/mapr/hbase/hbase-<version>/lib/hbase-server-<version>-mapr.jar,file:///opt/mapr/hbase/hbase-<version>/lib/hbase-protocol-<version>-mapr.jar,file:///opt/mapr/zookeeper/zookeeper-<version>/zookeeper-<version>.jar</value>
      <description>A comma separated list (with no spaces) of the jar files required for Hive-HBase integration</description>
      <description>A comma separated list (with no spaces) of the IP addresses of all ZooKeeper servers in the cluster.</description>
      <description>The Zookeeper client port. The MapR default clientPort is 5181.</description>
  5. Save and close the hive-site.xml file.
If you have successfully completed all of the steps in this section, you're ready to begin the tutorial in the next section.