hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zheng Hu (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HBASE-16990) Shell tool to dump table and namespace privileges
Date Tue, 21 Feb 2017 09:47:44 GMT

    [ https://issues.apache.org/jira/browse/HBASE-16990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15875690#comment-15875690
] 

Zheng Hu edited comment on HBASE-16990 at 2/21/17 9:47 AM:
-----------------------------------------------------------

Currently,  grants_dumper.rb  script works fine.  it will has following feature:
{code}
Dump HBase Table/Namespace grants

Example:
  bash hbase-jruby grants_dumper.rb -h | --help               # show usage
  bash hbase-jruby grants_dumper.rb t1                        # dump permission of table t1
  bash hbase-jruby grants_dumper.rb t1 t2                     # dump permission of table t1
& t2
  bash hbase-jruby grants_dumper.rb -w <file> t1 t2           # dump permission of table
t1 & t2 to <file>
  bash hbase-jruby grants_dumper.rb t1 @ns1 t2                # dump permission of table t1
& t2, namespace ns1
  bash hbase-jruby grants_dumper.rb -w <file> t1 @ns1 t2      # dump permission of table
t1 & t2, namespace ns1 to <file>
  bash hbase-jruby grants_dumper.rb --namespace ns1           # dump permission of all table
under namespace
  bash hbase-jruby grants_dumper.rb --namespace ns1 -w <file> # dump permission of all
table under namespace to <file>
  bash hbase-jruby grants_dumper.rb --all                     # dump permission of all table
  bash hbase-jruby grants_dumper.rb --all -w <file>           # dump permission of all
table to <file>
{code} 



was (Author: openinx):
Currently,  grants_dumper.rb  script works fine.  it will has following feature:
{code}
Dump HBase Table/Namespace grants

Example:
  bash hbase-jruby grants_dumper.rb -h | --help                           # show usage
  bash hbase-jruby grants_dumper.rb t1                                        #  dump permission
of table t1
  bash hbase-jruby grants_dumper.rb t1 t2                                    # dump permission
of table t1 & t2
  bash hbase-jruby grants_dumper.rb -w <file> t1 t2                      # dump permission
of table t1 & t2 to <file>
  bash hbase-jruby grants_dumper.rb t1 @ns1 t2                          # dump permission
of table t1 & t2, namespace ns1
  bash hbase-jruby grants_dumper.rb -w <file> t1 @ns1 t2            # dump permission
of table t1 & t2, namespace ns1 to <file>
  bash hbase-jruby grants_dumper.rb --namespace ns1                 # dump permission of all
table under namespace
  bash hbase-jruby grants_dumper.rb --namespace ns1 -w <file>   # dump permission of
all table under namespace to <file>
  bash hbase-jruby grants_dumper.rb --all                                        # dump permission
of all table
  bash hbase-jruby grants_dumper.rb --all -w <file>                         # dump permission
of all table to <file>
{code} 


> Shell tool to dump table and namespace privileges
> -------------------------------------------------
>
>                 Key: HBASE-16990
>                 URL: https://issues.apache.org/jira/browse/HBASE-16990
>             Project: HBase
>          Issue Type: New Feature
>          Components: tooling
>            Reporter: Zheng Hu
>            Assignee: Zheng Hu
>            Priority: Minor
>         Attachments: HBASE-16990.v1.patch
>
>
> Recently,  we are trying to migrate tables from Cluster-A to Cluster-B,  I found that
HBase lack some useful tools :
> 1.  dump table schema,  like mysqldump in mysql
> 2.  dump table privileges,  like pt-show-grants in mysql provided by Percona. 
> I think we can add a dump sub-command looks like (JUST simple demo) : 
> {code}
> $ ./bin/hbase dump  -t test_table  --with-privileges  > ~/test_table.hsh
> $ cat ~/test_table.hsh
> create 'test_table', {NAME=>'f1'} 
> grant 'test_user', 'RW', 'test_table'
> {code}
> Maybe I can contribute ...  :)
> How do you think ?  



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message