Configure hive to use MySQL storage metadata Metadatastore

Source: Internet
Author: User

    Hive uses the Derby database to save metadata by default, and the Derby database is relatively small, and only one session can be opened at a time, generally modified to the MySQL database.
1. Modify the Conf/hive-site.xml configuration:
  
 
  1. <property>
  2. <name>javax.jdo.option.ConnectionURL</name>
  3. <value>jdbc:mysql://hadoop1:3306/hive?createDatabaseIfNotExist=true</value>
  4. </property>
  5. <property>
  6. <name>javax.jdo.option.ConnectionDriverName</name>
  7. <value>com.mysql.jdbc.Driver</value>
  8. </property>
  9. <property>
  10. <name>javax.jdo.option.ConnectionUserName</name>
  11. <value>root</value>
  12. </property>
  13. <property>
  14. <name>javax.jdo.option.ConnectionPassword</name>
  15. <value>root</value>
  16. </property>
2. Upload the MySQL driver package to the Lib directory
  
 
    1. < Code class= "Language-sh" >- RW - r -- r --. 1 Hadoop hadoop 855948 jul 2013 MySQL - connector - java - 5.1 26 - bin jar
3. Restart Hive

From for notes (Wiz)

Configure hive to use MySQL storage metadata Metadatastore

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.