国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

搭建Hadoop2.7.3+Hive2.1.1及MySQL(配置Hive)(二)

2019-11-08 20:46:12
字體:
來源:轉載
供稿:網友

 續上一篇:

搭建Hadoop2.7.3+Hive2.1.1及MySQL(配置Hadoop)(一)

1、  創建文件夾

1.1、在hive文件下創建文件夾

[root@localhost hive]# cd /usr/hive[root@localhost hive]# mkdir warehouse

1.2、/tmp系統目錄下創建方法
[root@localhost tmp]# mkdir hive[root@localhost tmp]# mkdirhive/Operaion_logs[root@localhost tmp]# mkdirhive/resources

2、  配置hive

2.1、生成配置文件

[root@localhost hive]# cd conf[root@localhost conf]# cphive-env.sh.template hive-env.sh[root@localhost conf]# cphive-default.xml.template hive-site.xml[root@localhost conf]# cphive-log4j2.PRoperties.template hive-log4j2.properties[root@localhost conf]# cphive-exec-log4j2.properties.template hive-exec-log4j2.properties

   2.2、修改配置文件

   2.2.1、修改文件(hive-env.sh)

[root@localhostconf]# vim hive-env.sh--添加

# sethadoop/hive/jdk(java) pathexportHADOOP_HOME=/usr/hadoopexportHIVE_HOME=/usr/hiveexport JAVA_HOME=/usr/java/jdk1.8.0_111exportHIVE_CONF_DIR=/usr/hive/conf

 

2.2.2、修改文件(hive-site.xml)

--編輯文件

[root@localhostconf]# gedit hive-site.xml

查找關健字

${system:java.io.tmpdir}/${hive.session.id}_resources替換為本機路徑/tmp/hive/resources

${system:java.io.tmpdir}/${system:user.name}/operation_logs替換為本機路徑/tmp/hive/operation_logs

${system:java.io.tmpdir}/${system:user.name}替換為本機路徑 /tmp/hive

3、  啟動hive(hadoop服務需要主啟用才能做以下操作)

3.1調用hive

[root@localhost hive]# schematool-dbType derby -initSchema[root@localhost hive]# hive
hive> 啟用成功顯示命令行顯示為 hive> 
3.2 測試連接

hive> createtable Test(id int,name string);OKTime taken: 2.999secondshive> describetest;OKid                    int                                        name                string                                      Time taken: 0.821seconds, Fetched: 2 row(s)hive>--測試創建表,查看表信息,以上顯示為測試成功顯示效果


上一篇:in 和exists 比較

下一篇:常規SQL語句優化

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 龙山县| 平顶山市| 开封市| 长子县| 马关县| 贡嘎县| 新宁县| 全南县| 留坝县| 惠安县| 嘉定区| 富裕县| 余江县| 江山市| 余干县| 哈尔滨市| 伊春市| 长武县| 汉阴县| 磴口县| 门源| 湟中县| 屯昌县| 云和县| 漯河市| 安顺市| 永年县| 义乌市| 苏州市| 定南县| 全州县| 临漳县| 策勒县| 中江县| 云霄县| 博湖县| 榆林市| 博野县| 博野县| 平安县| 稻城县|