[
https://issues.apache.org/jira/browse/SENTRY-1558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16366330#comment-16366330
]
Steve Moist commented on SENTRY-1558:
-------------------------------------
Hi [~Jan Hentschel], any update to this? I've started taking a look at it. It
looks like Hive 2.1.1 doesn't support this.
0: jdbc:hive2://moist-sentry-1.gce.cloudera.c> show group comedygroup;
Error: Error while compiling statement: FAILED: ParseException line 1:5 cannot
recognize input near 'show' 'group' 'comedygroup' in ddl statement
(state=42000,code=40000)
org.apache.hive.service.cli.HiveSQLException: Error while compiling statement:
FAILED: ParseException line 1:5 cannot recognize input near 'show' 'group'
'comedygroup' in ddl statement
at
org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:330)
~[hive-service-2.1.1-cdh6.x-SNAPSHOT.jar:2.1.1-cdh6.x-SNAPSHOT]
at
org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:203)
~[hive-service-2.1.1-cdh6.x-SNAPSHOT.jar:2.1.1-cdh6.x-SNAPSHOT]
at
org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:286)
~[hive-service-2.1.1-cdh6.x-SNAPSHOT.jar:2.1.1-cdh6.x-SNAPSHOT]
at
org.apache.hive.service.cli.operation.Operation.run(Operation.java:262)
~[hive-service-2.1.1-cdh6.x-SNAPSHOT.jar:2.1.1-cdh6.x-SNAPSHOT]
at
org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:503)
~[hive-service-2.1.1-cdh6.x-SNAPSHOT.jar:2.1.1-cdh6.x-SNAPSHOT]
at
org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:490)
~[hive-service-2.1.1-cdh6.x-SNAPSHOT.jar:2.1.1-cdh6.x-SNAPSHOT]
at
org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:295)
~[hive-service-2.1.1-cdh6.x-SNAPSHOT.jar:2.1.1-cdh6.x-SNAPSHOT]
at
org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:506)
[hive-service-2.1.1-cdh6.x-SNAPSHOT.jar:2.1.1-cdh6.x-SNAPSHOT]
at
org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1437)
[hive-exec-2.1.1-cdh6.x-SNAPSHOT.jar:2.1.1-cdh6.x-SNAPSHOT]
at
org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1422)
[hive-exec-2.1.1-cdh6.x-SNAPSHOT.jar:2.1.1-cdh6.x-SNAPSHOT]
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
[hive-exec-2.1.1-cdh6.x-SNAPSHOT.jar:2.1.1-cdh6.x-SNAPSHOT]
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
[hive-exec-2.1.1-cdh6.x-SNAPSHOT.jar:2.1.1-cdh6.x-SNAPSHOT]
at
org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor.process(HadoopThriftAuthBridge.java:605)
[hive-exec-2.1.1-cdh6.x-SNAPSHOT.jar:2.1.1-cdh6.x-SNAPSHOT]
at
org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
[hive-exec-2.1.1-cdh6.x-SNAPSHOT.jar:2.1.1-cdh6.x-SNAPSHOT]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[?:1.8.0_144]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[?:1.8.0_144]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
Caused by: org.apache.hadoop.hive.ql.parse.ParseException: line 1:5 cannot
recognize input near 'show' 'group' 'comedygroup' in ddl statement
at
org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:211)
~[hive-exec-2.1.1-cdh6.x-SNAPSHOT.jar:2.1.1-cdh6.x-SNAPSHOT]
at org.apache.hadoop.hive.ql.parse.ParseUtils.parse(ParseUtils.java:75)
~[hive-exec-2.1.1-cdh6.x-SNAPSHOT.jar:2.1.1-cdh6.x-SNAPSHOT]
at org.apache.hadoop.hive.ql.parse.ParseUtils.parse(ParseUtils.java:68)
~[hive-exec-2.1.1-cdh6.x-SNAPSHOT.jar:2.1.1-cdh6.x-SNAPSHOT]
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:505)
~[hive-exec-2.1.1-cdh6.x-SNAPSHOT.jar:2.1.1-cdh6.x-SNAPSHOT]
at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1330)
~[hive-exec-2.1.1-cdh6.x-SNAPSHOT.jar:2.1.1-cdh6.x-SNAPSHOT]
at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1308)
~[hive-exec-2.1.1-cdh6.x-SNAPSHOT.jar:2.1.1-cdh6.x-SNAPSHOT]
at
org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:201)
~[hive-service-2.1.1-cdh6.x-SNAPSHOT.jar:2.1.1-cdh6.x-SNAPSHOT]
... 15 more
> Implement functionality to show groups for a given role
> -------------------------------------------------------
>
> Key: SENTRY-1558
> URL: https://issues.apache.org/jira/browse/SENTRY-1558
> Project: Sentry
> Issue Type: New Feature
> Reporter: Jan Hentschel
> Assignee: Jan Hentschel
> Priority: Major
>
> Sentry allows to list the roles for a given group via
> {code:sql}
> SHOW ROLE GRANT GROUP <groupName>;
> {code}
> There should be also a way to show the groups for a given role. Currently it
> seems that this is only possible by directly querying the Sentry database.
> This functionality should be provided out-of-the-box similar to the statement
> above.
> The functionality could look similar to the following statement
> {code:sql}
> SHOW GROUP GRANT ROLE <roleName>;
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)