This is a known issue, it still will write something at '/apps/hive/warehouse',
it's best to assign a common group to your hive and hdfs users and assign
that group to both of these directories. I heard this issue is fixed in .12
or .13, others can confirm.


On Thu, Jan 30, 2014 at 8:27 AM, Alex Nastetsky <anastet...@spryinc.com>wrote:

> Hi,
>
> I am trying to enforce all Hive tables to be created with EXTERNAL. The
> way I am doing this is by making the location of the warehouse
> (/apps/hive/warehouse in my case) to have permissions 000 (completely
> inaccessible).
>
> But then when I try to create an external table, I see that it still tries
> to write to /apps/hive/warehouse and, of course, fails:
>
> hive> CREATE EXTERNAL TABLE mytable(id INT, name STRING) ROW FORMAT
> DELIMITED FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' STORED AS
> TEXTFILE LOCATION '/user/anastetsky/warehouse';
> Authorization failed:java.security.AccessControlException: action WRITE
> not permitted on path hdfs://<hostname>:8020/apps/hive/warehouse for user
> anastetsky. Use show grant to get more details.
>
> What am I missing? Or is there a better way to enforce tables to be
> EXTERNAL?
>
> Thanks in advance,
> Alex.
>

Reply via email to