Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Issue: Create HBASE table on Hive

SOLVED Go to solution

Issue: Create HBASE table on Hive

Contributor

Hi there.

 

The following statement fails to create HBASE table on hive:

CREATE TABLE passwd_hbase(userid STRING, uid INT, shell STRING)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ('hbase.columns.mapping' = ':key,passwd:uid,passwd:shell');

 

Error:

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:java.lang.RuntimeException: java.lang.NullPointerException
    at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:208)
    at org.apache.hadoop.hbase.client.ClientScanner.call(ClientScanner.java:320)

 

Any idea ?

 

Thx

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: x sRe: Issue: Create HBASE table on Hive

Contributor

In fact the issue was  that hbase was not installed.

4 REPLIES 4

x sRe: Issue: Create HBASE table on Hive

Contributor

Hi,

 

Your syntax seems to be incomplete. Where do you detail which HBase table your Hive table should be map to? Usually this is done using the TBLPROPERTIES field...

 

JMS

Re: x sRe: Issue: Create HBASE table on Hive

Contributor

Still failing using :

 

CREATE TABLE passwd_hbase(userid STRING, uid INT, shell STRING)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ('hbase.columns.mapping' = ':key,passwd:uid,passwd:shell')

TBLPROPERTIES("hbase.table.name" = "mytable");

Caused by: java.lang.NullPointerException
    at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.getMetaReplicaNodes(ZooKeeperWatcher.java:489)
    at org.apache.hadoop.hbase.zookeeper.MetaTableLocator.blockUntilAvailable(MetaTableLocator.java:549)
    at org.apache.hadoop.hbase.client.ZooKeeperRegistry.getMetaRegionLocation(ZooKeeperRegistry.java:61)

 

 

when executing list command in hbase it throws:

ERROR: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master.

 

Re: x sRe: Issue: Create HBASE table on Hive

Super Collaborator

Does HBase works ?

Because with what you said (ERROR: The node /hbase is not in ZooKeeper.) I have the feeling that your HBase cluster is not working properly.

 

You should fix that first.

 

 

Highlighted

Re: x sRe: Issue: Create HBASE table on Hive

Contributor

In fact the issue was  that hbase was not installed.