mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
支持通过GTID同步binlog
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -55,7 +55,10 @@ message Header {
|
||||
optional EventType eventType = 11 [default = UPDATE];
|
||||
|
||||
/**预留扩展**/
|
||||
repeated Pair props = 12;
|
||||
repeated Pair props = 12;
|
||||
|
||||
/**当前事务的gitd**/
|
||||
optional string gtid = 13;
|
||||
}
|
||||
|
||||
/**每个字段的数据结构**/
|
||||
@@ -169,7 +172,8 @@ enum EntryType{
|
||||
ROWDATA = 2;
|
||||
TRANSACTIONEND = 3;
|
||||
/** 心跳类型,内部使用,外部暂不可见,可忽略 **/
|
||||
HEARTBEAT = 4;
|
||||
HEARTBEAT = 4;
|
||||
GTIDLOG = 5;
|
||||
}
|
||||
|
||||
/** 事件类型 **/
|
||||
@@ -186,6 +190,7 @@ enum EventType {
|
||||
/**CREATE INDEX**/
|
||||
CINDEX = 10;
|
||||
DINDEX = 11;
|
||||
GTID = 12;
|
||||
}
|
||||
|
||||
/**数据库类型**/
|
||||
|
||||
@@ -18,6 +18,7 @@ public class EntryPosition extends TimePosition {
|
||||
private Long position;
|
||||
// add by agapple at 2016-06-28
|
||||
private Long serverId = null; // 记录一下位点对应的serverId
|
||||
private String gtid = null;
|
||||
|
||||
public EntryPosition(){
|
||||
super(null);
|
||||
@@ -74,6 +75,14 @@ public class EntryPosition extends TimePosition {
|
||||
this.serverId = serverId;
|
||||
}
|
||||
|
||||
public String getGtid() {
|
||||
return gtid;
|
||||
}
|
||||
|
||||
public void setGtid(String gtid) {
|
||||
this.gtid = gtid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
|
||||
Reference in New Issue
Block a user