1、问题描述
使用hbase shell执行创建命名空间、创建表、插入数据、获取数据、查看数据、删除命名空间、删除表等命令操作,发现可以创建命名空间、创建表、删除命名空间、删除表,但是插入数据、获取数据、查看数据等操作却报没有权限的问题,但是我已在Ranger上赋予用户testuser1对该命名空间的所有权限了。文章来源:https://www.toymoban.com/news/detail-840225.html
报错内容如下:文章来源地址https://www.toymoban.com/news/detail-840225.html
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
到了这里,关于【报错-大数据技术-Hbase & Ranger】hbase创建、删除(表、命名空间)无权限问题,但是向表put、get、scan数据报错的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!