sandynz commented on code in PR #19875:
URL: https://github.com/apache/shardingsphere/pull/19875#discussion_r938386899


##########
shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/main/java/org/apache/shardingsphere/data/pipeline/core/job/progress/yaml/YamlIncrementalTaskProgress.java:
##########
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.data.pipeline.core.job.progress.yaml;
+
+import java.util.Map;
+import lombok.Getter;
+import lombok.Setter;
+import 
org.apache.shardingsphere.data.pipeline.api.task.progress.IncrementalTaskDelay;
+
+/**
+ * Yaml IncrementalTaskProgress.
+ */
+@Getter
+@Setter
+public final class YamlIncrementalTaskProgress {
+    
+    private Map<String, YamlIncrementalTaskProgressItem> dataSources;
+    
+    @Getter
+    @Setter
+    public static final class YamlIncrementalTaskProgressItem {
+        
+        private String position;
+        
+        private IncrementalTaskDelay delay;
+    }
+}

Review Comment:
   Could we simplify `YamlIncrementalTaskProgress`?
   `Map<String, YamlIncrementalTaskProgressItem>` just includes 1 key value 
pair. We could add `dataSourceName` and remove 
`YamlIncrementalTaskProgressItem`.
   
   In fact, `JobProgress` doesn't represent whole job's progress, it represent 
sharding item's progress, one job might have several sharding items (sharding 
item is concept of ElasticJob).
   Related code:
   ```
   GovernanceRepositoryAPI.java
       JobProgress getJobProgress(String jobId, int shardingItem);
   
   RuleAlteredJobAPI.java
       Map<Integer, JobProgress> getProgress(RuleAlteredJobConfiguration 
jobConfig);
   ```
   



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

Reply via email to