在 C* 端过滤——将 filter/where 范围查询从 Spark 下推到 C*

Filter on the C* side - push down filter/where range queries to C* from Spark

我在 spark 1.2.1 上工作,datastax/spark-cassandra-connector 和 C* table 填充了 1B+ 行(datastax-enterprise dse 4.7.0)。我需要对时间戳参数执行范围 filter/where 查询。

最好的方法是什么而不加载整个 1B+ 行 table 来激发内存(可能需要几个小时才能完成)并且实际上将查询推回 C*?

将 rdd 与 JoinWithCassandraTable 一起使用或将数据框与下推一起使用? 还有别的吗?

JoinWithCassandraTable 变成了我的最佳解决方案。我从中学到了很多东西post:http://www.datastax.com/dev/blog/zen-art-spark-maintenance and post an answer to the linked question:

这一切都是关于以正确的方式构建您的 C* table(选择好的分区键尤为重要)以供您将来查询。