利用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