How to create a HBase table on Kerberized Hadoop clusters

Published on 24 October 2019 in Version 4 - 2 minutes read - Last modified on 06 March 2021

Hi SQL Data Explorers,

If you are using HBase with Hue on CDH6.1.x or later, you may find Hue’s check configuration fails for HBase with following error:

Failed to authenticate to HBase Thrift Server, check authentication configurations.

With change from HBase(HBASE-19852), we have to configure HBase properly through Cloudera Manager with following steps to enable Hue-Hbase communication.

Step 1

Navigate to CM->Clusters->HBASE-1->Configurations, search for “thrift” and verify the “Enable HBase Thrift Http Server” and “Enable HBase Thrift Proxy Users” are checked, and “Enable HBase Thrift Server Compact Protocol” and “Enable HBase Thrift Server Framed Transport” are unchecked.

Step 2

On same page as step1, search for “proxy”, depends on your CM version, you can skip step 2b if you see following:

otherwise, follow step 2b

Step 2b

on same page, search for “core-site” and fill in as following to “HBase Service Advanced Configuration Snippet (Safety Valve) for core-site.xml”

hadoop.proxyuser.hbase.hosts: *
hadoop.proxyuser.hbase.groups: *

Step 3

If your cluster is kerberized cluster, find out your HBase thrift server and its HTTP kerberos principal and then config following parameters:

HBase Service Advanced Configuration Snippet (Safety Valve) for hbase-site.xml:

hbase.thrift.spnego.principal: HTTP/${YOUR_HBASE_THRIFT_SERVER_NAME}/${REALM}
hbase.thrift.spnego.keytab.file: hbase.keytab 

Step 3a

Find out HBase thrift server host: navigate to CM->Clusters->HBASE-1–>Instances and search for “thrift”

Step 3b

Find out Kerberos Principal for HTTP on HBase thrift host: navigate to CM->Adminsitration->Security->Kerberos Credentials and filter by ‘HTTP’

Step 3c

Configure Thrift server with the value you found at step 3a and 3b

Save Changes and deploy the staled configurations then restart HBase.

Now, navigate to Hue UI, https://${huehost}:8889/hue/about/#step1, the ‘Check Configurations’ for HBase should pass.

Now let’s navigate to “Examples” tab to try installing the HBase examples, it may fail with error:

IOError(_message='org.apache.hadoop.hbase.security.AccessDeniedException: org.apache.hadoop.hbase.security.AccessDeniedException: Insufficient permissions ..."

All you need to do is ssh to your hosts run following hbase shell command to grant the user:’testadmin’ with proper permission.

sudo -u hbase hbase shell

grant 'testadmin','RWC'

Yeah, now you are all set to create your HBase table on secure cluster.

 

Hope this helps. Any feedback or question? Feel free to comment here or on the Forum or @gethue and quick start SQL querying!

 

Weixia, from the Hue Team


comments powered by Disqus

More recent stories

03 May 2023
Discover the power of Apache Ozone using the Hue File Browser
Read More
23 January 2023
Hue 4.11 and its new dialects and features are out!
Read More