You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenReplicator or = new OpenReplicator();
or.setHost(host);
or.setPort(port);
or.setUser(user);
or.setPassword(password);
or.setBinlogPosition(binlogStartPos); // greater than 4
or.setBinlogFileName(binlogFileName);
or.setBinlogEventListener(new BinlogEventListener() { @OverRide
public void onEvents(BinlogEventV4 event) {
list.add(event);
// notify external thread to stop openReplicator
}
});
or.stop(xxx);
return list.get(0);
Then, I get binlog event like this:
event pos=-116 <--- first event
event timestamp=1517369647000
event pos=8808036 <--- second one is correct
event timestamp=1522235789000
The text was updated successfully, but these errors were encountered:
xhyzjiji
changed the title
Why return nagetive position when I set binlogPosition greater than 4?
Why returning nagetive position when I set binlogPosition greater than 4?
Mar 29, 2018
code: return first event by the specific position
OpenReplicator or = new OpenReplicator();
or.setHost(host);
or.setPort(port);
or.setUser(user);
or.setPassword(password);
or.setBinlogPosition(binlogStartPos); // greater than 4
or.setBinlogFileName(binlogFileName);
or.setBinlogEventListener(new BinlogEventListener() {
@OverRide
public void onEvents(BinlogEventV4 event) {
list.add(event);
// notify external thread to stop openReplicator
}
});
or.stop(xxx);
return list.get(0);
Then, I get binlog event like this:
event pos=-116 <--- first event
event timestamp=1517369647000
event pos=8808036 <--- second one is correct
event timestamp=1522235789000
The text was updated successfully, but these errors were encountered: