Well, it took nearly a day to solve the JDBC problem with hive, and the solution was so simple.
Encounter problems
SELECT * from flag where 1 =1 and cust_no = ' A3325221981121080410 ' limit 5java.sql.sqlexception:error while Proce Ssing statement:FAILED:RuntimeException org.apache.hadoop.security.AccessControlException:Permission denied:user= Anonymous, Access=write, inode= "/tmp/hive-hive": Hive:hdfs:drwxr-xr-xat Org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check (fspermissionchecker.java:234) at Org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check (fspermissionchecker.java:214) at Org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission (fspermissionchecker.java:158) at Org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkPermission (fsnamesystem.java:5202) at Org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkPermission (fsnamesystem.java:5184)
View Permissions
[[email protected] ~]# Hadoop fs-ls/tmpfound 5 itemsdrwxr-xr-x -HDFs hdfs 0 2014-10-22 17:06/tmp/hive-hdfs Drwxr-xr-x -Hive hdfs 0 2014-09-22 10:41/tmp/hive-hivedrwxr-xr-x -root hdfs 0 2014-10-28 10:50/tmp/hive-root-rw-r--r-- 3 Administrator hdfs 3 2014-09-01 16:18/tmp/qq.txt-rw-r--r-- 3 Administrator HDFs 2014-09-03 11:08/tmp/test.txt
Modify Permissions
[Email protected] ~]# Hadoop dfs-chmod-r 755/tmp/
Hive JDBC Examples and problems encountered