1

I have created a hive external table to access hbase table by following this HBase-Hive Integration answer.

Below is my hive query to create the external table:

CREATE EXTERNAL TABLE hive_tweets_by_message_words_key(key INT,d STRING) 
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' 
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,d:d") 
TBLPROPERTIES("hbase.table.name" = "tweets_by_message_words_key");

But when I access the table with a select query, it returns nothing and I found in job log as below mentioned in azure hdinsight

Logging initialized using configuration in file:/C:/apps/dist/hive-0.13.0.2.1.15.1-1234/conf/hive-log4j.properties
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/apps/dist/hadoop-2.4.0.2.1.15.1-1234/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/apps/dist/hbase-0.98.0.2.1.15.1-1234-hadoop2/lib/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
OK
Time taken: 2.032 seconds
Community
  • 1
  • 1
Mukesh
  • 410
  • 5
  • 12

2 Answers2

0

Multiple SLF4J bindings are explained on the SLF4J site. However, the logging you see does not explain why the query fails to return results, because:

The warning emitted by SLF4J is just that, a warning. Even when multiple bindings are present, SLF4J will pick one logging framework/implementation and bind with it.

0

SLF4J is not a problem here. Since HIVE and Hadoop both have slf4j jars but with different version. This causes the warning message, but HIVE will pick one of them finally.

From the last two lines,

OK

Time taken: 2.032 seconds

This means your table is created successfully. Could you paste your select query? You can also check HBase by HBase shell to see if there is a table called "tweets_by_message_words_key" there.

onpduo
  • 21
  • 4