CentOS7 install Hive1.2.3

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

  1. Java1.7
  2. Hadoop2.x
  3. Linux environment

Environment variable

  1. Set the HADOOP_HOME environment variable, edit /etc/profile

    export HADOOP_HOME= < hadoop-install-dir >
    source /etc/profile
    
  2. 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
    
  3. Set HIVE_HOME environment variable

    $ export HIVE_HOME=<hive-install-dir>
    
  4. 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

  1. 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.

Guess you like

Origin blog.csdn.net/killingbow/article/details/54754572