HBASE-9302 NPE when granting permission on table (Ted Yu)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1516593 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
af208097a5
commit
fa5e087ae9
|
@ -53,6 +53,7 @@ module Hbase
|
||||||
end
|
end
|
||||||
|
|
||||||
if (table_name != nil)
|
if (table_name != nil)
|
||||||
|
tablebytes=table_name.to_java_bytes
|
||||||
#check if the tablename passed is actually a namespace
|
#check if the tablename passed is actually a namespace
|
||||||
if (isNamespace?(table_name))
|
if (isNamespace?(table_name))
|
||||||
# Namespace should exist first.
|
# Namespace should exist first.
|
||||||
|
@ -60,7 +61,6 @@ module Hbase
|
||||||
raise(ArgumentError, "Can't find a namespace: #{namespace_name}") unless namespace_exists?(namespace_name)
|
raise(ArgumentError, "Can't find a namespace: #{namespace_name}") unless namespace_exists?(namespace_name)
|
||||||
|
|
||||||
#We pass the namespace name along with "@" so that we can differentiate a namespace from a table.
|
#We pass the namespace name along with "@" so that we can differentiate a namespace from a table.
|
||||||
tablebytes=table_name.to_java_bytes
|
|
||||||
# invoke cp endpoint to perform access controlse
|
# invoke cp endpoint to perform access controlse
|
||||||
org.apache.hadoop.hbase.protobuf.ProtobufUtil.grant(
|
org.apache.hadoop.hbase.protobuf.ProtobufUtil.grant(
|
||||||
protocol, user, tablebytes, perm.getActions())
|
protocol, user, tablebytes, perm.getActions())
|
||||||
|
|
Loading…
Reference in New Issue