}
}
}
public static void main(String[] args) throws Exception {
InstanceConfig localInstanceConfig = new InstanceConfig("localhost_12001");
ZNRecord record = localInstanceConfig.getRecord();
record.setSimpleField("change_log_dir", "data/localhost_12001/translog");
record.setSimpleField("file_store_dir", "data/localhost_12001/filestore");
record.setSimpleField("check_point_dir", "data/localhost_12001/checkpoint");
InstanceConfig masterInstanceConfig = new InstanceConfig("localhost_12001");
record = masterInstanceConfig.getRecord();
record.setSimpleField("change_log_dir", "data/localhost_12000/translog");
record.setSimpleField("file_store_dir", "data/localhost_12000/filestore");
record.setSimpleField("check_point_dir", "data/localhost_12000/checkpoint");
Replicator replicator = new Replicator(localInstanceConfig, "resource", "partition");
replicator.startReplication(masterInstanceConfig);