zabetak commented on code in PR #4430:
URL: https://github.com/apache/hive/pull/4430#discussion_r1238647550
##########
kafka-handler/src/java/org/apache/hadoop/hive/kafka/KafkaDagCredentialSupplier.java:
##########
@@ -91,17 +89,13 @@ public Text getTokenAlias() {
*/
private boolean isTokenRequired(TableDesc tableDesc) {
String kafkaBrokers = (String)
tableDesc.getProperties().get(HIVE_KAFKA_BOOTSTRAP_SERVERS.getName());
- String consumerSecurityProtocol = (String) tableDesc.getProperties().get(
- CONSUMER_CONFIGURATION_PREFIX + "." +
CommonClientConfigs.SECURITY_PROTOCOL_CONFIG);
- String producerSecurityProtocol = (String) tableDesc.getProperties().get(
- PRODUCER_CONFIGURATION_PREFIX + "." +
CommonClientConfigs.SECURITY_PROTOCOL_CONFIG);
- return kafkaBrokers != null && !kafkaBrokers.isEmpty()
- &&
!CommonClientConfigs.DEFAULT_SECURITY_PROTOCOL.equalsIgnoreCase(consumerSecurityProtocol)
- &&
!CommonClientConfigs.DEFAULT_SECURITY_PROTOCOL.equalsIgnoreCase(producerSecurityProtocol);
+ SecurityProtocol protocol =
KafkaUtils.securityProtocol(tableDesc.getProperties());
+ return kafkaBrokers != null && !kafkaBrokers.isEmpty() &&
SecurityProtocol.PLAINTEXT != protocol;
}
private Token<?> getKafkaDelegationTokenForBrokers(Configuration conf,
TableDesc tableDesc) {
- String kafkaBrokers = (String)
tableDesc.getProperties().get(HIVE_KAFKA_BOOTSTRAP_SERVERS.getName());
+ Properties tableProperties = tableDesc.getProperties();
+ String kafkaBrokers = (String)
tableProperties.get(HIVE_KAFKA_BOOTSTRAP_SERVERS.getName());
Review Comment:
Fixed in
https://github.com/apache/hive/pull/4430/commits/45dae3d856028593bab73a0b1810952309450758
--
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]