Install hive and hive
Hive installation is relatively simple, because there is no need to modify too many configuration files
1. Download and decompress
I put it in/usr/hadoop/hive
2. Set the environment variable. (It seems that it is not set)
vim /etc/profileexport JAVA_HOME=/usr/java/jdk8export HADOOP_HOME=/usr/hadoop/hadoop...export HIVE_HOME=/usr/hadoop/hiveexport HIVE_CONF_DIR=$HIVE_HOME/hive-confexport PATH=$HIVE_HOME/bin:$HADOOP_HOME/bin:$JAVA_HOME/bin:/sbin/:/bin:$PATH
3. Configure hive
Cp-r $ HIVE_HOME/conf $ HIVE_CONF_DIR/
Cd $ HIVE_CONF_DIR/
Cp hive-default.xml.template hive-default.xml
Cp hive-env.sh.template hive. env. sh
Vim hive-env.sh.
Export HADOOP_HEAPSIZE = 512
Export HIVE_CONF_DIR =/usr/hadoop/hive-conf
4. test:
Hive
This is the same as SQL in hive status.
However, an error may also be reported.
Permission issues may occur.
Remember what permission requires writable, but the current permission is...
You only need to set the folder permission to 777.
Chmod-R 777 file
Hive> show tables;
OK
Time taken: 4.824 seconds
Hive> create table hwz (id int, name string );
OK
Time taken: 0.566 seconds
Hive> select * from hwz;
OK
Time taken: 0.361 seconds
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.