hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Busbey (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-15297) error message is wrong when a wrong namspace is specified in grant in hbase shell
Date Tue, 13 Sep 2016 13:06:20 GMT

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

Sean Busbey updated HBASE-15297:
       Resolution: Fixed
     Hadoop Flags: Incompatible change
    Fix Version/s:     (was: 1.2.4)
     Release Note: 
The security admin instance available within the HBase shell now returns "false" from the
namespace_exists? method for non-existent namespaces rather than raising a wrapped NamespaceNotFoundException.

As a side effect, when the "grant" and "revoke" commands in the HBase shell are invoked with
a non-existent namespace the resulting error message now properly refers to said namespace
rather than to the user.
           Status: Resolved  (was: Patch Available)

I only brought this back to the branches for 1.3+, because the {{namespace_exists?}} method
is exposed in the shell. That means altering it breaks operational compatibility, which we
don't do in maintenance releases.

here's an example of the behavior before the change:

hbase(main):001:0> @shell.hbase_security_admin.namespace_exists? "hbase"
=> true
hbase(main):002:0> @shell.hbase_security_admin.namespace_exists? "foobar"
NativeException: org.apache.hadoop.hbase.NamespaceNotFoundException: org.apache.hadoop.hbase.NamespaceNotFoundException:
	at org.apache.hadoop.hbase.master.HMaster.getNamespaceDescriptor(HMaster.java:2549)
	at org.apache.hadoop.hbase.master.MasterRpcServices.getNamespaceDescriptor(MasterRpcServices.java:817)
	at org.apache.hadoop.hbase.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java:55732)
	at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2170)
	at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:109)
	at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:185)
	at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:165)


Now, naturally, the second call returns a proper {{false}} which will break any downstream
folks expecting an exception. Let me know if the release note needs more details to properly
warn folks who upgrade.

> error message is wrong when a wrong namspace is specified in grant in hbase shell
> ---------------------------------------------------------------------------------
>                 Key: HBASE-15297
>                 URL: https://issues.apache.org/jira/browse/HBASE-15297
>             Project: HBase
>          Issue Type: Bug
>          Components: shell
>    Affects Versions: 2.0.0, 1.2.0
>            Reporter: Xiang Li
>            Assignee: Umesh Agashe
>            Priority: Minor
>             Fix For: 2.0.0, 1.3.0, 1.4.0
>         Attachments: HBASE-15297.v1.patch
> In HBase shell, specify a non-existing namespace in "grant" command, such as
> {code}
> hbase(main):001:0> grant 'a1', 'R', '@aaa'    <--- there is no namespace called
> {code}
> The error message issued is not correct
> {code}
> ERROR: Unknown namespace a1!
> {code}
> a1 is the user name, not the namespace.
> The following error message would be better
> {code}
> ERROR: Unknown namespace aaa!
> {code}
> or
> {code}
> Can't find a namespace: aaa
> {code}

This message was sent by Atlassian JIRA

View raw message