beeline hiveserver2 start

1. install hive

2. start hiveserver2 

  

   Check if hiverserver2 is running normally: ps -ef | grep hive

2. start beeline

   

3. Link hive

    !connect jdbc:hive2://localhost:10000 hadoop hadoop org.apache.hive.jdbc.HiveDriver

    This step is prone to errors

    Error: Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: root is not allowed to impersonate anonymous (state=,code=0)
Beeline version 2.1.0 by Apache Hive

 The reason is because the security mechanism was introduced after hadoop 1.0. The following blog by Mr. Dong Xicheng explains in detail.

http://dongxicheng.org/mapreduce-nextgen/hadoop-secure-impersonation/

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324787617&siteId=291194637