【问题标题】:Connecting Cassandra with Hive连接 Cassandra 和 Hive
【发布时间】:2015-11-18 17:29:01
【问题描述】:

目前我正在使用 Cassandra 2.1.5、Hive 1.2.1 和 Hadoop 2.7.1。我尝试使用本教程将 Cassandra 连接到 Hive:

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

但我似乎陷入了创建外部表:

创建外部表 test.pokes(foo int, bar string) 由 'org.apache.hadoop.hive.cassandra.CassandraStorageHandler' 使用 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");

出现这样的错误:

FAILED:执行错误,从 org.apache.hadoop.hive.ql.exec.DDLTask 返回代码 1。 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;

有谁知道如何解决这个问题?

【问题讨论】:

  • 你找到问题了吗?

标签: hadoop cassandra hive


【解决方案1】:

修复这个 hive-cassandra 存储处理程序问题可能很乏味。

您在 shell 上发现的错误日志可能并不总是有用。

请参阅主要位于 /tmp/<user-id>/hive.log 的 hive 日志文件,以获取有关失败的实际详细错误消息。

大部分原因可能是因为错误的 cassandra 主机名/端口、密钥空间、密钥配置等。

希望这会有所帮助。

【讨论】:

    【解决方案2】:

    2013 年博客中有关 Hive 和 Cassandra 的信息已过时。例如,'org.apache.hadoop.hive.cassandra.CassandraStorageHandler' 不久前被 'org.apache.hadoop.hive.cassandra.cql3.CqlStorageHandler' 取代。我认为您需要使用 DSE configure BYOH。

    【讨论】:

      猜你喜欢
      • 2014-08-19
      • 2015-03-18
      • 2014-09-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-12
      • 2021-05-27
      • 2016-09-05
      相关资源
      最近更新 更多