Command Line Installation
Also available as:
PDF
loading table of contents...

Install and Enable Ranger Hive Plug-in

  1. Extract your build at the appropriate place.

    Copy ranger-<version>-SNAPSHOT-hive-plugin.tar.gz to hiveServer2 host in directory /usr/hdp/<hdp-version>/.

  2. Change directory to /usr/hdp/<hdp-version>.

  3. Untar ranger-<version>-SNAPSHOT-SNAPSHOT-hive-plugin.tar.gz.

  4. Change directories to ranger-<version>-SNAPSHOT-hive-plugin.

  5. Edit the install.properties file.

    Enter the appropriate values for each of the following properties:

    Table 6.15. install.properties Property Values

    PropertyValues
    POLICY_MGR_URLhttp://<FQDN_of_ranger_admin_host>:6080
    REPOSITORY_NAMEhivedev

    Additionally, for the Audit info, Solr/HDFS options are available.

  6. Enable the Hive plug-in:

    export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk.x86_64
    ./enable-hive-plugin.sh
    
  7. Stop and start hiveserver2:

    ps -aux | grep hive | grep -i hiveserver2 | awk '{print $1,$2}' | grep hive | awk '{print $2}' | 
         xargs kill >/dev/null 2>&1
    su hive -c "nohup /usr/hdp/current/hive-server2/bin/hiveserver2 -hiveconf hive.metastore.uris="" 
         -hiveconf hive.log.dir=/var/log/hive -hiveconf hive.log.file=hiveserver2.log >/var/log/hive/hiveserver2.out 2> 
         /var/log/hive/hiveserver2err.log &"
    
  8. Create the default repo for Hive with proper configuration.

    In the custom repo configuration, set the component user to hive for each of the following properties:

    • policy.grantrevoke.auth.users

    • tag.download.auth.users

  9. Use the Audit->plugins tab to verify that the Hive plug-in is communicating with Ranger admin.