Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Starting hiveserver2

Tags:

hadoop

hive

I am trying to run hiveserver2 on my hadoop cluster so that I can access hive using jdbc. I run the following command: $HIVE_HOME/bin/hiveserver2. This doesn't log anything to STDOUTPUT but starts a process which is running, however I can't see any tcp sockets listening on the port 10000.

Turns out no socket is open for the process that hiveserver2 is running in.

How do I start hiveserver2?

like image 968
Vineet Goel Avatar asked Jul 01 '15 23:07

Vineet Goel


People also ask

How do I start hive Metastore?

Starting and Stopping HMS The startup script of HMS is stored in the following location: /usr/lib/hive/bin/thrift-metastore . Use this command to start HMS: sudo /usr/lib/hive/bin/thrift-metastore server start .

What is the difference between HiveServer2 and Beeline?

Difference between hive and hive server 2:Beeline is a thin client that also uses the Hive JDBC driver but instead executes queries through HiveServer2, which allows multiple concurrent client connections and supports authentication.

What is the use of HiveServer2?

HiveServer2 (HS2) is a service that enables clients to execute queries against Hive. HiveServer2 is the successor to HiveServer1 which has been deprecated. HS2 supports multi-client concurrency and authentication. It is designed to provide better support for open API clients like JDBC and ODBC.


2 Answers

try running :
hive --service hiveserver2 --hiveconf hive.server2.thrift.port=10000 --hiveconf hive.root.logger=INFO,console
This will start hiveserver2, on port 10000 and output the logs to console.

like image 158
dimamah Avatar answered Oct 24 '22 04:10

dimamah


Use below command to run hiveserver2 :

sudo su hduser

cd /usr/local/apache-hive-2.0.1-bin/bin

hive --service hiveserver2
like image 5
Modassir Haider Avatar answered Oct 24 '22 04:10

Modassir Haider