1
votes

Currently I am using Cassandra 2.1.5, Hive 1.2.1 and Hadoop 2.7.1. I try to connect Cassandra into Hive using this tutorial :

http://frommyworkshop.blogspot.com/2013/09/real-time-data-processing-with.html

But it seems I got stuck in create external table:

CREATE EXTERNAL TABLE test.pokes(foo int, bar string) STORED BY 'org.apache.hadoop.hive.cassandra.CassandraStorageHandler' WITH SERDEPROPERTIES ("cassandra.host" = "127.0.0.1" , "cassandra.port" = "9160", "cql.primarykey" = "foo", "comment"="check", "read_repair_chance" = "0.2", "dclocal_read_repair_chance" = "0.14", "gc_grace_seconds" = "989898", "bloom_filter_fp_chance" = "0.2", "compaction" = "{'class' : 'LeveledCompactionStrategy'}", "replicate_on_write" = "false", "caching" = "all");

with error like this:

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe.initSerdeParams(Lorg/apache/hadoop/conf/Configuration;Ljava/util/Properties;Ljava/lang/String;)Lorg/apache/hadoop/hive/serde2/lazy/LazySimpleSerDe$SerDeParameters;

Does anyone know how to fix this?

2
Did you find the problem ?Claudio

2 Answers

2
votes

Fixing this hive-cassandra store handler issue could be tedious.

The error log that you spot on the shell might not be helpful always.

Please refer the hive log file , which is mostly located in /tmp/<user-id>/hive.log , to get the actual detailed error message regarding the failure.

Mostly the reasons could be because of wrong cassandra hostname/port, keyspace, key conf, etc.

Hope this helps.

0
votes

Info from the 2013 blog about Hive and Cassandra is out-of-date. For example, the 'org.apache.hadoop.hive.cassandra.CassandraStorageHandler' was replaced by 'org.apache.hadoop.hive.cassandra.cql3.CqlStorageHandler' a while ago. I think you need to configure BYOH using DSE.