zoukankan      html  css  js  c++  java
  • 安装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】。

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

  • 相关阅读:
    磁盘原理总结
    Algorithm:多维数组和矩阵
    Algorithm:字典序最小问题
    Algorithm:递归思想及实例分析
    Algorithm:贪心策略之区间覆盖问题
    Algorithm:贪心策略之区间选点问题
    Algorithm:位运算的这些小技巧你知道吗?
    面试题
    操作系统
    数据结构:B树和B+树的插入、删除图文详解
  • 原文地址:https://www.cnblogs.com/codeOfLife/p/7391447.html
Copyright © 2011-2022 走看看