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: