【发布时间】:2018-03-31 09:34:15
【问题描述】:
我正在尝试使用 joinWithCassandraTable 函数加入数据框。 在 non-prod 中的小数据集一切正常,当我们进入 prod 时,由于大量数据和与 cassandra 的其他连接,它抛出了如下异常。
ERROR [org.apache.spark.executor.Executor] [Executor task launch worker for task 498] - Exception in task 4.0 in stage 8.0 (TID 498)
java.util.concurrent.ExecutionException: com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /<host1>:9042
(com.datastax.driver.core.exceptions.BusyPoolException: [/<host3>] Pool is busy (no available connection and the queue has reached its max size 256)), Pool is busy (no available connection and the queue has reached its max size 256)),
我们在 cassandra 连接器 1.6 中有相同的代码,它工作得非常好。但是,当我们将 spark 升级到 2.1.1 并将 spark cassandra connector 升级到 2.0.1 时,出现了这些问题。
如果您遇到类似的问题以及可能的解决方案,请告诉我。
我们使用的代码:
ourDF.select("joincolumn")
.rdd
.map(row => Tuple1(row.getString(0)))
.joinWithCassandraTable("key_space", "table", AllColumns, SomeColumns("<join_column_from_cassandra>"))
Spark 版本:2.1.1 Cassandra 连接器版本:2.0.1
问候, 斯里尼
【问题讨论】:
-
问题解决了吗?
标签: apache-spark cassandra spark-cassandra-connector