1. 程式人生 > >Atlas匯入Hive元資料

Atlas匯入Hive元資料

1、設定hive-site.xml ;

  <property>
      <name>hive.exec.post.hooks</name>
      <value>org.apache.atlas.hive.hook.HiveHook</value>
    </property>

2、新增HIVE_AUX_JARS_PATH到Hive安裝目錄下conf中的目錄中的hive-env.sh ;

export HIVE_AUX_JARS_PATH=<atlas安裝包位置>/hook/hive

本機器修改為:
export HIVE_AUX_JARS_PATH=/home/dmp/apache-atlas-sources-1.0.0/distro/target/apache-atlas-1.0.0/hook/hive

3、啟動 import-hive.sh指令碼

/home/dmp/apache-atlas-sources-1.0.0/distro/target/apache-atlas-1.0.0/bin/import-hive.sh

4、匯入結果如下則匯入成功:

[[email protected] bin]# ./import-hive.sh 
Using Hive configuration directory [/home/dmp/apache-hive-1.2.1-bin/conf]
Log file for import is /home/dmp/apache-atlas-sources-1.0.0/distro/target/apache-atlas-1.0.0/logs/import-hive.log
log4j:WARN No such property [maxFileSize] in org.apache.log4j.PatternLayout.
log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.PatternLayout.
Enter username for atlas :- admin
Enter password for atlas :- 
Hive Meta Data imported successfully!!!

5、重新整理頁面後可見: