morningman commented on a change in pull request #333: Add distributor which 
allocate task to be fairly
URL: https://github.com/apache/incubator-doris/pull/333#discussion_r235337342
 
 

 ##########
 File path: 
fe/src/main/java/org/apache/doris/load/routineload/KafkaRoutineLoadJob.java
 ##########
 @@ -59,21 +59,23 @@ public KafkaRoutineLoadJob(long id, String name, String 
userName, long dbId, lon
         this.topic = topic;
     }
 
+    public KafkaProgress getProgress() {
+        Gson gson = new Gson();
+        return gson.fromJson(this.progress, KafkaProgress.class);
+    }
+
     @Override
-    public List<RoutineLoadTask> divideRoutineLoadJob(int 
currentConcurrentTaskNum) {
+    public List<RoutineLoadTaskInfo> divideRoutineLoadJob(int 
currentConcurrentTaskNum) {
         // divide kafkaPartitions into tasks
-        List<KafkaRoutineLoadTask> kafkaRoutineLoadTaskList = new 
ArrayList<>();
+        List<RoutineLoadTaskInfo> kafkaRoutineLoadTaskList = new ArrayList<>();
         for (int i = 0; i < currentConcurrentTaskNum; i++) {
-            // TODO(ml): init load task
-            kafkaRoutineLoadTaskList.add(new 
KafkaRoutineLoadTask(getResourceInfo(), 0L, TTaskType.PUSH,
-                    dbId, tableId, 0L, 0L, 0L, SystemIdGenerator.getNextId()));
+            kafkaRoutineLoadTaskList.add(new 
KafkaTaskInfo(SystemIdGenerator.getNextId()));
 
 Review comment:
   SystemIdGenerator will produce repetitive id if Frontend restart or Master 
FE changed.
   Just use a UUID or random Long is better, if you don't want to persist this 
info.

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