Created 10-16-2017 05:15 AM
I am running a simple select query that fails on some strange permission issue. I am connecting with specific user and password.
see log attached.hive-jdbc-permissions-error.txt
Created 10-16-2017 07:55 AM
Turns out that the user password property names sent to the hive driver in connProps:
Connection connection = hiveDriver.connect(serverURL, connProps);
were wrong. so the user and password info wasn't sent out.
once fixed - the query works.
Created 10-16-2017 05:27 AM
Your directory has below permissions. User anonymous doesn't have write permissions on the folder
/user/anonymous : hdfs:hdfs:drwxr-xr-x
Change the ownership of the directory or give write permissions on the dir
1) hdfs dfs -chmod 777 /user/anonymous
2)hdfs dfs -chown anonymous:hdfs /user/anonymous
Thanks,
Aditya
Created 10-16-2017 07:20 AM
Thing is I don't know where this 'anonymous' came from (as I am using admin user) and I don't even have a folder named /user/anonymous
Created 10-16-2017 07:39 AM
I guess you are running it through beeline without passing the -n (username) param. You need to create /user/anonymous folder and change permissions as mentioned above to make it work. Or pass the valid username.
Thanks,
Aditya
Created 10-16-2017 06:36 AM
@Yair Ogen,
Can you let me know if you are trying the execute query using hiveserveer 1 or hiveserver2 ?
If it is hiveserver1, then please change this in hive config- hive.servere2.enable.doAs= true
The issue looks to be related to the user who is being used to execute the particular hive query. On enabling the above config param, for hiverserver1, it enables to execute as the end user rather then expecting as hive user.
Created 10-16-2017 07:16 AM
I am using hiveserver2
Created 10-16-2017 07:55 AM
Turns out that the user password property names sent to the hive driver in connProps:
Connection connection = hiveDriver.connect(serverURL, connProps);
were wrong. so the user and password info wasn't sent out.
once fixed - the query works.