Hive hiveserver2 and Web UI usage
HiveServer2 (HS2) is a server interface that enables remote clients to execute queries against Hive and retrieve the results (a more detailed intro here). The current implementation, based on Thrift RPC, is an improved version of HiveServer and supports multi-client concurrency and authentication. It is designed to provide better support for open API clients like JDBC and ODBC.
Step 1 - Change the directory to /usr/local/hive/bin
Step 2 - Start hiveserver2 daemon
OR
Step 3 - You can browse to hiveserver2 web ui at following url
Step 4 - You can see the hive logs in
To kill hiveserver2 daemon
OR
There are many ways for hiveserver2 authentication process
You can see them in
1) If hive.server2.authentication is "NONE" in HIVE_HOME/conf/hive-site.xml then connect beeline with below url
2) If value of "hive.server2.authentication" property in
HIVE_HOME/conf/hive-site.xml to be set as "SASL" then connect hive
beeline with below url
3) If "hive.server2.authentication" is nosasl then connect the beeline like below.
Make sure this property datanucleus.schema.autoCreateAll is true in hive-site.xml
HiveServer2 (HS2) is a server interface that enables remote clients to execute queries against Hive and retrieve the results (a more detailed intro here). The current implementation, based on Thrift RPC, is an improved version of HiveServer and supports multi-client concurrency and authentication. It is designed to provide better support for open API clients like JDBC and ODBC.
Step 1 - Change the directory to /usr/local/hive/bin
$ cd $HIVE_HOME/bin
$ hiveserver2
$ hive --service hiveserver2 &
http://localhost:10002/hiveserver2.jsp
/tmp/hduser/hive.log
$ ps -ef | grep -i hiveserver2
$ kill -9 29707
$ rm -rf /var/run/hive/hive-server.pid
You can see them in
$hive-site.xml
<property> <name>hive.server2.authentication</name> <value>NONE</value> <description> Expects one of [nosasl, none, ldap, kerberos, pam, custom]. Client authentication types. NONE: no authentication check LDAP: LDAP/AD based authentication KERBEROS: Kerberos/GSSAPI authentication CUSTOM: Custom authentication provider (Use with property hive.server2.custom.authentication.class) PAM: Pluggable authentication module NOSASL: Raw transport </description> </property>
!connect jdbc:hive2://
!connect jdbc:hive2://<host>:<port>/<db>
!connect jdbc:hive2://<host>:<port>/<db>;auth=noSasl
<property> <name>datanucleus.schema.autoCreateAll</name> <value>true</ value> <description> creates necessary schema on a startup if one does not exist. Set this to false, after creating it once </ description> </property>
Comments
Post a Comment