Community Articles

Find and share helpful community-sourced technical articles.
Labels (2)
avatar

DESCRIPTION:

CREATE  TABLE  EXAMPLE_REPORT1    
> (    
> key  string,    
> claim_type_code string,    
> yearservice string,    
> monthservice string    
> )    
> STORED BY  "org.apache.hadoop.hive.hbase.HBaseStorageHandler"    
> WITH SERDEPROPERTIES("hbase.columns.mapping" = ":key,claim_type_code:claim_type_code,    
> yearservice:yearservice,monthservice:monthservice")    
> TBLPROPERTIES("hbase.table.name"="EXAMPLE_REPORT1”);

Exception received was as follows:

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:326)        
at org.apache.hadoop.hbase.client.ClientScanner.nextScanner(ClientScanner.java:301)        
at org.apache.hadoop.hbase.client.ClientScanner.initializeScannerInConstruction(ClientScanner.java:166)        
at org.apache.hadoop.hbase.client.ClientScanner.<init>(ClientScanner.java:161)        
at org.apache.hadoop.hbase.client.HTable.getScanner(HTable.java:794)        
at org.apache.hadoop.hbase.MetaTableAccessor.fullScan(MetaTableAccessor.java:602)      
[...]        
at org.apache.hadoop.util.RunJar.run(RunJar.java:233)        
at org.apache.hadoop.util.RunJar.main(RunJar.java:148)
Caused by: java.lang.NullPointerException        
at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.getMetaReplicaNodes(ZooKeeperWatcher.java:395)        
at org.apache.hadoop.hbase.zookeeper.MetaTableLocator.blockUntilAvailable(MetaTableLocator.java:562)

at org.apache.hadoop.hbase.client.ZooKeeperRegistry.getMetaRegionLocation(ZooKeeperRegistry.java:61)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateMeta(ConnectionManager.java:1192)

ROOT CAUSE:

Hive attempted to contact Zookeeper to get Meta location but could not retrieve required info. This is a known issue described in HBASE-16732

WORKAROUND

In this instance of issue, restarting zookeeper fixed the issue as it reinitialized hbase znodes and Hive was able to get the required info.

2,379 Views
0 Kudos