You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2020/09/03 15:00:17 UTC

[GitHub] [hive] ashutoshc commented on a change in pull request #1379: HIVE-23408: Hive on Tez : Kafka storage handler broken in secure envi…

ashutoshc commented on a change in pull request #1379:
URL: https://github.com/apache/hive/pull/1379#discussion_r483044949



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java
##########
@@ -265,11 +279,70 @@ public URI apply(Path path) {
         }
         dag.addURIsForCredentials(uris);
       }
+      getKafkaCredentials((MapWork)work, dag, conf);
     }
-
     getCredentialsForFileSinks(work, dag);
   }
 
+  private void getKafkaCredentials(MapWork work, DAG dag, JobConf conf) {
+    Token<?> tokenCheck = dag.getCredentials().getToken(KAFKA_DELEGATION_TOKEN_KEY);
+    if (tokenCheck != null) {
+      LOG.debug("Kafka credentials already added, skipping...");
+      return;
+    }
+    LOG.info("Getting kafka credentials for mapwork: " + work.getName());
+
+    String kafkaBrokers = null;
+    Map<String, PartitionDesc> partitions = work.getAliasToPartnInfo();

Review comment:
       This is iterating over all partition objects in plan even when kafka is not used. This gets expensive when there are large number of partition objects. Is it possible to do a quick check to see if kafka is used before iterating over full list of parttions?

##########
File path: pom.xml
##########
@@ -169,6 +169,7 @@
     <junit.version>4.13</junit.version>
     <junit.jupiter.version>5.6.2</junit.jupiter.version>
     <junit.vintage.version>5.6.2</junit.vintage.version>
+    <kafka.version>2.5.0</kafka.version>

Review comment:
       Kafka version is also declared specifically in kafka-handler/pom.xml Can we parmeterize there, so that all of Hive is referencing just one kafka version?




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org