I have met some issues while trying to consume messages from Kafka with a Spark Streaming application in a Kerberized Hadoop cluster. I tried both of the two approaches list
It is not supported with Spark 1.6, as stated in Cloudera docs:
Spark Streaming cannot consume from secure Kafka till it starts using Kafka 0.9 Consumer API
https://www.cloudera.com/documentation/enterprise/release-notes/topics/cdh_rn_spark_ki.html#ki_spark_streaming_consumer_api
Spark-streaming in 1.6 uses old consumer API, where secure consuming is not supported.
You can use Spark 2.1, which supports secure Kafka: https://blog.cloudera.com/blog/2017/05/reading-data-securely-from-apache-kafka-to-apache-spark/