[jira] [Updated] (HIVE-11809) Insert into table partition failed but partition directory created

2015-09-15 Thread niklaus.xiao (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-11809?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

niklaus.xiao updated HIVE-11809:

Description: 
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=hdfs, type=USER] does not have following 
privileges for operation QUERY [[SELECT] on Object [type=TABLE_OR_VIEW, 
name=default.t1]] (state=42000,code=4)
{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}


  was:
1. userA creates a partition table: create table w1(id int, name string, addr 
string) partitioned by (dt string) row format delimited fields terminated by 
',' stored as textfile;

2. userB tries to insert into userA's table: insert into table w1 
partition(dt='2') select id, name, addr from t1;

3. userB does not have select privilege of table t1 and insert privilege of w1, 
step 2 throws: Error: Error while compiling statement: FAILED: 
HiveAccessControlException Permission denied: Principal [name=hdfs, type=USER] 
does not have following privileges for operation QUERY [[SELECT] on Object 
[type=TABLE_OR_VIEW, name=default.t1]] (state=42000,code=4)

but the partition directory "/user/hive/warehouse/w1/dt=2" created:

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



> 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.xiao
>
> 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=hdfs, type=USER] does not have following 
> privileges for operation QUERY [[SELECT] on Object [type=TABLE_OR_VIEW, 
> name=default.t1]] (state=42000,code=4)
> {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)


[jira] [Commented] (HIVE-11736) while creating this hcatalog table then getting this error

2015-09-15 Thread niklaus.xiao (JIRA)

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

niklaus.xiao commented on HIVE-11736:
-

The create table command takes too long (longer than 60 seconds), then it was 
terminated. Try to check hcat logs why it takes so long or change the timeout 
configuration:
{quote}
templeton.exec.timeout 
{quote}

> while creating this hcatalog  table then getting this error 
> 
>
> Key: HIVE-11736
> URL: https://issues.apache.org/jira/browse/HIVE-11736
> Project: Hive
>  Issue Type: Bug
>Reporter: Sadeek Mohammad
>Priority: Blocker
>
> HCatClient error on create table: {"statement":"use default; create table 
> batting_data(`playerid` string, `yearid` int, `stint` bigint, `teamid` 
> string, `lgid` string, `g` bigint, `g_batting` bigint, `ab` bigint, `r` 
> bigint, `h` bigint, `2b` bigint, `3b` bigint, `hr` bigint, `rbi` bigint, `sb` 
> bigint, `cs` bigint, `bb` bigint, `so` bigint, `ibb` bigint, `hbp` bigint, 
> `sh` bigint, `sf` bigint, `gidp` bigint, `g_old` bigint) row format delimited 
> fields terminated by ',';","error":"unable to create table: 
> batting_data","exec":{"stdout":"","stderr":"which: no 
> /usr/hdp/2.2.4.2-2//hadoop/bin/hadoop.distro in ((null))\ndirname: missing 
> operand\nTry `dirname --help' for more information.\nSLF4J: Class path 
> contains multiple SLF4J bindings.\nSLF4J: Found binding in 
> [jar:file:/usr/hdp/2.2.4.2-2/hadoop/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]\nSLF4J:
>  Found binding in 
> [jar:file:/usr/hdp/2.2.4.2-2/hive/lib/hive-jdbc-0.14.0.2.2.4.2-2-standalone.jar!/org/slf4j/impl/StaticLoggerBinder.class]\nSLF4J:
>  See http://www.slf4j.org/codes.html#multiple_bindings for an 
> explanation.\nSLF4J: Actual binding is of type 
> [org.slf4j.impl.Log4jLoggerFactory]\n Command  was terminated due to 
> timeout(6ms).  See templeton.exec.timeout property","exitcode":143}} 
> (error 500)
> any help is appreciated 



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


[jira] [Updated] (HIVE-11809) Insert into table partition failed but partition directory created

2015-09-13 Thread niklaus.xiao (JIRA)

 [ 
https://issues.apache.org/jira/browse/HIVE-11809?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

niklaus.xiao updated HIVE-11809:

Description: 
1. userA creates a partition table: create table w1(id int, name string, addr 
string) partitioned by (dt string) row format delimited fields terminated by 
',' stored as textfile;

2. userB tries to insert into userA's table: insert into table w1 
partition(dt='2') select id, name, addr from t1;

3. userB does not have select privilege of table t1 and insert privilege of w1, 
step 2 throws: Error: Error while compiling statement: FAILED: 
HiveAccessControlException Permission denied: Principal [name=hdfs, type=USER] 
does not have following privileges for operation QUERY [[SELECT] on Object 
[type=TABLE_OR_VIEW, name=default.t1]] (state=42000,code=4)

but the partition directory "/user/hive/warehouse/w1/dt=2" created:

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


  was:
1. userA creates a partition table: create table w1(id int, name string, addr 
string) partitioned by (dt string) row format delimited fields terminated by 
',' stored as textfile;
2. userB tries to insert into userA's table: insert into table w1 
partition(dt='2') select id, name, addr from t1;
3. userB does not have select privilege of table t1 and insert privilege of w1, 
step 2 throws: Error: Error while compiling statement: FAILED: 
HiveAccessControlException Permission denied: Principal [name=hdfs, type=USER] 
does not have following privileges for operation QUERY [[SELECT] on Object 
[type=TABLE_OR_VIEW, name=default.t1]] (state=42000,code=4)
but the partition directory "/user/hive/warehouse/w1/dt=2" created:
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



> 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.xiao
>
> 1. userA creates a partition table: create table w1(id int, name string, addr 
> string) partitioned by (dt string) row format delimited fields terminated by 
> ',' stored as textfile;
> 2. userB tries to insert into userA's table: insert into table w1 
> partition(dt='2') select id, name, addr from t1;
> 3. userB does not have select privilege of table t1 and insert privilege of 
> w1, 
> step 2 throws: Error: Error while compiling statement: FAILED: 
> HiveAccessControlException Permission denied: Principal [name=hdfs, 
> type=USER] does not have following privileges for operation QUERY [[SELECT] 
> on Object [type=TABLE_OR_VIEW, name=default.t1]] (state=42000,code=4)
> but the partition directory "/user/hive/warehouse/w1/dt=2" created:
> 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



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