HBASE-12601 Explain how to grant/revoke permission to a group/namespace in grant/revoke command usage (Ashish Singhi)

This commit is contained in:
Misty Stanley-Jones 2014-12-10 15:04:54 +10:00
parent df22270756
commit a4318aa8aa
3 changed files with 16 additions and 2 deletions

View File

@ -27,11 +27,14 @@ Syntax : grant <user> <permissions> [<@namespace> [<table> [<column family> [<co
permissions is either zero or more letters from the set "RWXCA". permissions is either zero or more letters from the set "RWXCA".
READ('R'), WRITE('W'), EXEC('X'), CREATE('C'), ADMIN('A') READ('R'), WRITE('W'), EXEC('X'), CREATE('C'), ADMIN('A')
Note: A namespace must always precede with '@' character. Note: Groups and users are granted access in the same way, but groups are prefixed with an '@'
character. In the same way, tables and namespaces are specified, but namespaces are
prefixed with an '@' character.
For example: For example:
hbase> grant 'bobsmith', 'RWXCA' hbase> grant 'bobsmith', 'RWXCA'
hbase> grant '@admins', 'RWXCA'
hbase> grant 'bobsmith', 'RWXCA', '@ns1' hbase> grant 'bobsmith', 'RWXCA', '@ns1'
hbase> grant 'bobsmith', 'RW', 't1', 'f1', 'col1' hbase> grant 'bobsmith', 'RW', 't1', 'f1', 'col1'
hbase> grant 'bobsmith', 'RW', 'ns1:t1', 'f1', 'col1' hbase> grant 'bobsmith', 'RW', 'ns1:t1', 'f1', 'col1'

View File

@ -22,10 +22,17 @@ module Shell
def help def help
return <<-EOF return <<-EOF
Revoke a user's access rights. Revoke a user's access rights.
Syntax : revoke <user> [<table> [<column family> [<column qualifier>]] Syntax : revoke <user> [<@namespace> [<table> [<column family> [<column qualifier>]]]]
Note: Groups and users access are revoked in the same way, but groups are prefixed with an '@'
character. In the same way, tables and namespaces are specified, but namespaces are
prefixed with an '@' character.
For example: For example:
hbase> revoke 'bobsmith' hbase> revoke 'bobsmith'
hbase> revoke '@admins'
hbase> revoke 'bobsmith', '@ns1'
hbase> revoke 'bobsmith', 't1', 'f1', 'col1' hbase> revoke 'bobsmith', 't1', 'f1', 'col1'
hbase> revoke 'bobsmith', 'ns1:t1', 'f1', 'col1' hbase> revoke 'bobsmith', 'ns1:t1', 'f1', 'col1'
EOF EOF

View File

@ -23,9 +23,13 @@ module Shell
return <<-EOF return <<-EOF
Show all permissions for the particular user. Show all permissions for the particular user.
Syntax : user_permission <table> Syntax : user_permission <table>
Note: A namespace must always precede with '@' character.
For example: For example:
hbase> user_permission hbase> user_permission
hbase> user_permission '@ns1'
hbase> user_permission 'table1' hbase> user_permission 'table1'
hbase> user_permission 'namespace1:table1' hbase> user_permission 'namespace1:table1'
hbase> user_permission '.*' hbase> user_permission '.*'