You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sentry.apache.org by "Matyas Orhidi (JIRA)" <ji...@apache.org> on 2016/09/09 18:55:21 UTC

[jira] [Updated] (SENTRY-1465) TRUNCATE table is not working with qualified table names from beeline

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

Matyas Orhidi updated SENTRY-1465:
----------------------------------
    Description: 
Steps to reproduce the issue:

0: jdbc:hive2://morhidi-572-sec-1.gce.clouder> create table temp.a (b int);
INFO  : Compiling command(queryId=hive_20160909114848_8a4a81b9-8e14-4bb7-8e15-2bbac858babe): create table temp.a (b int)
INFO  : Semantic Analysis Completed
INFO  : Returning Hive schema: Schema(fieldSchemas:null, properties:null)
INFO  : Completed compiling command(queryId=hive_20160909114848_8a4a81b9-8e14-4bb7-8e15-2bbac858babe); Time taken: 0.097 seconds
INFO  : Executing command(queryId=hive_20160909114848_8a4a81b9-8e14-4bb7-8e15-2bbac858babe): create table temp.a (b int)
INFO  : Starting task [Stage-0:DDL] in serial mode
INFO  : Completed executing command(queryId=hive_20160909114848_8a4a81b9-8e14-4bb7-8e15-2bbac858babe); Time taken: 0.051 seconds
INFO  : OK
No rows affected (0.163 seconds)
0: jdbc:hive2://morhidi-572-sec-1.gce.clouder> truncate table temp.a;
Error: Error while compiling statement: FAILED: SemanticException No valid privileges
 User admin does not have privileges for TRUNCATETABLE
 The required privileges: Server=server1->Db=default->Table=temp->action=*; (state=42000,code=40000)


The user has no privileges in the default database:

0: jdbc:hive2://morhidi-572-sec-1.gce.clouder> show current roles;

+---------------+--+
|     role      |
+---------------+--+
| analyst_role  |
+---------------+--+


0: jdbc:hive2://morhidi-572-sec-1.gce.clouder> show grant role analyst_role;

+-----------+--------+------------+---------+-----------------+-----------------+------------+---------------+-------------------+----------+--+
| database  | table  | partition  | column  | principal_name  | principal_type  | privilege  | grant_option  |    grant_time     | grantor  |
+-----------+--------+------------+---------+-----------------+-----------------+------------+---------------+-------------------+----------+--+
| temp      |        |            |         | analyst_role    | ROLE            | *          | false         | 1473206055358000  | --       |
+-----------+--------+------------+---------+-----------------+-----------------+------------+---------------+-------------------+----------+--+



  was:
0: jdbc:hive2://morhidi-572-sec-1.gce.clouder> create table temp.a (b int);
INFO  : Compiling command(queryId=hive_20160909114848_8a4a81b9-8e14-4bb7-8e15-2bbac858babe): create table temp.a (b int)
INFO  : Semantic Analysis Completed
INFO  : Returning Hive schema: Schema(fieldSchemas:null, properties:null)
INFO  : Completed compiling command(queryId=hive_20160909114848_8a4a81b9-8e14-4bb7-8e15-2bbac858babe); Time taken: 0.097 seconds
INFO  : Executing command(queryId=hive_20160909114848_8a4a81b9-8e14-4bb7-8e15-2bbac858babe): create table temp.a (b int)
INFO  : Starting task [Stage-0:DDL] in serial mode
INFO  : Completed executing command(queryId=hive_20160909114848_8a4a81b9-8e14-4bb7-8e15-2bbac858babe); Time taken: 0.051 seconds
INFO  : OK
No rows affected (0.163 seconds)
0: jdbc:hive2://morhidi-572-sec-1.gce.clouder> truncate table temp.a;
Error: Error while compiling statement: FAILED: SemanticException No valid privileges
 User admin does not have privileges for TRUNCATETABLE
 The required privileges: Server=server1->Db=default->Table=temp->action=*; (state=42000,code=40000)


> TRUNCATE table is not working with qualified table names from beeline
> ---------------------------------------------------------------------
>
>                 Key: SENTRY-1465
>                 URL: https://issues.apache.org/jira/browse/SENTRY-1465
>             Project: Sentry
>          Issue Type: Bug
>    Affects Versions: 1.5.1
>            Reporter: Matyas Orhidi
>
> Steps to reproduce the issue:
> 0: jdbc:hive2://morhidi-572-sec-1.gce.clouder> create table temp.a (b int);
> INFO  : Compiling command(queryId=hive_20160909114848_8a4a81b9-8e14-4bb7-8e15-2bbac858babe): create table temp.a (b int)
> INFO  : Semantic Analysis Completed
> INFO  : Returning Hive schema: Schema(fieldSchemas:null, properties:null)
> INFO  : Completed compiling command(queryId=hive_20160909114848_8a4a81b9-8e14-4bb7-8e15-2bbac858babe); Time taken: 0.097 seconds
> INFO  : Executing command(queryId=hive_20160909114848_8a4a81b9-8e14-4bb7-8e15-2bbac858babe): create table temp.a (b int)
> INFO  : Starting task [Stage-0:DDL] in serial mode
> INFO  : Completed executing command(queryId=hive_20160909114848_8a4a81b9-8e14-4bb7-8e15-2bbac858babe); Time taken: 0.051 seconds
> INFO  : OK
> No rows affected (0.163 seconds)
> 0: jdbc:hive2://morhidi-572-sec-1.gce.clouder> truncate table temp.a;
> Error: Error while compiling statement: FAILED: SemanticException No valid privileges
>  User admin does not have privileges for TRUNCATETABLE
>  The required privileges: Server=server1->Db=default->Table=temp->action=*; (state=42000,code=40000)
> The user has no privileges in the default database:
> 0: jdbc:hive2://morhidi-572-sec-1.gce.clouder> show current roles;
> +---------------+--+
> |     role      |
> +---------------+--+
> | analyst_role  |
> +---------------+--+
> 0: jdbc:hive2://morhidi-572-sec-1.gce.clouder> show grant role analyst_role;
> +-----------+--------+------------+---------+-----------------+-----------------+------------+---------------+-------------------+----------+--+
> | database  | table  | partition  | column  | principal_name  | principal_type  | privilege  | grant_option  |    grant_time     | grantor  |
> +-----------+--------+------------+---------+-----------------+-----------------+------------+---------------+-------------------+----------+--+
> | temp      |        |            |         | analyst_role    | ROLE            | *          | false         | 1473206055358000  | --       |
> +-----------+--------+------------+---------+-----------------+-----------------+------------+---------------+-------------------+----------+--+



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