【报错-大数据技术-Hbase & Ranger】hbase创建、删除(表、命名空间)无权限问题,但是向表put、get、scan数据报错

03-20 1677阅读

1、问题描述

使用hbase shell执行创建命名空间、创建表、插入数据、获取数据、查看数据、删除命名空间、删除表等命令操作,发现可以创建命名空间、创建表、删除命名空间、删除表,但是插入数据、获取数据、查看数据等操作却报没有权限的问题,但是我已在Ranger上赋予用户testuser1对该命名空间的所有权限了。

【报错-大数据技术-Hbase & Ranger】hbase创建、删除(表、命名空间)无权限问题,但是向表put、get、scan数据报错
(图片来源网络,侵删)

报错内容如下:

                             
hbase:001:0> create_namespace 'ns3'
Took 0.5417 seconds          
hbase:002:0> create 'ns3:t1', 'C1'
Created table ns3:t1
Took 1.1398 seconds          
=> Hbase::Table - ns3:t1
hbase:003:0> put 'ns3:t1','1','C1:age','18'
ERROR: org.apache.hadoop.hbase.security.AccessDeniedException: Insufficient permissions for user ‘testuser1',action: put, tableName:ns3:t1, family:C1, column: age
For usage try 'help "put"'
Took 1.0777 seconds          
hbase:004:0> get 'ns3:t1', '1'
COLUMN                                      CELL                            
ERROR: org.apache.hadoop.hbase.security.AccessDeniedException: Insufficient permissions for user ‘testuser1',action: get, tableName:ns3:t1, family:C1.
For usage try 'help "get"'
Took 0.0233 seconds          
hbase:005:0> scan 'ns3:t1'
ROW                                         COLUMN+CELL                     
org.apache.hadoop.hbase.security.AccessDeniedException: org.apache.hadoop.hbase.security.AccessDeniedException: Insufficient permissions for user ‘testuser1',action: scannerOpen, tableName:ns3:t1, family:C1.
        at org.apache.ranger.authorization.hbase.RangerAuthorizationCoprocessor.authorizeAccess(RangerAuthorizationCoprocessor.java:562)
        at org.apache.ranger.authorization.hbase.RangerAuthorizationCoprocessor.preScannerOpen(RangerAuthorizationCoprocessor.java:1008)
        at org.apache.ranger.authorization.hbase.RangerAuthorizationCoprocessor.preScannerOpen(RangerAuthorizationCoprocessor.java:709)
        at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$40.call(RegionCoprocessorHost.java:1231)
        at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$40.call(RegionCoprocessorHost.java:1228)
        at org.apache.hadoop.hbase.coprocessor.CoprocessorHost$ObserverOperationWithoutResult.callObserver(CoprocessorHost.java:558)
        at org.apache.hadoop.hbase.coprocessor.Coproce
VPS购买请点击我

文章版权声明:除非注明,否则均为主机测评原创文章,转载或复制请以超链接形式并注明出处。

目录[+]