【问题标题】:Spark-cassandra join: Pool is busy no available connection and the queue has reached its max size 256Spark-cassandra 加入:池忙,没有可用连接,队列已达到最大大小 256
【发布时间】: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


【解决方案1】:

在你的 spark conf 中调整这个参数。

spark.cassandra.input.reads_per_sec

https://github.com/datastax/spark-cassandra-connector/blob/master/doc/reference.md#read-tuning-parameters

【讨论】:

  • 这不能解决问题。默认情况下,此配置已设置为非常高。根据 datastax 社区,2.0.6 中有一个修复程序解决了这个问题
  • 可以在这里添加bug链接吗?
猜你喜欢
  • 1970-01-01
  • 2016-12-23
  • 1970-01-01
  • 1970-01-01
  • 2020-03-09
  • 2016-12-22
  • 1970-01-01
  • 1970-01-01
  • 2019-03-23
相关资源
最近更新 更多