R连接hive报错:
R中报错java.lang.NoClassDefFoundError: com/google/protobuf/ProtocolMessageEnum
hiveserver2端报错java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: Administrator is not allowed to impersonate hive
解决办法:hadoop中配置文件core-site.xml加以下内容
<property>
<name>hadoop.proxyuser.root.hosts</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.root.groups</name>
<value>*</value>
</property>
hdfs-site.xml中加:
<property>
<name>dfs.webhdfs.enabled</name>
<value>true</value>
</property>
将root更改为被禁止的用户,这里是administrator
install.package("rJava")
install.package("DBI")
install.packages("R