HBase SQL statement fails with Insufficient permissions for user


Below error comes up when creating new hbase table

hbase(main):001:0> create ‘anoop’,’cf1′
ERROR: org.apache.hadoop.hbase.security.AccessDeniedException: org.apache.hadoop.hbase.security.AccessDeniedException: Insufficient permissions for user ‘anoop’ (global, action=CREATE)
at org.apache.hadoop.hbase.security.access.AccessController.requirePermission(AccessController.java:426)
at org.apache.hadoop.hbase.security.access.AccessController.preCreateTable(AccessController.java:563)

– Once the cluster has been secured, a user has to authenticate itself to kerberos by doing a kinit. By default, hbase is a superuser who was full access and can be used to grant privileges to other users. Since, you have already secured the cluster, use hbase keytab file to perform a kinit.

Switch to hbase user and do a kinit with hbase service kyetab

kinit -kt /var/run/cloudera-scm-agent/process/2076-hbase-MASTER/hbase.keytab hbase/host1.domain.com@domain.com

# sudo -u hbase hbase shell

hbase(main):001:0> grant ‘anoop’,’RWCA’


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s