use of com.ctrip.xpipe.redis.console.migration.model.impl.DefaultMigrationShard in project x-pipe by ctripcorp.
the class SingleShardMigrationTest method prepare.
@Before
public void prepare() {
MockitoAnnotations.initMocks(this);
MigrationClusterTbl migrationClusterTbl = migrationService.findMigrationCluster(1L, 1L);
migrationCluster = new DefaultMigrationCluster(executors, scheduled, migrationEvent, migrationClusterTbl, dcService, clusterService, shardService, redisService, migrationService);
Map<Long, DcTbl> dcs = new HashMap<>();
for (DcTbl dc : dcService.findClusterRelatedDc("cluster1")) {
dcs.put(dc.getId(), dc);
}
migrationShard = new DefaultMigrationShard(migrationCluster, migrationService.findMigrationShards(1).get(0), shardService.find(1), dcs, migrationService, migrationCommandBuilder);
migrationCluster.addNewMigrationShard(migrationShard);
}
Aggregations