morningman commented on a change in pull request #1235: Support SSL 
authentication with Kafka in routine load job
URL: https://github.com/apache/incubator-doris/pull/1235#discussion_r291176142
 
 

 ##########
 File path: 
fe/src/main/java/org/apache/doris/load/routineload/KafkaRoutineLoadJob.java
 ##########
 @@ -276,17 +301,9 @@ protected String getStatistic() {
         return gson.toJson(summary);
     }
 
-    private List<Integer> getAllKafkaPartitions() throws LoadException {
-        List<Integer> result = new ArrayList<>();
-        try {
-            List<PartitionInfo> partitionList = consumer.partitionsFor(topic);
-            for (PartitionInfo partitionInfo : partitionList) {
-                result.add(partitionInfo.partition());
-            }
-        } catch (Exception e) {
-            throw new LoadException("failed to get partitions for topic: " + 
topic + ". " + e.getMessage());
-        }
-        return result;
+    private List<Integer> getAllKafkaPartitions() throws UserException {
+        convertCustomProperties();
+        return KafkaUtil.getAllKafkaPartitions(brokerList, topic, 
convertedCustomProperties);
 
 Review comment:
   Of cause, you remind me that convertedCustomProperties should be re-created 
when routine load job transfer from PAUSE to NEED_SCHEDULE, because some files 
may be re-created anytime.

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