diff --git a/sharding-scaling-bootstrap/src/main/java/info/avalon566/shardingscaling/Bootstrap.java b/sharding-scaling-bootstrap/src/main/java/info/avalon566/shardingscaling/Bootstrap.java index b6d7ad0ad82d7..6747e4e0eaabc 100755 --- a/sharding-scaling-bootstrap/src/main/java/info/avalon566/shardingscaling/Bootstrap.java +++ b/sharding-scaling-bootstrap/src/main/java/info/avalon566/shardingscaling/Bootstrap.java @@ -26,7 +26,7 @@ import info.avalon566.shardingscaling.core.config.ScalingContext; import info.avalon566.shardingscaling.core.config.SyncConfiguration; import info.avalon566.shardingscaling.core.config.SyncType; -import info.avalon566.shardingscaling.core.job.MigrateProgress; +import info.avalon566.shardingscaling.core.job.SyncTaskProgress; import info.avalon566.shardingscaling.core.job.ScalingJobController; import info.avalon566.shardingscaling.utils.RuntimeUtil; import lombok.extern.slf4j.Slf4j; @@ -74,7 +74,7 @@ public void run() { } catch (InterruptedException ex) { break; } - for (MigrateProgress progress : scalingJobController.getProgresses()) { + for (SyncTaskProgress progress : scalingJobController.getProgresses()) { if (null != progress.getLogPosition()) { log.info(progress.getLogPosition().toString()); } diff --git a/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/ScalingJobController.java b/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/ScalingJobController.java index 159e28fca188d..2ecb6794a7563 100644 --- a/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/ScalingJobController.java +++ b/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/ScalingJobController.java @@ -63,8 +63,8 @@ public void stop() { * * @return data nodes migrate progress */ - public List getProgresses() { - List result = new ArrayList<>(this.syncConfigurations.size()); + public List getProgresses() { + List result = new ArrayList<>(this.syncConfigurations.size()); for (SyncTaskController syncTaskController : syncTaskControllers) { result.add(syncTaskController.getProgress()); } diff --git a/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/SyncTaskController.java b/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/SyncTaskController.java index a51bea05625c4..85f95b59eb844 100644 --- a/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/SyncTaskController.java +++ b/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/SyncTaskController.java @@ -73,8 +73,8 @@ public void stop() { * * @return migrate progress */ - public MigrateProgress getProgress() { - List result = syncJobExecutor.getProgresses(); + public SyncTaskProgress getProgress() { + List result = syncJobExecutor.getProgresses(); // if history data sync job, only return first migrate progress. // if realtime data sync job, there only one migrate progress. return result.get(0); diff --git a/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/MigrateProgress.java b/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/SyncTaskProgress.java similarity index 97% rename from sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/MigrateProgress.java rename to sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/SyncTaskProgress.java index 93091a8b4d5d6..e16a01f3a91d5 100644 --- a/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/MigrateProgress.java +++ b/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/SyncTaskProgress.java @@ -28,7 +28,7 @@ */ @Getter @RequiredArgsConstructor -public class MigrateProgress { +public class SyncTaskProgress { private final String stage; diff --git a/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/sync/HistoryDataSyncTask.java b/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/sync/HistoryDataSyncTask.java index 76dc80ad4184e..44600a2bd81c5 100644 --- a/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/sync/HistoryDataSyncTask.java +++ b/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/sync/HistoryDataSyncTask.java @@ -18,7 +18,7 @@ package info.avalon566.shardingscaling.core.job.sync; import info.avalon566.shardingscaling.core.config.SyncConfiguration; -import info.avalon566.shardingscaling.core.job.MigrateProgress; +import info.avalon566.shardingscaling.core.job.SyncTaskProgress; import info.avalon566.shardingscaling.core.job.sync.executor.Event; import info.avalon566.shardingscaling.core.job.sync.executor.EventType; import info.avalon566.shardingscaling.core.job.sync.executor.Reporter; @@ -63,8 +63,8 @@ public final void stop() { } @Override - public final MigrateProgress getProgress() { - return new MigrateProgress("HISTORY_DATA_SYNC", new NopLogPosition()); + public final SyncTaskProgress getProgress() { + return new SyncTaskProgress("HISTORY_DATA_SYNC", new NopLogPosition()); } /** diff --git a/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/sync/RealtimeDataSyncTask.java b/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/sync/RealtimeDataSyncTask.java index 25e7226d54727..5c9029370a07a 100644 --- a/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/sync/RealtimeDataSyncTask.java +++ b/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/sync/RealtimeDataSyncTask.java @@ -19,7 +19,7 @@ import info.avalon566.shardingscaling.core.config.SyncConfiguration; import info.avalon566.shardingscaling.core.exception.SyncExecuteException; -import info.avalon566.shardingscaling.core.job.MigrateProgress; +import info.avalon566.shardingscaling.core.job.SyncTaskProgress; import info.avalon566.shardingscaling.core.job.sync.executor.Event; import info.avalon566.shardingscaling.core.job.sync.executor.EventType; import info.avalon566.shardingscaling.core.job.sync.executor.Reporter; @@ -73,8 +73,8 @@ public final void stop() { } @Override - public final MigrateProgress getProgress() { - return new MigrateProgress("REALTIME_DATA_SYNC", currentLogPosition); + public final SyncTaskProgress getProgress() { + return new SyncTaskProgress("REALTIME_DATA_SYNC", currentLogPosition); } /** diff --git a/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/sync/SyncTask.java b/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/sync/SyncTask.java index 4b455fd9fc6e7..7bda11026f7d3 100644 --- a/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/sync/SyncTask.java +++ b/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/sync/SyncTask.java @@ -17,7 +17,7 @@ package info.avalon566.shardingscaling.core.job.sync; -import info.avalon566.shardingscaling.core.job.MigrateProgress; +import info.avalon566.shardingscaling.core.job.SyncTaskProgress; /** * Sync task interface. @@ -41,5 +41,5 @@ public interface SyncTask extends Runnable { * * @return migrate progress */ - MigrateProgress getProgress(); + SyncTaskProgress getProgress(); } diff --git a/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/sync/executor/SyncJobExecutor.java b/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/sync/executor/SyncJobExecutor.java index 8579e6f704d4a..40e78bc261da5 100644 --- a/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/sync/executor/SyncJobExecutor.java +++ b/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/sync/executor/SyncJobExecutor.java @@ -18,7 +18,7 @@ package info.avalon566.shardingscaling.core.job.sync.executor; import info.avalon566.shardingscaling.core.config.SyncConfiguration; -import info.avalon566.shardingscaling.core.job.MigrateProgress; +import info.avalon566.shardingscaling.core.job.SyncTaskProgress; import java.util.List; @@ -46,5 +46,5 @@ public interface SyncJobExecutor { * * @return list of migrate progresses */ - List getProgresses(); + List getProgresses(); } diff --git a/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/sync/executor/local/LocalSyncJobExecutor.java b/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/sync/executor/local/LocalSyncJobExecutor.java index b118238de0fa6..475d906175470 100644 --- a/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/sync/executor/local/LocalSyncJobExecutor.java +++ b/sharding-scaling-core/src/main/java/info/avalon566/shardingscaling/core/job/sync/executor/local/LocalSyncJobExecutor.java @@ -18,7 +18,7 @@ package info.avalon566.shardingscaling.core.job.sync.executor.local; import info.avalon566.shardingscaling.core.config.SyncConfiguration; -import info.avalon566.shardingscaling.core.job.MigrateProgress; +import info.avalon566.shardingscaling.core.job.SyncTaskProgress; import info.avalon566.shardingscaling.core.job.sync.SyncTask; import info.avalon566.shardingscaling.core.job.sync.executor.Reporter; import info.avalon566.shardingscaling.core.job.sync.executor.SyncJobExecutor; @@ -56,8 +56,8 @@ public final void stop() { } @Override - public final List getProgresses() { - List result = new ArrayList<>(); + public final List getProgresses() { + List result = new ArrayList<>(); for (SyncTask syncTask : syncTasks) { result.add(syncTask.getProgress()); }