ubuntu - 安装hive
粗略步驟:
詳細參考:https://www.2cto.com/net/201804/735478.html
?
環境:ubunut? jdk? hadoop?? mysql
?
一、下載hive
?
二、解壓(到指定目錄)
?
三、配置 /etc/profile [環境變量] -? 執行: source /etc/profile
?
四、編寫hive-env.sh [ 綁定hadoop ]
注:原文件中沒有 hive-env.sh 文件,可以自己創建,也可以通過 hive-env.sh.template? cp一個
?
五、配置mysql為hive的外部數據服務器 [ 用來存儲元數據 ]
1 編寫 hive-site.xml
????? 注:hive沒有這個文件,只有 hive-defualt.xml.template,可以自己創建,也可以通過 hive-defualt-site.xml? cp一個
2 導入mysql的驅動包 到hive/lib
3 創建配置文件中的mysql數據庫
? 4?hive元數據庫初始化:schematool -dbType mysql -initSchema
?
六、查看hive是否安裝成功:
預先:start-all.sh
???????????????? service mysql start
接著:hive --version (查看版本)? /?? hive (進入hive)
?
七、測試使用hive
hive? -> show databases;
?
報錯:?Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
解決:需要hive元數據庫初始化,執行 schematool -dbType mysql -initSchema
?
警告:mysql的驅動包版本低與mysql不匹配(但是讓然能用)需要用 com.mysql.cj.jdbc.driver
解決:使用mysql相應的驅動包(自己查看mysqll版本,在查看驅動包的版本)
?
警告:?Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
分析:高版本mysql使用ssl技術加密數據,需要配置ssl設置
解決:(1)不使用SSL,在url中一局useSSL=false;(2)使用ssl,useSSL=true,并提供服務器認證證書---待定[ 沒有嘗試,沒有發言權,]
?
疑惑:Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.
疑點:MR不適合hive?hive高版本放棄用MR?
影響:暫無。
轉載于:https://www.cnblogs.com/floakss/p/10204249.html
總結
以上是生活随笔為你收集整理的ubuntu - 安装hive的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: NfcA/NfcB/NfcF/NfcV/
- 下一篇: matlab impyramid,图像