Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
avalon566 committed Nov 8, 2019
1 parent 230bf95 commit 9d175f4
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ public void stop() {
*
* @return data nodes migrate progress
*/
public List<MigrateProgress> getProgresses() {
List<MigrateProgress> result = new ArrayList<>(this.syncConfigurations.size());
public List<SyncTaskProgress> getProgresses() {
List<SyncTaskProgress> result = new ArrayList<>(this.syncConfigurations.size());
for (SyncTaskController syncTaskController : syncTaskControllers) {
result.add(syncTaskController.getProgress());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ public void stop() {
*
* @return migrate progress
*/
public MigrateProgress getProgress() {
List<MigrateProgress> result = syncJobExecutor.getProgresses();
public SyncTaskProgress getProgress() {
List<SyncTaskProgress> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*/
@Getter
@RequiredArgsConstructor
public class MigrateProgress {
public class SyncTaskProgress {

private final String stage;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -41,5 +41,5 @@ public interface SyncTask extends Runnable {
*
* @return migrate progress
*/
MigrateProgress getProgress();
SyncTaskProgress getProgress();
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -46,5 +46,5 @@ public interface SyncJobExecutor {
*
* @return list of migrate progresses
*/
List<MigrateProgress> getProgresses();
List<SyncTaskProgress> getProgresses();
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -56,8 +56,8 @@ public final void stop() {
}

@Override
public final List<MigrateProgress> getProgresses() {
List<MigrateProgress> result = new ArrayList<>();
public final List<SyncTaskProgress> getProgresses() {
List<SyncTaskProgress> result = new ArrayList<>();
for (SyncTask syncTask : syncTasks) {
result.add(syncTask.getProgress());
}
Expand Down

0 comments on commit 9d175f4

Please sign in to comment.