这几天使用HDP Hive 2 view又碰到一些问题,视图可以打开,但是不能执行SQL语句。
按HDP Apache Ambari Views文档检查了一下,这样配置
1. In Ambari Web, browse to
2. Under the Advanced tab, browse to the Custom core-site section.
3. Click Add Property… to add the following custom properties:
hadoop.proxyuser.admin.groups="users"
hadoop.proxyuser.admin.hosts=hostname
但是发现系统安装后已经这样配置了。
搜索了一下,看到这篇文章
https://community.hortonworks.com/questions/106053/cannot-use-hive-view-20.html
里面说把hostname改成*就好了, 发现确实是这样。
但是具体原因还要查一下,看了一下/var/log/hadoop/hdfs目录下的日志,发现以下内容
E090 HDFS020 Could not write file /user/admin/hive/jobs/hive-job-67-2018-06-26_01-29/query.hql [HdfsApiException]
2018-06-26 13:29:56,112 INFO FSNamesystem.audit: allowed=true ugi=admin (auth:PROXY) via ambari (auth:SIMPLE) ip=/xx.xx.xx.xx cmd=getfileinfo src=/user/admin/hive/jobs/hive-job-67-2018-06-26_01-29 dst=null perm=null proto=webhdfs
这下问题明确了,应该是没有使用机器名,直接用了ip地址。
那这样修改也可以hadoop.proxyuser.admin.hosts=hostname,hostname的ip