zoukankan      html  css  js  c++  java
  • hive安装遇到的问题

    apt-get install mysql-server

    mysql -u root -p

    create user 'hive'@'localhost' identified by 'hive';

    grant all on hive.* to 'hive'@'localhost';

     解压hive安装文件,进入conf目录

    将jdbc驱动放入hive/lib下

    复制一份hive-env.sh 和hive-site.xml文件

    修改 hive-site.xml配置文件内容。

    在启动hive是没有问题。

    使用hive命令:show tables;是会出现以下错误。

    Java代码  收藏代码
    1. hive> show tables  
    2.     > ;  
    Java代码  收藏代码
    1. FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Communications link failure  
    2. The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received   
    3. any packets from the server.NestedThrowables:  
    4. com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure  
    5. The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received   
    6. any packets from the server.FAILED: Execution Error, return code 1   
    7. from org.apache.hadoop.hive.ql.exec.DDLTask  

     查遍了google和baidu没有找到解决办法。最后是改了conf下的hive-site.xml文件中的数据库连接。

    把ip改成了localhost。再启动hive就对了。。。

  • 相关阅读:
    红楼梦 + 写入 MySQL + MongoDB
    糗事百科 + 微信自动回复
    验证码处理
    IP 代理池
    Ajax工作原理
    php做APP接口开发,接口的安全性
    http与https区别
    mysql 索引优化
    php+ajax+jquery实现jsonp跨域
    SpringBoot中文乱码解决方案
  • 原文地址:https://www.cnblogs.com/waxili/p/3026540.html
Copyright © 2011-2022 走看看