jdbc连接hive的问题

在尝试使用jdbc连接Hive时遇到错误:Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask。问题源于权限不足,用户匿名无法执行写操作。解决方案是使用hdfs命令修改目录权限或在连接时使用有权限的Hive用户名。执行权限修复和正确设置用户后,Hive JDBC连接及插入操作成功。" 81101356,7687174,Qt教程:创建管理员注册界面,"['Qt开发', 'GUI设计', '数据库交互', '编程概念', '对话框']
摘要由CSDN通过智能技术生成

利用hive jdbc连接hive出现如下问题:

 

org.apache.hive.jdbc.HiveDriverorg.apache.hive.jdbc.HiveDriverhive_driver:

org.apache.hive.jdbc.HiveDriverhive_url:jdbc:hive2://10.174.242.28:10000/defaultget

connection sessucess获取hive连接成功!

java.sql.SQLException: Error whileprocessing statement: FAILED: Execution Error, return code 1 fromorg.apache.hadoop.hive.ql.exec.mr.MapRedTask

I tried to use the sql execute in hive andit works well. Then I saw the log in/var/log/hive/hadoop-cmf-hive-HIVESERVER2-cloud000.log.out then I found thereason of this error. The following error:

 

Job Submission failed with exception'org.apache.hadoop.security.AccessControlException(Permission denied:user=anonymous, access=WRITE,inode="/user":hdfs:supergroup:drwxr-xr-x

Solution

 


 

sudo -u hdfs hadoop fs -chmod -R 777  /

This solved the error!

 

hive_dri

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值