2017-10-19 109 views
0

我试图使用joinWithCassandraTable函数来加入数据帧。 随着非prod中的小数据集一切正常,当我们去刺激,由于大量的数据和其他连接到cassandra,它已抛出异常如下。Spark-cassandra加入:池正在忙没有可用的连接,并且队列已达到其最大大小256

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)), 

我们在卡桑德拉连接器1.6相同的代码工作绝对没问题。但是,当我们将spark升级到2.1.1并将cassandra连接器激活为2.0.1时,它已经提出了这些问题。

请让我知道,如果你面临类似的问题,可能是什么决议。我们使用

代码:

ourDF.select("joincolumn") 
     .rdd 
     .map(row => Tuple1(row.getString(0))) 
     .joinWithCassandraTable("key_space", "table", AllColumns, SomeColumns("<join_column_from_cassandra>")) 

星火版本:2.1.1 卡桑德拉连接器版本:2.0.1

问候, 作者Srini

回答

相关问题