Non-Ambari Cluster Installation Guide
Also available as:
PDF
loading table of contents...

Configuring Hive Hook

Atlas requires changes to hive-site.xml as well as additional configuration files as follows:

  1. Create a new file in /etc/hive/conf named client.properties and another new file in /etc/hive/conf/conf.server named client.properties with the following contents:

    atlas.http.authentication.enabled=false|true

    atlas.http.authentication.type=simple|kerberos

  2. Configure the Hive post execution hook by manually adding the following properties to hive-site.xml:

    <property>
          <name>atlas.cluster.name</name>
          <value>NAME-OF-CLUSTER</value>
    </property>
    
    <property>
          <name>atlas.rest.address</name>
          <value>http://ATLAS-FQDN:21000</value>
    </property>
    
  3. Add the Atlas hook to list of any existing Hive post execution hooks. For example:

    <property>
          <name>hive.exec.post.hooks</name>
          <value>org.apache.hadoop.hive.ql.hooks.ATSHook, org.apache.atlas.hive.hook.HiveHook</value>
    </property>
    
  4. If Hive actions are executed with Oozie, add the JAR files that are included with the Atlas server to the /user/oozie/share/lib/lib_$DATE/hive directory, where $DATE represents the name of the Oozie directory. You can obtain the name of the Oozie directory by executing the command: hdfs dfs -ls /user/oozie/share/lib.

    To populate the Oozie directory with the Atlas server JAR files, run the following commands from the Atlas Hive package installation directory:

    hdfs dfs -copyFromLocal . /usr/hdp/current/atlas-server/bridge/hive/atlas-client-*.jar
    /user/oozie/share/lib/lib_$DATE/hive/
              
    hdfs dfs -copyFromLocal . /usr/hdp/current/atlas-server/bridge/hive/atlas-typesystem*.jar
    /user/oozie/share/lib/lib_$DATE/hive/
              
    hdfs dfs -copyFromLocal . /usr/hdp/current/atlas-server/hook/hive/hive-bridge*jar
    /user/oozie/share/lib/lib_$DATE/hive/
              
    hdfs dfs -copyFromLocal . /usr/hdp/current/atlas-server/bridge/hive/json4s-ast*.jar
    /user/oozie/share/lib/lib_$DATE/hive/
              
    hdfs dfs -copyFromLocal . /usr/hdp/current/atlas-server/bridge/hive/json4s-core*jar
    /user/oozie/share/lib/lib_$DATE/hive/ 
              
    hdfs dfs -copyFromLocal . /usr/hdp/current/atlas-server/bridge/hive/json4s-native*.jar
    /user/oozie/share/lib/lib_$DATE/hive/
              
    hdfs dfs -copyFromLocal . /usr/hdp/current/atlas-server/bridge/hive/scala-compiler*.jar
    /user/oozie/share/lib/lib_$DATE/hive/
              
    hdfs dfs -copyFromLocal . /usr/hdp/current/atlas-server/bridge/hive/scala-library*.jar
    /user/oozie/share/lib/lib_$DATE/hive/
              
    hdfs dfs -copyFromLocal . /usr/hdp/current/atlas-server/bridge/hive/scalap*.jar
    /user/oozie/share/lib/lib_$DATE/hive/
              
    hdfs dfs -copyFromLocal . /usr/hdp/current/atlas-server/bridge/hive/scala-reflect*.jar
    /user/oozie/share/lib/lib_$DATE/hive/