安装atlas后执行hive命令报错

  在集群中安装atlas,在安装atlas的节点上执行hive -e "show databases;" 正常,但是在集群中其他节点上执行hive -e "show databases;" 命令报如下错误

  

 

一、分析

  在安装atlas节点上和没有安装atlas的节点上分别再次执行hive --hiveconf hive.root.logger=DEBUG,console -e "show databases;" 命令,获取执行日志,比较日志看看是否什么不同,如下

  通过比较发现,和配置文件有关系;报上面那个错误,可能是因为在/etc/hive/2.5.0.0-1245/0/这个目录下缺少atlas-application.properties配置文件导致的;下面是证明过程

    1、将99上atlas安装包分发到97节点上

   

  2、修改97上atlas安装包的所有人为hdfs,所有组为hadoop,如下

   

  3、切换到hive用户,将atlas-application.properties与client.properties两文件软连接到/etc/hive/2.5.0.0-1245/0/目录下,然后执行hive -e "show databases;",没有再报错,如下

   

    以上可以说明,就是缺少配置文件导致的报错

 

二、解决方法

    将相关配置scp到hive相关节点就可以了

scp /usr/atlas/conf/atlas-application.properties 192.22.107.98:/etc/hive/conf
scp /usr/atlas/conf/client.properties 192.22.107.98:/etc/hive/conf
scp /usr/atlas/conf/atlas-application.properties 192.22.107.98:/etc/hive/conf/conf.server/
scp /usr/atlas/conf/client.properties 192.22.107.98:/etc/hive/conf/conf.server/
    
chown hive:hadoop /etc/hive/conf/atlas-application.properties
chown hive:hadoop /etc/hive/conf/client.properties
chown hive:hadoop /etc/hive/conf/conf.server/atlas-application.properties
chown hive:hadoop /etc/hive/conf/conf.server/client.properties

 

如果,您认为阅读这篇博客让您有些收获,不妨点击一下右下角的【推荐】。
如果,您希望更容易地发现我的新博客,不妨点击一下左下角的【关注我】。
如果,您对我的博客所讲述的内容有兴趣,请继续关注我的后续博客,我是【刘超★ljc】。

本文版权归作者,禁止转载,否则保留追究法律责任的权利。

posted @ 2017-08-19 10:46  刘超★ljc  阅读(1466)  评论(0编辑  收藏  举报