morningman commented on a change in pull request #665: Change routine load task 
sheduler interval to 0
URL: https://github.com/apache/incubator-doris/pull/665#discussion_r260564537
 
 

 ##########
 File path: 
fe/src/main/java/org/apache/doris/load/routineload/KafkaRoutineLoadJob.java
 ##########
 @@ -206,24 +235,33 @@ public static KafkaRoutineLoadJob 
fromCreateStmt(CreateRoutineLoadStmt stmt) thr
         return kafkaRoutineLoadJob;
     }
 
-    private void updatePartitions() {
-        // fetch all of kafkaPartitions in topic
-        if (kafkaPartitions == null || kafkaPartitions.size() == 0) {
-            kafkaPartitions = new ArrayList<>();
-            Properties props = new Properties();
-            props.put("bootstrap.servers", this.serverAddress);
-            props.put("group.id", FE_GROUP_ID);
-            props.put("key.deserializer", 
"org.apache.kafka.common.serialization.StringDeserializer");
-            props.put("value.deserializer", 
"org.apache.kafka.common.serialization.StringDeserializer");
-            KafkaConsumer<String, String> consumer = new 
KafkaConsumer<>(props);
-            List<PartitionInfo> partitionList = consumer.partitionsFor(
-                    topic, Duration.ofSeconds(FETCH_PARTITIONS_TIMEOUT));
-            for (PartitionInfo partitionInfo : partitionList) {
-                kafkaPartitions.add(partitionInfo.partition());
+    // current kafka partitions = customKafkaPartitions == 0 ? all of 
partition of kafka topic : customKafkaPartitions
+    private void updateCurrentKafkaPartitions() {
+        if (customKafkaPartitions == null || customKafkaPartitions.size() == 
0) {
+            LOG.debug("All of partitions which belong to topic will be load 
for {} routine load job", name);
 
 Review comment:
   be load -> be loaded

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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