1

我想在我的Apache Spark 1.4.1和卡夫卡0.9.0.0之間啓用SSL,我正在使用spark-streaming-kafka_2.10 Jar連接到卡夫卡,並且我正在使用KafkaUtils.createDirectStream方法讀取數據來自卡夫卡的話題。最初,我得到了OOM問題,我通過增加驅動程序內存來​​解決它,之後我看到下面的問題,我已經做了一點閱讀,發現spark-streaming-kafka_2.10 使用Kafka 0.8.2.1 API,它不支持SSL(Kafka僅在0.9.0.0版本後才支持SSL)。有沒有其他的方法可以在Spark 1.4.1和Kafka 0.9.0.0之間啓用SSL,那麼有人可以在這個PLS上拋出一些簡介嗎? 這裏有幾個鏈接我已經提到啓用Apache火花和卡夫卡經紀人之間的SSL

http://grokbase.com/p/kafka/users/158wy0wtxk/ssl-between-kafka-and-spark-streaming-api

SSL between Kafka and Spark

http://spark.apache.org/docs/latest/streaming-kafka-integration.html

https://issues.apache.org/jira/browse/SPARK-15089

++++++++++++++++++ +++++++++++++++ 這裏是日誌

iableProperties: Property security.protocol is not valid 
16/10/24 18:25:09 WARN utils.VerifiableProperties: Property ssl.truststore.location is not valid 
16/10/24 18:25:09 WARN utils.VerifiableProperties: Property ssl.truststore.password is not valid 
16/10/24 18:25:09 INFO utils.VerifiableProperties: Property zookeeper.connect is overridden to 
16/10/24 18:25:09 INFO consumer.SimpleConsumer: Reconnect due to error 

異常在線程 「主」 org.apache.spark.SparkException:java.io.EOFException的

org.apache.kafka.common.network.NetworkReceive.readFromReadableChannel(NetworkReceive.java:99 )

回答

2

支持Kafka 0.10(支持SSL)已添加到Spark 2.0中。我們必須使用maven artifact spark-streaming-kafka-0-10_2.10。