hive2.1.0 installation and MySQL meta data management configuration

Source: Internet
Author: User

first, the environment preparation
JDK 1.8+
Hadoop 2.x
MySQL 5.x
Please ensure that the above environment is ready before installation
Second, installation
1. Download and unzip
Enter the directory after decompression, using the current path configuration Hive_home
2. Enter the Conf directory under the installation directory
Vim Hive-site.xml
Add the following configuration

<?xml version= "1.0"  encoding= "UTF-8"  standalone= "no"? ><?xml-stylesheet type= "text /xsl " href=" configuration.xsl "?><configuration>    <property>         <name>javax.jdo.option.ConnectionURL</name>         <value>jdbc:mysql://worker2:3306/hive?createdatabaseifnotexist=true </value>    </property>    <property>         <name>javax.jdo.option.ConnectionDriverName</name>         <value>com.mysql.jdbc.Driver</value>     </property>    <property>          <name>javax.jdo.option.ConnectionUserName</name>          <value>root</value>    </property>    <property>             <name>javax.jdo.option.connectionpassword </name>            <value>root</ value>            </property></ Configuration>
    1. Modify the hive-config.sh in the Bin directory under the installation directory
      Vim hive-config.sh
      Add the following configurations:

Export Java_home=/wxm/software/java/jdk8/jdk1.8.0_91export hive_home=/wxm/software/hive/ Apache-hive-2.1.0-binexport hadoop_home=/wxm/software/hadoop/hadoop2.7.2/hadoop-2.7.2123
    1. Initializing meta data

In/schematool -dbtype MySQL -initschema

    1. Start and test
      Bin/hive
      Create Database test_1121;
      Use test_1121;
      CREATE TABLE Student (ID int,name string);
      INSERT into student values (1, ' Test ');
      SELECT * from student;


This article is from the "10891776" blog, please be sure to keep this source http://10901776.blog.51cto.com/10891776/1875167

hive2.1.0 installation and MySQL meta data management configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.