The use of the hive base HiveServer2 JDBC

Source: Internet
Author: User

Start HiveServer2:

CD $HIVE _home/bin

HiveServer2 (default port is 10000) after default port: Hiveserver2 &

Start by specifying the port in the next mode: Hiveserver2--hiveconf hive.server2.thrift.port=14000 &

Connect HiveServer2 using beeline:

CD $HIVE _home/bin

Beeline-u jdbc:hive2://hadoop000:10000

Parameter description:

hadoop000: Is the name of the hive installation machine;

10000 is the hiveserver default port number;

If you need to specify the user name and password to access, use:-N username-p password.

How to query the port number used by HiveServer2: Ps-ef|grep HiveServer2

Ps-Ef|grep HiveServer2
Spark22195 9828 Ten One: .Pts/2 xx:xx: - /Usr/Java/Jdk1.7.0_ $/Bin/Java-xmx256m-Djava.net.preferIPv4Stack=True-Dhadoop.Log. Dir=/Home/Spark/App/Hadoop-2.3.0-Cdh5.0.0/Logs-Dhadoop.Log.file=Hadoop.Log -Dhadoop.home.dir=/Home/Spark/App/Hadoop-2.3.0-Cdh5.0.0 -Dhadoop.id.Str=Spark-Dhadoop.root.logger=Info,console-Djava.library.path=/Home/Spark/App/Hadoop-2.3.0-Cdh5.0.0/Lib/Native-Dhadoop.policy.file=Hadoop-Policy.xml-Djava.net.preferIPv4Stack=True-xmx512m-Dhadoop.security.logger=Info,nullappender Org.apache.hadoop.util.RunJar/Home/Spark/App/Hive-0.12.0-Cdh5.0.0/Lib/Hive-Service-0.12.0-Cdh5.0.0. Jar Org.apache.hive.service.server.HiveServer2--hiveconf hive.server2.thrift.port=14000

The use of the hive base HiveServer2 JDBC

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.