Hive installation and configuration notes

Source: Internet
Author: User

Hive installation and configuration notes

Hive metadata Storage Methods
1. Derby: the default hive storage mode. You cannot call hive concurrently.
2. Local MySQL
3. Remote MySQL

Use the second method to install MySQL, start and create Hive users, and create Hive metabases

Insert into mysql. user (Host, User, Password) values ("localhost", "hive", password ("hive "));

Create database hive;

Grant all on hive. * to hive @ '%' identified by 'hive ';

Grant all on hive. * to hive @ 'localhost' identified by 'hive ';

Flush privileges;

Configure Hive Environment Variables

Vim/etc/profile

Modify Hive configurations

Modify hive-site.xml

<Property>

Name> javax. jdo. option. ConnectionURL </name>

Value> jdbc: mysql: // localhost: 3306/hive </value>

</Property>

<Property>

Name> javax. jdo. option. ConnectionDriverName </name>

Value> com. mysql. jdbc. Driver </value>

</Property>

<Property>

Name> javax. jdo. option. ConnectionPassword </name>

Value> hive </value>

</Property>

<Property>

Name> hive. hwi. listen. port </name>

Value> 9999 </value>

Description> This is the port the Hive Web Interface will listen on </descript ion>

</Property>

<Property>

Name> datanucleus. autoCreateSchema </name>

Value> true </value>

</Property>

<Property>

Name> datanucleus. fixedDatastore </name>

Value> false </value>

</Property>

</Property>

Property>

Name> javax. jdo. option. ConnectionUserName </name>

Value> hive </value>

Description> Username to use against metastore database </description>

/Property>

Property>

Name> hive.exe c. local. scratchdir </name>

Value>/home/hdpsrc/hive/iotmp </value>

Description> Local scratch space for Hive jobs </description>

/Property>

Property>

Name> hive. downloaded. resources. dir </name>

Value>/home/hdpsrc/hive/iotmp </value>

Description> Temporary local directory for added resources in the remote file system. </description>

/Property>

Property>

Name> hive. querylog. location </name>

Value>/home/hdpsrc/hive/iotmp </value>

Description> Location of Hive run time structured log file </description>

/Property>

Notes

  • Find the mysql jdbc driver, such as the mysql-connector-java-5.1.6-bin.jar to copy to the hive/lib directory
  • Copy hive/lib/jline-2.12.jar to/Hadoop/yarn/lib/directory

Start Hive and Test

Create a table in hive

View in MySQL

Hive programming guide PDF (Chinese Version)

Hadoop cluster-based Hive Installation

Differences between Hive internal tables and external tables

Hadoop + Hive + Map + reduce cluster installation and deployment

Install in Hive local standalone Mode

WordCount word statistics for Hive Learning

Hive operating architecture and configuration and deployment

Hive details: click here
Hive: click here

This article permanently updates the link address:

Related Article

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.