zabetak commented on code in PR #4430:
URL: https://github.com/apache/hive/pull/4430#discussion_r1238628158
##########
kafka-handler/src/java/org/apache/hadoop/hive/kafka/KafkaDagCredentialSupplier.java:
##########
@@ -114,7 +108,12 @@ private Token<?>
getKafkaDelegationTokenForBrokers(Configuration conf, TableDesc
Properties config = new Properties();
config.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, kafkaBrokers);
- config.put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG,
SecurityProtocol.SASL_PLAINTEXT.name);
+ SecurityProtocol protocol = KafkaUtils.securityProtocol(tableProperties);
+ if (protocol == null) {
+ protocol = SecurityProtocol.SASL_PLAINTEXT;
+ LOG.warn("Kafka security.protocol is undefined in table properties.
Using default {}", protocol.name);
Review Comment:
I didn't want to put `SASL_PLAINTEXT` as a general default cause it doesn't
make much sense and I didn't want to change the behavior of this part of the
code to default to `PLAINTEXT` either.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]