Alexey Vakulenchuk created HIVE-19582:
-----------------------------------------

             Summary: NPE during CREATE ROLE using SQL Standard Based Hive 
Authorization
                 Key: HIVE-19582
                 URL: https://issues.apache.org/jira/browse/HIVE-19582
             Project: Hive
          Issue Type: Bug
          Components: Hive
    Affects Versions: 2.3.3
            Reporter: Alexey Vakulenchuk


*General Info*

Hive version : 2.3.3
{code:java}
commit 3f7dde31aed44b5440563d3f9d8a8887beccf0be
Author: Daniel Dai <da...@hortonworks.com>
Date:   Wed Mar 28 16:46:29 2018 -0700

    Preparing for 2.3.3 release

{code}
Hadoop version: 2.7.2.

Engine
{code:java}
hive> set hive.execution.engine;
hive.execution.engine=mr{code}
Used official documentation:
 [SQL Standard Based Hive 
Authorization|https://cwiki.apache.org/confluence/display/Hive/SQL+Standard+based+hive+authorization#SQLStandardBasedHiveAuthorization-SetRole]

*Step 1. Configure hive-site.xml*
{code}
<property>
    <name>hive.server2.enable.doAs</name>
    <value>false</value>
</property>

<property>
    <name>hive.users.in.admin.role</name>
    <value>admin</value>
</property>

<property>
    <name>hive.security.metastore.authorization.manager</name>
 
<value>org.apache.hadoop.hive.ql.security.authorization.MetaStoreAuthzAPIAuthorizerEmbedOnly</value>
</property>

<property>
    <name>hive.security.authorization.manager</name>
    
<value>org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdConfOnlyAuthorizerFactory</value>
</property>


<property>
    <name>hive.security.authorization.enabled</name>
    <value>true</value>
</property>

<property>
    <name>hive.security.authenticator.manager</name>
    
<value>org.apache.hadoop.hive.ql.security.SessionStateUserAuthenticator</value>
</property>
{code}

*Step 2. Create ROLE*

hive> CREATE ROLE role1;
Actual result:
{code}
org.apache.hadoop.hive.ql.metadata.HiveException: Error while invoking 
FailureHook. hooks: java.lang.NullPointerException
        at 
org.apache.hadoop.hive.ql.reexec.ReExecutionOverlayPlugin$LocalHook.run(ReExecutionOverlayPlugin.java:45)
        at 
org.apache.hadoop.hive.ql.HookRunner.invokeGeneralHook(HookRunner.java:296)
        at 
org.apache.hadoop.hive.ql.HookRunner.runFailureHooks(HookRunner.java:283)
        at org.apache.hadoop.hive.ql.Driver.invokeFailureHooks(Driver.java:2353)
        at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:2123)
        at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1756)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1497)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1491)
        at 
org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:157)
        at 
org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:204)
        at 
org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:239)
        at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:188)
        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:402)
        at 
org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:821)
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:759)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:683)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:308)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:222)

FAILED: Hive Internal Error: 
org.apache.hadoop.hive.ql.metadata.HiveException(Error while invoking 
FailureHook. hooks: java.lang.NullPointerException
        at 
org.apache.hadoop.hive.ql.reexec.ReExecutionOverlayPlugin$LocalHook.run(ReExecutionOverlayPlugin.java:45)
        at 
org.apache.hadoop.hive.ql.HookRunner.invokeGeneralHook(HookRunner.java:296)
        at 
org.apache.hadoop.hive.ql.HookRunner.runFailureHooks(HookRunner.java:283)
        at org.apache.hadoop.hive.ql.Driver.invokeFailureHooks(Driver.java:2353)
        at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:2123)
        at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1756)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1497)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1491)
        at 
org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:157)
        at 
org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:204)
        at 
org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:239)
        at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:188)
        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:402)
        at 
org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:821)
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:759)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:683)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:308)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:222)
)
org.apache.hadoop.hive.ql.metadata.HiveException: Error while invoking 
FailureHook. hooks: java.lang.NullPointerException
        at 
org.apache.hadoop.hive.ql.reexec.ReExecutionOverlayPlugin$LocalHook.run(ReExecutionOverlayPlugin.java:45)
        at 
org.apache.hadoop.hive.ql.HookRunner.invokeGeneralHook(HookRunner.java:296)
        at 
org.apache.hadoop.hive.ql.HookRunner.runFailureHooks(HookRunner.java:283)
        at org.apache.hadoop.hive.ql.Driver.invokeFailureHooks(Driver.java:2353)
        at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:2123)
        at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1756)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1497)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1491)
        at 
org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:157)
        at 
org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:204)
        at 
org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:239)
        at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:188)
        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:402)
        at 
org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:821)
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:759)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:683)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:308)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:222)

        at 
org.apache.hadoop.hive.ql.HookRunner.invokeGeneralHook(HookRunner.java:302)
        at 
org.apache.hadoop.hive.ql.HookRunner.runFailureHooks(HookRunner.java:283)
        at org.apache.hadoop.hive.ql.Driver.invokeFailureHooks(Driver.java:2353)
        at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:2123)
        at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1756)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1497)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1491)
        at 
org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:157)
        at 
org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:204)
        at 
org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:239)
        at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:188)
        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:402)
        at 
org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:821)
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:759)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:683)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:308)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:222)
Caused by: java.lang.NullPointerException
        at 
org.apache.hadoop.hive.ql.reexec.ReExecutionOverlayPlugin$LocalHook.run(ReExecutionOverlayPlugin.java:45)
        at 
org.apache.hadoop.hive.ql.HookRunner.invokeGeneralHook(HookRunner.java:296)
        ... 20 more
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to