hddong 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_r312991618
 
 

 ##########
 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:
   Do you means `security.protocol` instead of 
    `CommonClientConfigs.SECURITY_PROTOCOL_CONFIG`?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to