1. Hive/HCatalog

  1. On the Hive Metastore machine, install the appropriate JDBC .jar file.

    • For Oracle:

      1. Download the Oracle JDBC (OJDBC) driver from http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html.

        Select Oracle Database 11g Release 2 - ojdbc6.jar.

      2. Copy the .jar file to the Java share directory.

        cp ojdbc6.jar /usr/share/java
      3. Make sure the .jar file has the appropriate permissions - 644.

    • For MySQL:

      1. Install the connector.

        • RHEL/CentOS/Oracle Linux

          yum install mysql-connector-java
        • SLES

          zypper install mysql-connector-java
      2. Confirm that MySQL.jar file is in the Java share directory

        ls /usr/share/java/mysql-connector-java.jar
      3. Make sure the .jar file has the appropriate permissions - 644.

  2. On the Ambari Server host, install the appropriate JDBC .jar file.

    • For Oracle:

      1. Download the Oracle JDBC (OJDBC) driver from http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html.

        Select Oracle Database 11g Release 2 - ojdbc6.jar.

      2. Copy the .jar file to the Java share directory.

        cp ojdbc6.jar /var/lib/ambari-server/resources
      3. Make sure the .jar file has the appropriate permissions - 644.

    • For MySQL:

      1. Download the mysql connector driver from the host on which you installed mysql-connector-java.

      2. Copy the .jar file to the Java share directory.

        cp mysql-connector-java.jar /var/lib/ambari-server/resources
      3. Make sure the .jar file has the appropriate permissions - 644.

  3. Create a user for Hive and grant it permissions.

    • For Oracle, create the Hive user and grant it database permissions.

      # sqlplus sys/root as sysdba
      SQL> CREATE USER $HIVEUSER IDENTIFIED BY $HIVEPASSWORD;
      SQL> GRANT SELECT_CATALOG_ROLE TO $HIVEUSER;
      SQL> GRANT CONNECT, RESOURCE TO  $HIVEUSER;                            
      SQL> QUIT;

      Where $HIVEUSER is the Hive user name and $HIVEPASSWORD is the Hive user password.

    • For MySQL, create the Hive user and grant it database permissions.

      # mysql -u root -p
      mysql> CREATE USER ‘$HIVEUSER’@’%’ IDENTIFIED BY ‘$HIVEPASSWORD’;
      mysql> GRANT ALL PRIVILEGES ON *.* TO ‘$HIVEUSER’@’%’;
      mysql> flush privileges;

      Where $HIVEUSER is the Hive user name and $HIVEPASSWORD is the Hive user password.

  4. Load the Hive Metastore schema into your Hive database using a schema script.


loading table of contents...