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?
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 .
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.
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.
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.
Use below command to run hiveserver2
:
sudo su hduser
cd /usr/local/apache-hive-2.0.1-bin/bin
hive --service hiveserver2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With