hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Bamford <nathan.bamf...@redpoint.net>
Subject hive file permissions
Date Thu, 16 Oct 2014 16:56:07 GMT
Hi,

  I'm using the hive.ql.driver class in my application to perform some DDL tasks(in Cloudera
5.0, which is a Hive 0.12 with a number of 0.13 patches, although I have also verified the
same issue in 0.13), and I am running into a permissions problem I don't understand.

  The following code:


Driver driver = new Driver(conf, "nbamford");
try {
driver.run("create table permtest (id int, value string)");
driver.run("truncate table permtest");
driver.run("drop table permtest");
} catch (CommandNeedRetryException e) {
e.printStackTrace();
}

Results in success creating and dropping the table, but the truncate command returns: Permission
denied by sticky bit setting: user=nbamford, inode=permtest.

When I look at the permtest? table, it show it's owned by user hive:

drwxr-xr-x   - hive hdfs          0 2014-10-16 10:51 /apps/hive/warehouse/permtest

So, as far as I can tell, when I issue the table create and drop commands, I am user hive,
but when I try the truncate command, I am user nbamford.

Am I misusing the driver class? Or is this expected behavior?

Thanks,

Nathan


Mime
View raw message