CentOS7 install Hive1.2.3
Install pseudo-distributed
Open hive.apache.org on the Hive homepage, and install it step by step according to the Getting Started Guide .
Prerequisites for installation
- Java1.7
- Hadoop2.x
- Linux environment
Environment variable
Set the HADOOP_HOME environment variable, edit /etc/profile
export HADOOP_HOME= < hadoop-install-dir > source /etc/profile
Create directories on hdfs for hive and set writable permissions on the group for them
\$\$hadoop fs -mkdir /tmp \$\$hadoop fs -mkdir /user/hive/warehouse \$\$hadoop fs -chmod g+w /tmp \$\$hadoop fs -chmod g+w /user/hive/warehouse
Set HIVE_HOME environment variable
$ export HIVE_HOME=<hive-install-dir>
In addition, I also set the Hadoop bin and sbin paths, as well as the hbase bin and hive bin paths to Path, so that it will be easier to type related commands in the future.
Run hive
Execute the hive command and report an exception:
Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
The analysis problem may be a MetaStore problem, for example, the relational database required by Hive is not well integrated with Hive. It may also be caused by incompatibility between the Hadoop version and Hive. Because the content of this class cannot be instantiated. After reviewing some articles, I decided to bypass this. Reduce the learning cost of installation by installing a set of Hadoop of CDH.