gaborgsomogyi commented on a change in pull request #25412: [SPARK-28691][EXAMPLES] DirectKafkaWordCount support kafka with kerberos URL: https://github.com/apache/spark/pull/25412#discussion_r312956190
########## File path: examples/src/main/java/org/apache/spark/examples/streaming/JavaDirectKafkaWordCount.java ########## @@ -77,6 +93,9 @@ public static void main(String[] args) throws Exception { kafkaParams.put(ConsumerConfig.GROUP_ID_CONFIG, groupId); kafkaParams.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class); kafkaParams.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class); + if (kerberosOn){ + kafkaParams.put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, "SASL_PLAINTEXT"); Review comment: Would be better to use the Kafka constant. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org