Quantcast
Channel: Hortonworks » All Replies
Viewing all articles
Browse latest Browse all 3435

Unable to create Hbase table using Hive query through Spark

$
0
0

Using the following tutorial, I was able to do the HBase integration with Hive. After the configuration I was successfully able to create Hbase table using Hive query with Hive table mapping.

Hive query:


CREATE TABLE upc_hbt(key string, value string) 
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,value:value")
TBLPROPERTIES ("hbase.table.name" = "upc_hbt");

Spark-Scala:


val createTableHql : String = s"CREATE TABLE upc_hbt2(key string, value string)"+
      "STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'"+
      "WITH SERDEPROPERTIES ('hbase.columns.mapping' = ':key,value:value')"+
      "TBLPROPERTIES ('hbase.table.name' = 'upc_hbt2')"

    hc.sql(createTableHql)

But when I execute the same Hive query through Spark it throws the following error:


Exception in thread "main" org.apache.spark.sql.execution.QueryExecutionException: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. org.apache.hadoop.hive.ql.metadata.HiveException: Error in loading storage handler.org.apache.hadoop.hive.hbase.HBaseStorageHandler

It’s seem like during the Hive execution through Spark it can’t find the auxpath jar location. Is there anyway to solve this problem?

Thank you very much in advance.


Viewing all articles
Browse latest Browse all 3435

Trending Articles