Author: apurtell
Date: Wed Apr 23 18:55:20 2014
New Revision: 1589493
URL: http://svn.apache.org/r1589493
Log:
Amend HBASE-11001 Shell support for granting cell permissions for testing; Fix
global grants
Modified:
hbase/branches/0.98/hbase-shell/src/main/ruby/shell/commands/grant.rb
Modified: hbase/branches/0.98/hbase-shell/src/main/ruby/shell/commands/grant.rb
URL:
http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-shell/src/main/ruby/shell/commands/grant.rb?rev=1589493&r1=1589492&r2=1589493&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-shell/src/main/ruby/shell/commands/grant.rb
(original)
+++ hbase/branches/0.98/hbase-shell/src/main/ruby/shell/commands/grant.rb Wed
Apr 23 18:55:20 2014
@@ -53,19 +53,20 @@ EOF
permissions = args[1]
raise(ArgumentError, "Permissions are not of String type") unless
permissions.kind_of?(
String)
- table_name = args[2]
- raise(ArgumentError, "Table name is not of String type") unless
table_name.kind_of?(
- String)
- family = args[3] # will be nil if unset
- if not family.nil?
- raise(ArgumentError, "Family is not of String type") unless
family.kind_of?(String)
- qualifier = args[4] # will be nil if unset
- if not qualifier.nil?
- raise(ArgumentError, "Qualifier is not of String type") unless
qualifier.kind_of?(
- String)
+ table_name = family = qualifier = nil
+ table_name = args[2] # will be nil if unset
+ if not table_name.nil?
+ raise(ArgumentError, "Table name is not of String type") unless
table_name.kind_of?(
+ String)
+ family = args[3] # will be nil if unset
+ if not family.nil?
+ raise(ArgumentError, "Family is not of String type") unless
family.kind_of?(String)
+ qualifier = args[4] # will be nil if unset
+ if not qualifier.nil?
+ raise(ArgumentError, "Qualifier is not of String type") unless
qualifier.kind_of?(
+ String)
+ end
end
- else
- qualifier = nil
end
format_simple_command do
security_admin.grant(user, permissions, table_name, family,
qualifier)