2017-10-19 113 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

回答

相關問題