一、架構
![](https://img.laitimes.com/img/9ZDMuAjOiMmIsIjOiQnIsIiNyYzMxUDN1ETMwQDM4EDMy8CX0Vmbu4GZzNmLn9Gbi1yZtl2Lc9CX6MHc0RHaiojIsJye.jpg)
二、常用配置
- hive-log4j.properties中 hive.log.dir,bin/hive -hiveconf 改變預設參數
- hive-site.xml中 常用輔助配置 hive.cli.print.current.db 顯示資料庫以及hive.cli.print.header顯示結果集頭
三、運維指令
- 執行指令
hive -e " sql " hive -f filename > xxx.log & hive -i 與 udf互相使用
- shell下巧set;檢視環境所有配置
- 啟動指令
hive --service metastore & hive --service hiveserver2 & 四、其他
- hive shell下敲dfs -ls /可以直接通路hdfs 注:前面無需加hdfs字首
- ! shell指令 hive shell下通路linux環境
- exit,quit退出hive shell
- 目前使用者下,ls -al 可以檢視hivehistory檔案,所有曆史指令在其中