use of com.alibaba.otter.shared.common.model.config.data.db.DbDataMedia in project otter by alibaba.
the class DatabaseExtractorTest method getDataMediaPairForMysql.
private List<DataMediaPair> getDataMediaPairForMysql(long tableId, int count) {
List<DataMediaPair> pairs = new ArrayList<DataMediaPair>();
for (int i = 0; i < count; i++) {
DataMediaPair pair = new DataMediaPair();
pair.setId(Long.valueOf(i));
pair.setPullWeight(1L);
pair.setPushWeight(1L);
DbDataMedia mysqlMedia = getMysqlMedia();
mysqlMedia.setId(tableId + i);
pair.setSource(mysqlMedia);
DbDataMedia oracleMedia = getOracleMedia();
oracleMedia.setId(tableId + i + count);
pair.setTarget(oracleMedia);
pairs.add(pair);
}
return pairs;
}
use of com.alibaba.otter.shared.common.model.config.data.db.DbDataMedia in project otter by alibaba.
the class DbLoadActionTest method generatorDataMediaPairForMysql.
private List<DataMediaPair> generatorDataMediaPairForMysql(int count) {
List<DataMediaPair> pairs = new ArrayList<DataMediaPair>();
for (int i = 0; i < count; i++) {
DataMediaPair pair = new DataMediaPair();
int index = i + 1;
pair.setId(Long.valueOf(index));
pair.setPullWeight(count - Long.valueOf(index));
pair.setPushWeight(count - Long.valueOf(index));
DbDataMedia oracleMedia = getOracleMedia();
oracleMedia.setId(2L);
pair.setSource(oracleMedia);
DbDataMedia mysqlMedia = getMysqlMedia();
mysqlMedia.setId(1L);
pair.setTarget(mysqlMedia);
pairs.add(pair);
}
return pairs;
}
Aggregations