Error in loading storage handler.org.apache.hadoop.hive.cassandra.CassandraStorageHandler

时间:2016-04-15 15:04:57

标签: cassandra hive load

Below is the create DDL. With this I get error. Any idea what is wrong? The full error log is as;

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.cassandra.CassandraStorageHandler

        CREATE EXTERNAL TABLE mktg_contact_general_info_comp_hive_incr 
        (
        person_party_id string,
        org_party_id            string, 
        last_transaction_dt     string,
        last_source_system      string,
        introduction_source_system     string,
        introduction_date       string,
        name_prefix             string)
        STORED BY 'org.apache.hadoop.hive.cassandra.CassandraStorageHandler'
        WITH SERDEPROPERTIES("cassandra.columns.mapping" = ":person_party_id,:org_party_id,:last_transaction_dt,:last_source_system,:introduction_source_system,:introduction_date,:name_prefix", "cassandra.ks.name" = "mkds_cmc",
        "cassandra.host"="127.0.0.1","cassandra.port" = "9061",
        "cassandra.username" = "username" , 
        "cassandra.password" = "password","cassandra.cf.name" = "mkds_cmc_cf");
        TBLPROPERTIES ("cassandra.ks.name" = "mkds_cmc");

1 个答案:

答案 0 :(得分:1)

错误清除说,它无法在运行时环境中找到类。

org.apache.hadoop.hive.cassandra.CassandraStorageHandler

而是尝试用

替换表创建查询中的那个
org.apache.hadoop.hive.cassandra.cql.CqlStorageHandler

如果那也失败了,那么你只是缺少hive-cassandra jar