如果想要远程连接hive,需要先启动hiverserver2服务。
首先,修改$HIVE_HOME/con/hive-site.xml配置文件,将true改为false:
hive.server2.enable.doAs false Setting this property to true will have HiveServer2 execute Hive operations as the user making the calls to it.
重启hive,再启动hiveserver2服务:
$HIVE_HOME/bin/hive --service hiveserver2 1>/dev/null 2>/dev/null &
用beeline测试是否正常启动:
beeline -u jdbc:hive2://localhost:10000 -n hive -p 123456
出现以下界面,并能正常执行hql语句即可
远程连接我用的是DataGrip 客户端,按照以下格式进行填写,测试通过即可
参考链接:
User is not allowed to impersonate anonymous (state=08S01,code=0) org.apache.hadoop.security.authorize.AuthorizationException



