Hive Install


1、http://mirror.bit.edu.cn/apache/hive/stable-2/ 下载hive;上传到linux系统2、将apache-hive-2.3.3-bin.tar.gz移动到/usr/local目录,解压,并重命名为hive ;如下
[root@hmaster soft]# ls
apache-hive-2.3.3-bin.tar.gz hadoop-2.7.3.tar.gz jdk-8u151-linux-i586.tar.gz
[root@hmaster soft]# mv apache-hive-2.3.3-bin.tar.gz /usr/local/
[root@hmaster soft]# cd /usr/local/
[root@hmaster local]# ls
apache-hive-2.3.3-bin.tar.gz bin etc games hadoop include java lib lib64 libexec sbin share src
[root@hmaster local]# tar -xvf apache-hive-2.3.3-bin.tar.gz
[root@hmaster local]# mv apache-hive-2.3.3-bin hive
[root@hmaster local]# ls
bin etc games hadoop hive include java lib lib64 libexec sbin share src
[root@hmaster local]#
3、配置环境变量 [root@hmaster local]# vim /etc/profile
[root@hmaster local]# ^C
[root@hmaster local]# source /etc/profile
[root@hmaster local]# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/java/jdk1.8.0_151/bin:/usr/local/hadoop/bin:/usr/local/hadoop/sbin:/root/bin:/usr/java/jdk1.8.0_151/bin:/usr/local/hadoop/bin:/usr/local/hadoop/sbin:/usr/local/hive/bin
[root@hmaster local]# #set java environment /usr/local/java/jdk1.8.0_151
export JAVA_HOME=/usr/java/jdk1.8.0_151
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/binexport PATH=$PATH:/usr/local/hadoop/bin:/usr/local/hadoop/sbin
export PATH=$PATH:/usr/local/hive/bin
4、配置hive-site.xml
[root@hmaster conf]# pwd
/usr/local/hive/conf
[root@hmaster conf]# ll
total 288
-rw-r–r–. 1 root root 1596 Feb 17 2017 beeline-log4j2.properties.template
-rw-r–r–. 1 root root 257573 Mar 28 2018 hive-default.xml.template
-rw-r–r–. 1 root root 2365 Feb 17 2017 hive-env.sh.template
-rw-r–r–. 1 root root 2274 Feb 17 2017 hive-exec-log4j2.properties.template
-rw-r–r–. 1 root root 2925 Mar 7 2018 hive-log4j2.properties.template
-rw-r–r–. 1 root root 2060 Feb 17 2017 ivysettings.xml
-rw-r–r–. 1 root root 2719 Mar 7 2018 llap-cli-log4j2.properties.template
-rw-r–r–. 1 root root 7041 Mar 7 2018 llap-daemon-log4j2.properties.template
-rw-r–r–. 1 root root 2662 Jul 20 2016 parquet-logging.properties
[root@hmaster conf]# cp hive-default.xml.template hive-site.xml[root@hmaster hive]# pwd
/usr/local/hive
[root@hmaster hive]# mkdir tmp
[root@hmaster hive]# ls
bin binary-package-licenses conf examples hcatalog jdbc lib LICENSE NOTICE RELEASE_NOTES.txt scripts tmp通过文件传输工具将hive-site.xml文件复制到window上编辑hive.metastore.schema.verification
false

Enforce metastore schema version consistency.
True: Verify that version information stored in is compatible with one from Hive jars. Also disable automatic
schema migration attempt. Users are required to manually migrate schema after Hive upgrade which ensures
proper metastore schema migration. (Default)
False: Warn if the version information stored in metastore doesn’t match with one from in Hive jars.
用创建的 /usr/local/hive/tmp 目录,替换 ${system:java.io.tmpdir}
替换 ${system:user.name} 为root
上传覆盖文件hive-site.xml在/usr/local/hive目录下执行如下命令
[root@hmaster hive]# pwd
/usr/local/hive
[root@hmaster hive]# schematool -initSchema -dbType derby[root@hmaster hive]# ll
total 60
drwxr-xr-x. 3 root root 133 Oct 9 23:46 bin
drwxr-xr-x. 2 root root 4096 Oct 9 23:46 binary-package-licenses
drwxr-xr-x. 2 root root 4096 Oct 9 23:57 conf
-rw-r–r–. 1 root root 639 Oct 10 02:16 derby.log
drwxr-xr-x. 4 root root 34 Oct 9 23:4 香港云主机6 examples
drwxr-xr-x. 7 root root 68 Oct 9 23:46 hcatalog
drwxr-xr-x. 2 root root 44 Oct 9 23:46 jdbc
drwxr-xr-x. 4 root root 12288 Oct 9 23:46 lib
-rw-r–r–. 1 root root 20798 Mar 7 2018 LICENSE
drwxr-xr-x. 5 root root 133 Oct 10 02:16 metastore_db
-rw-r–r–. 1 root root 230 Mar 27 2018 NOTICE
-rw-r–r–. 1 root root 459 Mar 28 2018 RELEASE_NOTES.txt
drwxr-xr-x. 4 root root 35 Oct 9 23:46 scripts
drwxr-xr-x. 2 root root 6 Oct 10 01:33 tmp启动hive命令: hiveschematool -initSchema -dbType derby
尝试当前目录下初始化 metastore_db的数据
注意下次执行hive时应该在同一目录,默认到当前目录寻找metastore
遇到问题,把metastore_db 删除,重新执行命令schematool -initSchema -dbType derby
实际工作环境中,经常使用MySQL作为metastore的数据

相关推荐: js原型链默认的原型是什么

这篇文章主要讲解了“js原型链默认的原型是什么”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来 香港云主机研究和学习“js原型链默认的原型是什么”吧!1、默认情况下,所有引用类型值都继承了Object,这种继承也是通过原型链…

免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。

Like (0)
Donate 微信扫一扫 微信扫一扫
Previous 07/23 17:35
Next 07/23 17:35

相关推荐