给用户分配对每个表的操作权限,有RWXCA五种,对应READ, WRITE, EXEC, CREATE, ADMIN

hbase(main):222:0> help "grant"

Grant users specific rights.

Syntax: grant <user or @group>, <permissions> [, <table> [, <column family> [, <column qualifier>]]]

Syntax: grant <user or @group>, <permissions>, <@namespace>

permissions is either zero or more letters from the set "RWXCA". READ('R'), WRITE('W'), EXEC('X'), CREATE('C'), ADMIN('A')

Note: Groups and users are granted access in the same way, but groups are prefixed with an '@'       character. Tables and namespaces are specified the same way, but namespaces are       prefixed with an '@' character.

For example:

hbase> grant 'bobsmith', 'RWXCA'

hbase> grant '@admins', 'RWXCA'

hbase> grant 'bobsmith', 'RWXCA', '@ns1'

hbase> grant 'bobsmith', 'RW', 't1', 'f1', 'col1'

hbase> grant 'bobsmith', 'RW', 'ns1:t1', 'f1', 'col1'

查看权限

hbase(main):220:0> help "user_permission"

Show all permissions for the particular user. Syntax : user_permission <table>

Note: A namespace must always precede with '@' character.

For example:

hbase> user_permission

hbase> user_permission '@ns1'

hbase> user_permission '@.*'

hbase> user_permission '@^[a-c].*'

hbase> user_permission 'table1'

hbase> user_permission 'namespace1:table1'

hbase> user_permission '.*'

hbase> user_permission '^[A-C].*'

收回权限

hbase(main):221:0> help "revoke"

Revoke a user's access rights.

Syntax:

revoke <user or @group> [, <table> [, <column family> [, <column qualifier>]]]

Syntax:

revoke <user or @group>, <@namespace>

Note: Groups and users access are revoked in the same way, but groups are prefixed with an '@'       character. Tables and namespaces are specified the same way, but namespaces are       prefixed with an '@' character.

For example:

hbase> revoke 'bobsmith'

hbase> revoke '@admins'

hbase> revoke 'bobsmith', '@ns1'

hbase> revoke 'bobsmith', 't1', 'f1', 'col1'

hbase> revoke 'bobsmith', 'ns1:t1', 'f1', 'col1'

hbase权限管理的更多相关文章

  1. Mongodb增加权限管理

     前言: 随着列式存储理念的成熟,越来越多的开发者开始接纳mongodb,hbase这类大储存的分布式列式数据库.特别是mongodb的这种快速搭建,快速使用特点,使其得到更多人的青睐.本人主要通过官 ...

  2. 【Hive学习之七】Hive 运行方式&权限管理

    环境 虚拟机:VMware 10 Linux版本:CentOS-6.5-x86_64 客户端:Xshell4 FTP:Xftp4 jdk8 hadoop-3.1.1 apache-hive-3.1.1 ...

  3. hive(七)hive-运行方式、GUI接口、权限管理

    1.Hive运行方式: 命令行方式cli:控制台模式 脚本运行方式(实际生产环境中用最多) JDBC方式:hiveserver2 web GUI接口 (hwi.hue等)   1.1Hive在CLI模 ...

  4. Zookeeper权限管理与Quota管理

    Zookeeper的ACL机制和Quota机制网上资料较少,这里做一个总结,以供大家参考. 1 Zookeeper ACL ZooKeeper的权限管理亦即ACL控制功能通过Server.Client ...

  5. hbase权限控制

    HBase的权限管理依赖协协处理器.所以我们需要配置以下参数: hbase.superuser=hbase hbase.coprocessor.region.classes=org.apache.ha ...

  6. HBase 权限控制

    HBase的权限管理依赖协协处理器.所以我们需要配置hbase.security.authorization=true,以及hbase.coprocessor.master.classes和hbase ...

  7. HDFS、Yarn、Hive…MRS中使用Ranger实现权限管理全栈式实践

    摘要:Ranger为组件提供基于PBAC的鉴权插件,供组件服务端运行,目前支持Ranger鉴权的组件有HDFS.Yarn.Hive.HBase.Kafka.Storm和Spark2x,后续会支持更多组 ...

  8. Android权限管理之RxPermission解决Android 6.0 适配问题

    前言: 上篇重点学习了Android 6.0的运行时权限,今天还是围绕着Android 6.0权限适配来总结学习,这里主要介绍一下我们公司解决Android 6.0权限适配的方案:RxJava+RxP ...

  9. Android权限管理之Android 6.0运行时权限及解决办法

    前言: 今天还是围绕着最近面试的一个热门话题Android 6.0权限适配来总结学习,其实Android 6.0权限适配我们公司是在今年5月份才开始做,算是比较晚的吧,不过现在Android 6.0以 ...

随机推荐

  1. hdu2060-2062

    hdu 2060 斯诺克,读懂题意直接模拟 #include<stdio.h> int main(){ int N; ]; a[]=; ;i<=;i++){ a[i]=(-i)*i/ ...

  2. LeetCode Factorial Trailing Zeroes Python

    Factorial Trailing Zeroes Given an integer n, return the number of trailing zeroes in n!. 题目意思: n求阶乘 ...

  3. Ubuntu配置操作总结

    一.fstab和mtab的区别 /etc/fstab:是开机自动挂载的配置文件,在开机时起作用.相当于启动linux的时候,自动使用检查分区的fsck命令和挂载分区的mount命令,检查分区和挂载分区 ...

  4. stenciljs 学习七 路由

    stenciljs路由类似react router 安装 npm install @stencil/router --save 使用 导入包 import "@stencil/router& ...

  5. Oracle更换字符集

    现有数据库使用字符集是GBK,做读写分离的时候,发现读库的数据库安装错误,使用了UTF8的字符集 需要把读库的字符集进行调整. 1.进入PLSQL查看下数据库字符集 select * from nls ...

  6. 注册表禁用和启用USB端口

    USB端口禁用把下面代码另存为文件:USB_Disable.batcSCript \\AppServices\netlogon\USB_Disable.vbs--------------------- ...

  7. 容器、应用服务器和web服务器的区别

    什么是容器 servlet没main()方法.它们受控于另一个java应用,这个java应用称为容器(Container)Tomcat是这样的容器,Web服务器应用(Apache)得到一个指向serv ...

  8. Erlang

    Erlang The Erlang BEAM Virtual Machine Specificationhttp://www.cs-lab.org/historical_beam_instructio ...

  9. JZ2440 裸机驱动 第9章 中断体系结构

    本章目标:     了解ARM体系CPU的7种工作模式     了解S3C2410/S3C2440中断体系结构     掌握S3C2410/S3C2440的中断服务程序的编写方法 9.1 S3C241 ...

  10. 豆瓣源安装python包

    例如安装scrapy: pip install -i https://pypi.douban.com/simple/ scrapy