Hive 4, Hive installation configuration (remote MYMQL mode)

Source: Internet
Author: User

1.remote Integrated

This type of storage requires running a MySQL server on the remote server , and the meta service needs to be started on the Hive server . here with mysql test server,IP bit 192.168.1.214, new hive_ Remote database, character set bit latine1;

$ vim Hive-site.xml

<Configuration>    < Property>    <name>Hive.metastore.warehouse.dir</name>    <value>/user/hive/warehouse</value>  </ Property>     < Property>    <name>Javax.jdo.option.ConnectionURL</name>    <value>Jdbc:mysql://192.168.57.6: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>Hive</value>  </ Property>     < Property>    <name>Javax.jdo.option.ConnectionPassword</name>    <value>Password</value>  </ Property>    < Property>    <name>Hive.metastore.local</name>    <value>False</value>  </ Property>    < Property>    <name>Hive.metastore.uris</name>    <value>thrift://192.168.1.188:9083</value>  </ Property>    </Configuration>

Note: The server and client of hive are placed on the same servers here. Server and client can be disassembled

2.Remoteseparate

Split the hive-site.xml configuration file into the following two parts

1), server-side configuration file

<Configuration>    < Property>    <name>Hive.metastore.warehouse.dir</name>    <value>/user/hive/warehouse</value>  </ Property>     < Property>    <name>Javax.jdo.option.ConnectionURL</name>    <value>Jdbc:mysql://192.168.57.6: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>123456</value>  </ Property>  </Configuration> 

2), client configuration file

<Configuration>    < Property>    <name>Hive.metastore.warehouse.dir</name>    <value>/user/hive/warehouse</value>  </ Property>     < Property>    <name>Hive.metastore.local</name>    <value>False</value>  </ Property>    < Property>    <name>Hive.metastore.uris</name>    <value>thrift://192.168.57.5:9083</value>  </ Property>    </Configuration>

# Start hive Service-side program $ hive-service metastore  # client directly using hive command to hive hive history File  =/tmp/root/hive_job_log_root_201301301416_955801255.txt hive> show Tables; OK test_hive time Taken: 0.736 seconds hive>

Hive 4, Hive installation configuration (remote MYMQL mode)

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.