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
    21985 HRegionServer
    1549 jenkins.war
    15051 QuorumPeerMain
    30935 Jps
    15551 CommandServer
    15698 HMaster
    15293 JobTracker
    15328 TaskTracker
    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:
    configuration>
    
    <property>
      <name>hive.aux.jars.path</name>
      <value>file:///opt/mapr/hive/hive-<version>/lib/hive-hbase-handler-<version>-mapr.jar,
    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>
    </property>
    
    <property>
      <name>hbase.zookeeper.quorum</name>
      <value>xx.xx.x.xxx,xx.xx.x.xxx,xx.xx.x.xxx</value>
      <description>A comma separated list (with no spaces) of the IP addresses of all ZooKeeper servers in the cluster.</description>
    </property>
    
    <property>
      <name>hbase.zookeeper.property.clientPort</name>
      <value>5181</value>
      <description>The Zookeeper client port. The MapR default clientPort is 5181.</description>
    </property>
    
    </configuration>
  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.