0
votes

With Hive 1.x, my query similar to this:

select ... from Table group by column;

works fine. However with beeline like so

alias beeline='beeline -u jdbc:hive2://localhost:10000 -u hadoop -p pass --hiveconf  hive.resultset.use.unique.column.names=false --hiveconf  hive.groupby.orderby.position.alias=true'

which uses

$HIVE_HOME/bin/hive --service hiveserver2

which is ran by the user hadoop causes:

Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException): Permission denied: user=anonymous, access=EXECUTE, inode="/tmp/hadoop-yarn":hadoop:supergroup:drwx------

I also got a similar error in beeline vs hive directly with another query:

Error: Error while compiling statement: FAILED: SemanticException 0:0 Error creating temporary folder on: hdfs://localhost:9000/user/hive/warehouse. Error encountered near token 'TOK_TMP_FILE' (state=42000,code=40000)

Trying this in my hive-site.xml:

 <property>
   <name>hive.server2.enable.doAs</name>
   <value>true</value>
 </property>

did not work...

Ideas?

1

1 Answers

1
votes

Ok. The issue is with the user permission. When you run the beeline you must specify the username which you did but with the wrong argument. Please use -n to supply the username parameter and not -u