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-5.0.8-1
        • SLES

          zypper install mysql-connector-java-5.0.8-1
      2. Confirm that the 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. For Oracle only Load the Hive Metastore Schema.

    • The Hive Metastore database schema must be pre-loaded into your Oracle database using the schema script.

      sqlplus $HIVEUSER/$HIVEPASSWORD < hive-schema-0.12.0.oracle.sql

      The file hive-schema-0.12.0.oracle.sql is found in the /var/lib/ambari-server/resources/ directory of the Ambari Server machine, once you have completed the Set Up the Bits step in the install process.


loading table of contents...