hive2中使用beeline:Required field 'serverProtocolVersion' is unset!

hive2中使用beeline:

beeline -u jdbc:hive2://localhost:10000


启动报如下错误:
Required field 'serverProtocolVersion' is unset!
User: hadoop is not allowed to impersonate anonymous 


解决方法:

hadoop的core-site.xml中添加如下配置:



      hadoop.proxyuser.hadoop.groups
      hadoop
      Allow the superuser oozie to impersonate any members of the group group1 and group2
 

 
 
      hadoop.proxyuser.hadoop.hosts
      192.168.127.200,127.0.0.1,localhost
      The superuser can connect only from host1 and host2 to impersonate a user
 


然后使用如下命令启动:

beeline -u jdbc:hive2://localhost:10000 -n hadoop -p hadoop

你可能感兴趣的:(hive)