This is documentation for MapR Version 5.0. You can also refer to MapR documentation for the latest release.

Skip to end of metadata
Go to start of metadata

You can install Hive on a node in the MapR cluster or on a MapR client node. See the Hive Release Notes for a list of fixes and new features. See the Interoperability Matrix to determine which Hive versions are supported with this MapR cluster version.

  Hive is distributed as three package:

PackageDescription
mapr-hiveThe core Hive package.
mapr-hiveserver2The Hive package that enables HiveServer2 to be managed by the warden, allowing you to start and stop HiveServer2 using maprcli or the MapR Control System. The mapr-hive package is a dependency and will be installed if you install mapr-hiveserver2. At installation time, Hiveserver2 is started automatically.
mapr-hivemetastoreThe Hive package that enables the Hive Metastore to be managed by the warden, allowing you to start and stop Hive Metastore using maprcli or the MapR Control System. The mapr-hive package is a dependency and will be installed if you install mapr-hivemetastore. At installation time, the Hive Metastore is started automatically.
mapr-hivewebhcatThe Hive package that enables WebHCat to be managed by the warden, allowing you to start and stop WebHCat using maprcli or the MapR Control System. The mapr-hive package is a dependency and will be installed if you install mapr-hivewebhcat. At installation time, the WebHCat is started automatically.

The following procedure uses the operating system package managers to download and install Pig from the MapR Repository. For instructions on setting up the ecosystem repository (which includes Hive), see Preparing Packages and Repositories.

To install Hive, execute the following commands as root or using sudo

  1. Verify that the environment variable JAVA_HOME is set correctly. Example:

    You can set the system variables by using the shell command line or by updating files such as /etc/profile or ~/.bash_profile. See the Linux documentation for more details about setting system environment variables.

  2. Update the repository cache on all nodes:

    • On RedHat/CentOS:
      # yum clean all

    • On SUSE:
       # zypper refresh

    • On Ubuntu:
       # apt-get update

  3. On each planned Hive node, install Hive packages.

     To Install only Hive...
    • On CentOS / RedHat:
      yum install mapr-hive 
    • On SUSE:
      zypper install mapr-hive
    • On Ubuntu:
      apt-get install mapr-hive
     To Install Hive and HiveServer2...
    • On CentOS / RedHat:
      yum install mapr-hive mapr-hiveserver2 
    • On SUSE:
      zypper install mapr-hive mapr-hiveserver2 
    • On Ubuntu:
      apt-get install mapr-hive mapr-hiveserver2 
     To Install Hive, HiveServer2, and HiveMetatstore...
    • On CentOS / RedHat:
      yum install mapr-hive mapr-hiveserver2 mapr-hivemetastore
    • On SUSE:
      zypper install mapr-hive mapr-hiveserver2 mapr-hivemetastore
    • On Ubuntu:
      apt-get install mapr-hive mapr-hiveserver2 mapr-hivemetastore
    Icon
    If you are using an embedded hive metastore, do not install mapr-hiveserver2 and mapr-hivemetastore on the same node as mapr-hive. This configuration results in a java run-time exception when you attempt to start the hive CLI.
     To Install Hive, HiveServer2, HiveMetatstore, and WebHCat...
    • On CentOS / RedHat:
      yum install mapr-hive mapr-hiveserver2 mapr-hivemetastore mapr-hivewebhcat
    • On SUSE:
      zypper install mapr-hive mapr-hiveserver2 mapr-hivemetastore mapr-hivewebhcat
    • On Ubuntu:
      apt-get install mapr-hive mapr-hiveserver2 mapr-hivemetastore mapr-hivewebhcat
    Icon
    If you are using an embedded hive metastore, do not install mapr-hiveserver2 and mapr-hivemetastore on the same node as mapr-hive. This configuration results in a java run-time exception when you attempt to start the hive CLI.
    Icon

    This step installs the latest supported version of Hive. To install an earlier version, specify the version in the package name.

    On RedHat / CentOS, you can determine the available versions with the yum list --showduplicates mapr-hive command. Then, you can run the following commands to install a specific package:

    On Ubuntu, you can determine the available versions with the apt-cache madison mapr-hive command. Then, you can run the following command to install a specific package:

    Note: Make sure to install the same version for all Hive packages.

  4. Run configure.sh

  5. Set the following environment variables: 

    • HIVE_HOME should be set to the Hive installation directory. 

    • PATH should include $HIVE_HOME/bin.

You can set these system variables by using the shell command line or by updating files such as /etc/profile or ~/.bash_profile. See the Linux documentation for more details about setting system environment variables.

After Hive is installed, the executable is located at: /opt/mapr/hive/hive-<version>/bin/hive.

Icon

Before running Hive queries with HiveServer2, you must perform one of the following tasks otherwise queries will fail:

  • Configure user impersonation for Hive and the MapR cluster. 
  • Set hive.server2.enable.doAs to false in hive-site.xml. 

See Hive User Impersonation for the steps to configure user impersonation for Hive and the MapR cluster.

  • No labels