[ 
https://issues.apache.org/jira/browse/HIVE-11809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14804856#comment-14804856
 ] 

niklaus shaw commented on HIVE-11809:
-------------------------------------

When create tmp scratch dir, hive will create the parent dir which is the 
partition dir, but when delete scratch dir, it will only delete the scratch dir 
but not the parent dir.  Maybe we need to add parent dir to a List, and when 
exception occurs, remove this dir either.

> Insert into table partition failed but partition directory created
> ------------------------------------------------------------------
>
>                 Key: HIVE-11809
>                 URL: https://issues.apache.org/jira/browse/HIVE-11809
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 1.2.0, 1.1.0, 1.1.1
>            Reporter: niklaus shaw
>
> 1. userA creates a partition table: 
> {quote}
> create table w1(id int, name string, addr string) partitioned by (dt string) 
> row format delimited fields terminated by ',' stored as textfile;
> {quote}
> 2. userB tries to insert into userA's table: 
> {quote}
> insert into table w1 partition(dt='2') select id, name, addr from t1;
> {quote}
> 3. userB does not have select privilege of table t1 and insert privilege of 
> w1, 
> step 2 throws: 
> {quote}
> Error: Error while compiling statement: FAILED: HiveAccessControlException 
> Permission denied: Principal [name=userB, type=USER] does not have following 
> privileges for operation QUERY [[SELECT] on Object [type=TABLE_OR_VIEW, 
> name=default.t1]] (state=42000,code=40000)
> {quote}
> but the partition directory "/user/hive/warehouse/w1/dt=2" created:
> {quote}
> hdfs dfs -ls /user/hive/warehouse/w1/
> 15/09/14 11:16:42 INFO hdfs.PeerCache: SocketCache disabled.
> Found 2 items
> drwx------   - userA hive          0 2015-09-14 10:05 
> /user/hive/warehouse/w1/dt=1
> drwx------   - userB  hive          0 2015-09-14 10:23 
> /user/hive/warehouse/w1/dt=2
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to