From 21f3f8c973c8fc3d9d2e93c79707e86474e1010c Mon Sep 17 00:00:00 2001 From: hiwjd Date: Wed, 2 May 2018 15:28:11 +0800 Subject: [PATCH 01/14] =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=80=9A=E8=BF=87GTID?= =?UTF-8?q?=E5=90=8C=E6=AD=A5binlog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dbsync/binlog/event/GtidLogEvent.java | 20 + .../resources/example/instance.properties | 5 +- .../main/resources/spring/file-instance.xml | 5 + .../parse/driver/mysql/packets/GTIDSet.java | 24 + .../driver/mysql/packets/MysqlGTIDSet.java | 151 + .../parse/driver/mysql/packets/UUIDSet.java | 202 + .../client/BinlogDumpGTIDCommandPacket.java | 68 + .../parse/driver/mysql/utils/ByteHelper.java | 11 + .../parse/driver/mysql/MysqlGTIDSetTest.java | 129 + .../canal/parse/driver/mysql/UUIDSetTest.java | 30 + .../parse/inbound/AbstractEventParser.java | 39 +- .../canal/parse/inbound/ErosaConnection.java | 11 + .../mysql/AbstractMysqlEventParser.java | 18 +- .../inbound/mysql/LocalBinLogConnection.java | 7 + .../parse/inbound/mysql/MysqlConnection.java | 39 + .../parse/inbound/mysql/MysqlEventParser.java | 12 + .../inbound/mysql/dbsync/LogEventConvert.java | 12 + .../mysql/dbsync/LogEventConvertGTID.java | 55 + .../otter/canal/protocol/CanalEntry.java | 25235 ++++++++-------- .../otter/canal/protocol/EntryProtocol.proto | 9 +- .../protocol/position/EntryPosition.java | 9 + .../canal/store/helper/CanalEventUtils.java | 3 + 22 files changed, 13479 insertions(+), 12615 deletions(-) create mode 100644 driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/packets/GTIDSet.java create mode 100644 driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/packets/MysqlGTIDSet.java create mode 100644 driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/packets/UUIDSet.java create mode 100644 driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/packets/client/BinlogDumpGTIDCommandPacket.java create mode 100644 driver/src/test/java/com/alibaba/otter/canal/parse/driver/mysql/MysqlGTIDSetTest.java create mode 100644 driver/src/test/java/com/alibaba/otter/canal/parse/driver/mysql/UUIDSetTest.java create mode 100644 parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/dbsync/LogEventConvertGTID.java diff --git a/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/GtidLogEvent.java b/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/GtidLogEvent.java index d1684d35..411b6a78 100644 --- a/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/GtidLogEvent.java +++ b/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/GtidLogEvent.java @@ -3,6 +3,9 @@ package com.taobao.tddl.dbsync.binlog.event; import com.taobao.tddl.dbsync.binlog.LogBuffer; import com.taobao.tddl.dbsync.binlog.LogEvent; +import java.nio.ByteBuffer; +import java.util.UUID; + /** * @author jianghang 2013-4-8 上午12:36:29 * @version 1.0.3 @@ -16,6 +19,8 @@ public class GtidLogEvent extends LogEvent { public static final int ENCODED_SID_LENGTH = 16; private boolean commitFlag; + private UUID sid; + private long gno; public GtidLogEvent(LogHeader header, LogBuffer buffer, FormatDescriptionLogEvent descriptionEvent){ super(header); @@ -27,6 +32,14 @@ public class GtidLogEvent extends LogEvent { buffer.position(commonHeaderLen); commitFlag = (buffer.getUint8() != 0); // ENCODED_FLAG_LENGTH + byte[] bs = buffer.getData(ENCODED_SID_LENGTH); + ByteBuffer bb = ByteBuffer.wrap(bs); + long high = bb.getLong(); + long low = bb.getLong(); + sid = new UUID(high, low); + + gno = buffer.getLong64(); + // ignore gtid info read // sid.copy_from((uchar *)ptr_buffer); // ptr_buffer+= ENCODED_SID_LENGTH; @@ -42,4 +55,11 @@ public class GtidLogEvent extends LogEvent { return commitFlag; } + public UUID getSid() { + return sid; + } + + public long getGno() { + return gno; + } } diff --git a/deployer/src/main/resources/example/instance.properties b/deployer/src/main/resources/example/instance.properties index 22357e1f..32f4f78f 100644 --- a/deployer/src/main/resources/example/instance.properties +++ b/deployer/src/main/resources/example/instance.properties @@ -6,7 +6,9 @@ canal.instance.master.address=127.0.0.1:3306 canal.instance.master.journal.name= canal.instance.master.position= canal.instance.master.timestamp= +canal.instance.master.gtid= +canal.instance.gtidon=true # table meta tsdb info canal.instance.tsdb.enable=true @@ -20,7 +22,8 @@ canal.instance.tsdb.dbPassword=canal #canal.instance.standby.address = #canal.instance.standby.journal.name = #canal.instance.standby.position = -#canal.instance.standby.timestamp = +#canal.instance.standby.timestamp = +#canal.instance.standby.gtid= # username/password canal.instance.dbUsername=canal canal.instance.dbPassword=canal diff --git a/deployer/src/main/resources/spring/file-instance.xml b/deployer/src/main/resources/spring/file-instance.xml index 3ee38c98..d8285dc1 100644 --- a/deployer/src/main/resources/spring/file-instance.xml +++ b/deployer/src/main/resources/spring/file-instance.xml @@ -151,6 +151,7 @@ + @@ -158,6 +159,7 @@ + @@ -172,5 +174,8 @@ + + + diff --git a/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/packets/GTIDSet.java b/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/packets/GTIDSet.java new file mode 100644 index 00000000..9b028fc2 --- /dev/null +++ b/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/packets/GTIDSet.java @@ -0,0 +1,24 @@ +package com.alibaba.otter.canal.parse.driver.mysql.packets; + +import java.io.IOException; + +/** + * Created by hiwjd on 2018/4/23. + * hiwjd0@gmail.com + */ +public interface GTIDSet { + + /** + * 序列化成字节数组 + * + * @return + */ + byte[] encode() throws IOException; + + /** + * 更新当前实例 + * @param str + * @throws Exception + */ + void update(String str); +} diff --git a/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/packets/MysqlGTIDSet.java b/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/packets/MysqlGTIDSet.java new file mode 100644 index 00000000..4428fb5a --- /dev/null +++ b/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/packets/MysqlGTIDSet.java @@ -0,0 +1,151 @@ +package com.alibaba.otter.canal.parse.driver.mysql.packets; + +import com.alibaba.otter.canal.parse.driver.mysql.utils.ByteHelper; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.*; + +/** + * Created by hiwjd on 2018/4/23. + * hiwjd0@gmail.com + */ +public class MysqlGTIDSet implements GTIDSet { + + public Map sets; + + @Override + public byte[] encode() throws IOException { + ByteArrayOutputStream out = new ByteArrayOutputStream(); + ByteHelper.writeUnsignedInt64LittleEndian(sets.size(), out); + + for (Map.Entry entry : sets.entrySet()) { + out.write(entry.getValue().encode()); + } + + return out.toByteArray(); + } + + @Override + public void update(String str) { + UUIDSet us = UUIDSet.parse(str); + String sid = us.SID.toString(); + if (sets.containsKey(sid)) { + sets.get(sid).intervals.addAll(us.intervals); + sets.get(sid).intervals = UUIDSet.combine(sets.get(sid).intervals); + } else { + sets.put(sid, us); + } + } + + @Override + public boolean equals(Object o) { + if (o == null) return false; + if (this == o) return true; + + MysqlGTIDSet gs = (MysqlGTIDSet) o; + if (gs.sets == null) return false; + + for (Map.Entry entry : sets.entrySet()) { + if (!entry.getValue().equals(gs.sets.get(entry.getKey()))) { + return false; + } + } + + return true; + } + + /** + * 解析如下格式的字符串为MysqlGTIDSet: + * + * 726757ad-4455-11e8-ae04-0242ac110002:1 => + * MysqlGTIDSet{ + * sets: { + * 726757ad-4455-11e8-ae04-0242ac110002: UUIDSet{ + * SID: 726757ad-4455-11e8-ae04-0242ac110002, + * intervals: [{start:1, stop:2}] + * } + * } + * } + * + * 726757ad-4455-11e8-ae04-0242ac110002:1-3 => + * MysqlGTIDSet{ + * sets: { + * 726757ad-4455-11e8-ae04-0242ac110002: UUIDSet{ + * SID: 726757ad-4455-11e8-ae04-0242ac110002, + * intervals: [{start:1, stop:4}] + * } + * } + * } + * + * 726757ad-4455-11e8-ae04-0242ac110002:1-3:4 => + * MysqlGTIDSet{ + * sets: { + * 726757ad-4455-11e8-ae04-0242ac110002: UUIDSet{ + * SID: 726757ad-4455-11e8-ae04-0242ac110002, + * intervals: [{start:1, stop:5}] + * } + * } + * } + * + * 726757ad-4455-11e8-ae04-0242ac110002:1-3:7-9 => + * MysqlGTIDSet{ + * sets: { + * 726757ad-4455-11e8-ae04-0242ac110002: UUIDSet{ + * SID: 726757ad-4455-11e8-ae04-0242ac110002, + * intervals: [{start:1, stop:4}, {start:7, stop: 10}] + * } + * } + * } + * + * 726757ad-4455-11e8-ae04-0242ac110002:1-3,726757ad-4455-11e8-ae04-0242ac110003:4 => + * MysqlGTIDSet{ + * sets: { + * 726757ad-4455-11e8-ae04-0242ac110002: UUIDSet{ + * SID: 726757ad-4455-11e8-ae04-0242ac110002, + * intervals: [{start:1, stop:4}] + * }, + * 726757ad-4455-11e8-ae04-0242ac110003: UUIDSet{ + * SID: 726757ad-4455-11e8-ae04-0242ac110002, + * intervals: [{start:4, stop:5}] + * } + * } + * } + * + * @param gtidData + * @return + */ + public static MysqlGTIDSet parse(String gtidData) { + Map m; + + if (gtidData == null || gtidData.length() < 1) { + m = new HashMap(); + } else { + String[] uuidStrs = gtidData.split(","); + m = new HashMap(uuidStrs.length); + for (int i = 0; i < uuidStrs.length; i++) { + UUIDSet uuidSet = UUIDSet.parse(uuidStrs[i]); + m.put(uuidSet.SID.toString(), uuidSet); + } + } + + MysqlGTIDSet gs = new MysqlGTIDSet(); + gs.sets = m; + + return gs; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + + for (Map.Entry entry : sets.entrySet()) { + if (sb.length() > 0) { + sb.append(","); + } + sb.append(entry.getValue().toString()); + } + + return sb.toString(); + } +} diff --git a/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/packets/UUIDSet.java b/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/packets/UUIDSet.java new file mode 100644 index 00000000..9a3354b4 --- /dev/null +++ b/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/packets/UUIDSet.java @@ -0,0 +1,202 @@ +package com.alibaba.otter.canal.parse.driver.mysql.packets; + +import com.alibaba.otter.canal.parse.driver.mysql.utils.ByteHelper; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.UUID; + +/** + * Created by hiwjd on 2018/4/23. + * hiwjd0@gmail.com + */ +public class UUIDSet { + + public UUID SID; + public List intervals; + + public byte[] encode() throws IOException { + ByteArrayOutputStream out = new ByteArrayOutputStream(); + + ByteBuffer bb = ByteBuffer.wrap(new byte[16]); + bb.putLong(SID.getMostSignificantBits()); + bb.putLong(SID.getLeastSignificantBits()); + + out.write(bb.array()); + + ByteHelper.writeUnsignedInt64LittleEndian(intervals.size(), out); + + for (Interval interval : intervals) { + ByteHelper.writeUnsignedInt64LittleEndian(interval.start, out); + ByteHelper.writeUnsignedInt64LittleEndian(interval.stop, out); + } + + return out.toByteArray(); + } + + @Override + public boolean equals(Object o) { + if (o == null) return false; + if (this == o) return true; + + UUIDSet us = (UUIDSet) o; + Collections.sort(intervals); + Collections.sort(us.intervals); + if (SID.equals(us.SID) && intervals.equals(us.intervals)) { + return true; + } + + return false; + } + + public static class Interval implements Comparable { + public long start; + public long stop; + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + Interval interval = (Interval) o; + + if (start != interval.start) return false; + return stop == interval.stop; + } + + @Override + public int hashCode() { + int result = (int) (start ^ (start >>> 32)); + result = 31 * result + (int) (stop ^ (stop >>> 32)); + return result; + } + + @Override + public int compareTo(Interval o) { + if (equals(o)) { + return 1; + } + return start > o.start ? 1 : (start == o.start ? 0 : -1); + } + } + + /** + * 解析如下格式字符串为UUIDSet: + * + * 726757ad-4455-11e8-ae04-0242ac110002:1 => + * UUIDSet{SID: 726757ad-4455-11e8-ae04-0242ac110002, intervals: [{start:1, stop:2}]} + * + * 726757ad-4455-11e8-ae04-0242ac110002:1-3 => + * UUIDSet{SID: 726757ad-4455-11e8-ae04-0242ac110002, intervals: [{start:1, stop:4}]} + * + * 726757ad-4455-11e8-ae04-0242ac110002:1-3:4 + * UUIDSet{SID: 726757ad-4455-11e8-ae04-0242ac110002, intervals: [{start:1, stop:5}]} + * + * 726757ad-4455-11e8-ae04-0242ac110002:1-3:7-9 + * UUIDSet{SID: 726757ad-4455-11e8-ae04-0242ac110002, intervals: [{start:1, stop:4}, {start:7, stop:10}]} + * + * @param str + * @return + */ + public static UUIDSet parse(String str) { + String[] ss = str.split(":"); + + if (ss.length < 2) { + throw new RuntimeException(String.format("parseUUIDSet failed due to wrong format: %s", str)); + } + + List intervals = new ArrayList(); + for (int i=1; i Interval{start:1, stop:2} + * 1-3 => Interval{start:1, stop:4} + * + * 注意!字符串格式表达时[n,m]是两侧都包含的,Interval表达时[n,m)右侧开 + * + * @param str + * @return + */ + public static Interval parseInterval(String str) { + String[] ss = str.split("-"); + + Interval interval = new Interval(); + switch (ss.length) { + case 1: + interval.start = Long.parseLong(ss[0]); + interval.stop = interval.start + 1; + break; + case 2: + interval.start = Long.parseLong(ss[0]); + interval.stop = Long.parseLong(ss[1]) + 1; + break; + default: + throw new RuntimeException(String.format("parseInterval failed due to wrong format: %s", str)); + } + + return interval; + } + + /** + * 把{start,stop}连续的合并掉: + * [{start:1, stop:4},{start:4, stop:5}] => [{start:1, stop:5}] + * + * @param intervals + * @return + */ + public static List combine(List intervals) { + List combined = new ArrayList(); + Collections.sort(intervals); + int len = intervals.size(); + for (int i=0; i= intervals.get(j).start) { + intervals.get(i).stop = intervals.get(j).stop; + } else { + break; + } + } + i = j - 1; + } + + return combined; + } +} diff --git a/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/packets/client/BinlogDumpGTIDCommandPacket.java b/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/packets/client/BinlogDumpGTIDCommandPacket.java new file mode 100644 index 00000000..36c274c3 --- /dev/null +++ b/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/packets/client/BinlogDumpGTIDCommandPacket.java @@ -0,0 +1,68 @@ +package com.alibaba.otter.canal.parse.driver.mysql.packets.client; + +import com.alibaba.otter.canal.parse.driver.mysql.packets.CommandPacket; +import com.alibaba.otter.canal.parse.driver.mysql.packets.GTIDSet; +import com.alibaba.otter.canal.parse.driver.mysql.utils.ByteHelper; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +/** + * Created by hiwjd on 2018/4/24. + * hiwjd0@gmail.com + * + * https://dev.mysql.com/doc/internals/en/com-binlog-dump-gtid.html + */ +public class BinlogDumpGTIDCommandPacket extends CommandPacket { + + public static final int BINLOG_DUMP_NON_BLOCK = 0x01; + public static final int BINLOG_THROUGH_POSITION = 0x02; + public static final int BINLOG_THROUGH_GTID = 0x04; + + public long slaveServerId; + public GTIDSet gtidSet; + + public BinlogDumpGTIDCommandPacket() { + setCommand((byte) 0x1e); + } + + @Override + public void fromBytes(byte[] data) throws IOException { + } + + @Override + public byte[] toBytes() throws IOException { + ByteArrayOutputStream out = new ByteArrayOutputStream(); + + // 0. [1] write command number + out.write(getCommand()); + // 1. [2] flags + ByteHelper.writeUnsignedShortLittleEndian(BINLOG_THROUGH_GTID, out); + // 2. [4] server-id + ByteHelper.writeUnsignedIntLittleEndian(slaveServerId, out); + // 3. [4] binlog-filename-len + ByteHelper.writeUnsignedIntLittleEndian(0, out); + // 4. [] binlog-filename + // skip + // 5. [8] binlog-pos + ByteHelper.writeUnsignedInt64LittleEndian(4, out); + // if flags & BINLOG_THROUGH_GTID { + byte[] bs = gtidSet.encode(); + // 6. [4] data-size + ByteHelper.writeUnsignedIntLittleEndian(bs.length, out); + // 7, [] data + // [8] n_sids // 文档写的是4个字节,其实是8个字节 + // for n_sids { + // [16] SID + // [8] n_intervals + // for n_intervals { + // [8] start (signed) + // [8] end (signed) + // } + // } + out.write(bs); + // } + + return out.toByteArray(); + } +} diff --git a/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/utils/ByteHelper.java b/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/utils/ByteHelper.java index 67c3830e..04ba2685 100644 --- a/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/utils/ByteHelper.java +++ b/driver/src/main/java/com/alibaba/otter/canal/parse/driver/mysql/utils/ByteHelper.java @@ -127,6 +127,17 @@ public abstract class ByteHelper { out.write((byte) (data >>> 24)); } + public static void writeUnsignedInt64LittleEndian(long data, ByteArrayOutputStream out) { + out.write((byte) (data & 0xFF)); + out.write((byte) (data >>> 8)); + out.write((byte) (data >>> 16)); + out.write((byte) (data >>> 24)); + out.write((byte) (data >>> 32)); + out.write((byte) (data >>> 40)); + out.write((byte) (data >>> 48)); + out.write((byte) (data >>> 56)); + } + public static void writeUnsignedShortLittleEndian(int data, ByteArrayOutputStream out) { out.write((byte) (data & 0xFF)); out.write((byte) ((data >>> 8) & 0xFF)); diff --git a/driver/src/test/java/com/alibaba/otter/canal/parse/driver/mysql/MysqlGTIDSetTest.java b/driver/src/test/java/com/alibaba/otter/canal/parse/driver/mysql/MysqlGTIDSetTest.java new file mode 100644 index 00000000..4744168d --- /dev/null +++ b/driver/src/test/java/com/alibaba/otter/canal/parse/driver/mysql/MysqlGTIDSetTest.java @@ -0,0 +1,129 @@ +package com.alibaba.otter.canal.parse.driver.mysql; + +import com.alibaba.otter.canal.parse.driver.mysql.packets.GTIDSet; +import com.alibaba.otter.canal.parse.driver.mysql.packets.MysqlGTIDSet; +import com.alibaba.otter.canal.parse.driver.mysql.packets.UUIDSet; +import org.junit.Test; +import static org.junit.Assert.*; + +import java.io.IOException; +import java.util.*; + +/** + * Created by hiwjd on 2018/4/25. + * hiwjd0@gmail.com + */ +public class MysqlGTIDSetTest { + + @Test + public void testEncode() throws IOException { + GTIDSet gtidSet = MysqlGTIDSet.parse("726757ad-4455-11e8-ae04-0242ac110002:1"); + byte[] bytes = gtidSet.encode(); + + byte[] expected = { + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x67, 0x57, (byte)0xad, + 0x44, 0x55, 0x11, (byte)0xe8, (byte)0xae, 0x04, 0x02, 0x42, (byte)0xac, 0x11, 0x00, 0x02, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + + for (int i=0; i cases = new HashMap(5); + cases.put( + "726757ad-4455-11e8-ae04-0242ac110002:1", + buildForTest(new Material("726757ad-4455-11e8-ae04-0242ac110002", 1, 2)) + ); + cases.put( + "726757ad-4455-11e8-ae04-0242ac110002:1-3", + buildForTest(new Material("726757ad-4455-11e8-ae04-0242ac110002", 1, 4)) + ); + cases.put( + "726757ad-4455-11e8-ae04-0242ac110002:1-3:4", + buildForTest(new Material("726757ad-4455-11e8-ae04-0242ac110002", 1, 5)) + ); + cases.put( + "726757ad-4455-11e8-ae04-0242ac110002:1-3:7-9", + buildForTest(new Material("726757ad-4455-11e8-ae04-0242ac110002", 1, 4, 7, 10)) + ); + cases.put( + "726757ad-4455-11e8-ae04-0242ac110002:1-3,726757ad-4455-11e8-ae04-0242ac110003:4", + buildForTest( + Arrays.asList( + new Material("726757ad-4455-11e8-ae04-0242ac110002", 1, 4), + new Material("726757ad-4455-11e8-ae04-0242ac110003", 4, 5) + ) + ) + ); + + for (Map.Entry entry : cases.entrySet()) { + MysqlGTIDSet expected = entry.getValue(); + MysqlGTIDSet actual = MysqlGTIDSet.parse(entry.getKey()); + + assertEquals(expected, actual); + } + } + + private static class Material { + + public Material(String uuid, long start, long stop) { + this.uuid = uuid; + this.start = start; + this.stop = stop; + this.start1 = 0; + this.stop1 = 0; + } + + public Material(String uuid, long start, long stop, long start1, long stop1) { + this.uuid = uuid; + this.start = start; + this.stop = stop; + this.start1 = start1; + this.stop1 = stop1; + } + + public String uuid; + public long start; + public long stop; + public long start1; + public long stop1; + } + + private MysqlGTIDSet buildForTest(Material material) { + return buildForTest(Arrays.asList(material)); + } + + private MysqlGTIDSet buildForTest(List materials) { + Map sets = new HashMap(); + for (Material a : materials) { + UUIDSet.Interval interval = new UUIDSet.Interval(); + interval.start = a.start; + interval.stop = a.stop; + List intervals = new ArrayList(); + intervals.add(interval); + + if (a.start1 > 0 && a.stop1 > 0) { + UUIDSet.Interval interval1 = new UUIDSet.Interval(); + interval1.start = a.start1; + interval1.stop = a.stop1; + intervals.add(interval1); + } + + UUIDSet us = new UUIDSet(); + us.SID = UUID.fromString(a.uuid); + us.intervals = intervals; + + sets.put(a.uuid, us); + } + + MysqlGTIDSet gs = new MysqlGTIDSet(); + gs.sets = sets; + + return gs; + } +} diff --git a/driver/src/test/java/com/alibaba/otter/canal/parse/driver/mysql/UUIDSetTest.java b/driver/src/test/java/com/alibaba/otter/canal/parse/driver/mysql/UUIDSetTest.java new file mode 100644 index 00000000..4cdf10da --- /dev/null +++ b/driver/src/test/java/com/alibaba/otter/canal/parse/driver/mysql/UUIDSetTest.java @@ -0,0 +1,30 @@ +package com.alibaba.otter.canal.parse.driver.mysql; + +import com.alibaba.otter.canal.parse.driver.mysql.packets.UUIDSet; +import org.junit.Test; + +import java.util.HashMap; +import java.util.Map; + +import static org.junit.Assert.*; + +/** + * Created by hiwjd on 2018/4/26. + * hiwjd0@gmail.com + */ +public class UUIDSetTest { + + @Test + public void testToString() { + Map cases = new HashMap(4); + cases.put("726757ad-4455-11e8-ae04-0242ac110002:1", "726757ad-4455-11e8-ae04-0242ac110002:1"); + cases.put("726757ad-4455-11e8-ae04-0242ac110002:1-3", "726757ad-4455-11e8-ae04-0242ac110002:1-3"); + cases.put("726757ad-4455-11e8-ae04-0242ac110002:1-3:4-6", "726757ad-4455-11e8-ae04-0242ac110002:1-6"); + cases.put("726757ad-4455-11e8-ae04-0242ac110002:1-3:5-7", "726757ad-4455-11e8-ae04-0242ac110002:1-3:5-7"); + + for (Map.Entry entry : cases.entrySet()) { + String expected = entry.getValue(); + assertEquals(expected, UUIDSet.parse(entry.getKey()).toString()); + } + } +} diff --git a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/AbstractEventParser.java b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/AbstractEventParser.java index b0f793d2..c486c463 100644 --- a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/AbstractEventParser.java +++ b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/AbstractEventParser.java @@ -8,6 +8,8 @@ import java.util.TimerTask; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; +import com.alibaba.otter.canal.parse.driver.mysql.packets.MysqlGTIDSet; +import com.google.protobuf.InvalidProtocolBufferException; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.exception.ExceptionUtils; import org.apache.commons.lang.math.RandomUtils; @@ -87,6 +89,9 @@ public abstract class AbstractEventParser extends AbstractCanalLifeCycle protected TimerTask heartBeatTimerTask; protected Throwable exception = null; + protected boolean isGTIDMode = false; // 是否是GTID模式 + protected String GTIDSetStr = null; + protected abstract BinlogParser buildParser(); protected abstract ErosaConnection buildErosaConnection(); @@ -214,12 +219,17 @@ public abstract class AbstractEventParser extends AbstractCanalLifeCycle }; // 4. 开始dump数据 - if (StringUtils.isEmpty(startPosition.getJournalName()) && startPosition.getTimestamp() != null) { - erosaConnection.dump(startPosition.getTimestamp(), sinkHandler); + // 判断所属instance是否启用GTID模式,是的话调用ErosaConnection中GTID对应方法dump数据 + if (isGTIDMode()) { + erosaConnection.dump(MysqlGTIDSet.parse(startPosition.getGtid()), sinkHandler); } else { - erosaConnection.dump(startPosition.getJournalName(), - startPosition.getPosition(), - sinkHandler); + if (StringUtils.isEmpty(startPosition.getJournalName()) && startPosition.getTimestamp() != null) { + erosaConnection.dump(startPosition.getTimestamp(), sinkHandler); + } else { + erosaConnection.dump(startPosition.getJournalName(), + startPosition.getPosition(), + sinkHandler); + } } } catch (TableIdNotFoundException e) { @@ -368,6 +378,9 @@ public abstract class AbstractEventParser extends AbstractCanalLifeCycle position.setTimestamp(entry.getHeader().getExecuteTime()); // add serverId at 2016-06-28 position.setServerId(entry.getHeader().getServerId()); + // set gtid + position.setGtid(entry.getHeader().getGtid()); + logPosition.setPostion(position); LogIdentity identity = new LogIdentity(runningInfo.getAddress(), -1L); @@ -530,4 +543,20 @@ public abstract class AbstractEventParser extends AbstractCanalLifeCycle return exception; } + public boolean isGTIDMode() { + return isGTIDMode; + } + + public void setIsGTIDMode(boolean isGTIDMode) { + this.isGTIDMode = isGTIDMode; + } + + public String getGTIDSetStr() { + return GTIDSetStr; + } + + public void setGTIDSetStr(String GTIDSetStr) { + this.GTIDSetStr = GTIDSetStr; + } + } diff --git a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/ErosaConnection.java b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/ErosaConnection.java index 2e953956..97ea3b15 100644 --- a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/ErosaConnection.java +++ b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/ErosaConnection.java @@ -1,5 +1,7 @@ package com.alibaba.otter.canal.parse.inbound; +import com.alibaba.otter.canal.parse.driver.mysql.packets.GTIDSet; + import java.io.IOException; /** @@ -24,5 +26,14 @@ public interface ErosaConnection { public void dump(long timestamp, SinkFunction func) throws IOException; + /** + * 通过GTID同步binlog + * + * @param gtidSet + * @param func + * @throws IOException + */ + public void dump(GTIDSet gtidSet, SinkFunction func) throws IOException; + ErosaConnection fork(); } diff --git a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/AbstractMysqlEventParser.java b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/AbstractMysqlEventParser.java index 422bae37..8d0c5288 100644 --- a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/AbstractMysqlEventParser.java +++ b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/AbstractMysqlEventParser.java @@ -1,7 +1,10 @@ package com.alibaba.otter.canal.parse.inbound.mysql; +import java.io.IOException; import java.nio.charset.Charset; +import com.alibaba.otter.canal.parse.driver.mysql.packets.MysqlGTIDSet; +import com.alibaba.otter.canal.parse.inbound.mysql.dbsync.LogEventConvertGTID; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -34,7 +37,20 @@ public abstract class AbstractMysqlEventParser extends AbstractEventParser { protected boolean useDruidDdlFilter = true; protected BinlogParser buildParser() { - LogEventConvert convert = new LogEventConvert(); + LogEventConvert convert; + + if (isGTIDMode()) { + EntryPosition position; + try { + position = findStartPosition(null); + } catch (IOException e) { + throw new RuntimeException("findStartPosition failed.", e); + } + convert = new LogEventConvertGTID(MysqlGTIDSet.parse(position.getGtid())); + } else { + convert = new LogEventConvert(); + } + if (eventFilter != null && eventFilter instanceof AviaterRegexFilter) { convert.setNameFilter((AviaterRegexFilter) eventFilter); } diff --git a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/LocalBinLogConnection.java b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/LocalBinLogConnection.java index 14991dab..68086633 100644 --- a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/LocalBinLogConnection.java +++ b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/LocalBinLogConnection.java @@ -4,6 +4,8 @@ import java.io.File; import java.io.IOException; import java.util.List; +import com.alibaba.otter.canal.parse.driver.mysql.packets.GTIDSet; +import org.apache.commons.lang.NotImplementedException; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -200,6 +202,11 @@ public class LocalBinLogConnection implements ErosaConnection { dump(binlogFilename, binlogFileOffset, func); } + @Override + public void dump(GTIDSet gtidSet, SinkFunction func) throws IOException { + throw new NotImplementedException(); + } + public ErosaConnection fork() { LocalBinLogConnection connection = new LocalBinLogConnection(); diff --git a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlConnection.java b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlConnection.java index 997bc5dd..4a3b7fb9 100644 --- a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlConnection.java +++ b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlConnection.java @@ -8,6 +8,8 @@ import java.nio.charset.Charset; import java.util.List; import java.util.concurrent.TimeUnit; +import com.alibaba.otter.canal.parse.driver.mysql.packets.GTIDSet; +import com.alibaba.otter.canal.parse.driver.mysql.packets.client.BinlogDumpGTIDCommandPacket; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -159,6 +161,29 @@ public class MysqlConnection implements ErosaConnection { } } + @Override + public void dump(GTIDSet gtidSet, SinkFunction func) throws IOException { + updateSettings(); + sendBinlogDumpGTID(gtidSet); + + DirectLogFetcher fetcher = new DirectLogFetcher(connector.getReceiveBufferSize()); + fetcher.start(connector.getChannel()); + LogDecoder decoder = new LogDecoder(LogEvent.UNKNOWN_EVENT, LogEvent.ENUM_END_EVENT); + LogContext context = new LogContext(); + while (fetcher.fetch()) { + LogEvent event = null; + event = decoder.decode(fetcher, context); + + if (event == null) { + throw new CanalParseException("parse failed"); + } + + if (!func.sink(event)) { + break; + } + } + } + public void dump(long timestamp, SinkFunction func) throws IOException { throw new NullPointerException("Not implement yet"); } @@ -222,6 +247,20 @@ public class MysqlConnection implements ErosaConnection { PacketManager.writePkg(connector.getChannel(), semiAckHeader.toBytes(), cmdBody); } + private void sendBinlogDumpGTID(GTIDSet gtidSet) throws IOException { + BinlogDumpGTIDCommandPacket binlogDumpCmd = new BinlogDumpGTIDCommandPacket(); + binlogDumpCmd.slaveServerId = this.slaveId; + binlogDumpCmd.gtidSet = gtidSet; + byte[] cmdBody = binlogDumpCmd.toBytes(); + + logger.info("COM_BINLOG_DUMP_GTID:{}", binlogDumpCmd); + HeaderPacket binlogDumpHeader = new HeaderPacket(); + binlogDumpHeader.setPacketBodyLength(cmdBody.length); + binlogDumpHeader.setPacketSequenceNumber((byte) 0x00); + PacketManager.writePkg(connector.getChannel(), binlogDumpHeader.toBytes(), cmdBody); + connector.setDumping(true); + } + public MysqlConnection fork() { MysqlConnection connection = new MysqlConnection(); connection.setCharset(getCharset()); diff --git a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlEventParser.java b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlEventParser.java index 49ade7d9..6b0c7a66 100644 --- a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlEventParser.java +++ b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlEventParser.java @@ -10,6 +10,10 @@ import java.util.Map; import java.util.TimerTask; import java.util.concurrent.atomic.AtomicLong; +import com.alibaba.otter.canal.filter.aviater.AviaterRegexFilter; +import com.alibaba.otter.canal.parse.driver.mysql.packets.MysqlGTIDSet; +import com.alibaba.otter.canal.parse.inbound.BinlogParser; +import com.alibaba.otter.canal.parse.inbound.mysql.dbsync.LogEventConvertGTID; import org.apache.commons.lang.StringUtils; import org.springframework.util.CollectionUtils; @@ -344,6 +348,14 @@ public class MysqlEventParser extends AbstractMysqlEventParser implements CanalE } protected EntryPosition findStartPosition(ErosaConnection connection) throws IOException { + if (isGTIDMode()) { + // GTID模式下,CanalLogPositionManager里取最后的gtid,没有则取instanc配置中的 + LogPosition logPosition = getLogPositionManager().getLatestIndexBy(destination); + if (logPosition != null) { + return logPosition.getPostion(); + } + return masterPosition; + } EntryPosition startPosition = findStartPositionInternal(connection); if (needTransactionPosition.get()) { logger.warn("prepare to find last position : {}", startPosition.toString()); diff --git a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/dbsync/LogEventConvert.java b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/dbsync/LogEventConvert.java index 27fa8117..dc243fd3 100644 --- a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/dbsync/LogEventConvert.java +++ b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/dbsync/LogEventConvert.java @@ -56,6 +56,7 @@ import com.taobao.tddl.dbsync.binlog.event.UserVarLogEvent; import com.taobao.tddl.dbsync.binlog.event.WriteRowsLogEvent; import com.taobao.tddl.dbsync.binlog.event.XidLogEvent; import com.taobao.tddl.dbsync.binlog.event.mariadb.AnnotateRowsEvent; +import com.taobao.tddl.dbsync.binlog.event.GtidLogEvent; /** * 基于{@linkplain LogEvent}转化为Entry对象的处理 @@ -128,6 +129,8 @@ public class LogEventConvert extends AbstractCanalLifeCycle implements BinlogPar return parseIntrvarLogEvent((IntvarLogEvent) logEvent); case LogEvent.RAND_EVENT: return parseRandLogEvent((RandLogEvent) logEvent); + case LogEvent.GTID_LOG_EVENT: + return parseGTIDLogEvent((GtidLogEvent) logEvent); default: break; } @@ -143,6 +146,15 @@ public class LogEventConvert extends AbstractCanalLifeCycle implements BinlogPar } } + private Entry parseGTIDLogEvent(GtidLogEvent logEvent) { + LogHeader logHeader = logEvent.getHeader(); + Header header = createHeader("", logHeader, "", "", EventType.GTID); + Pair.Builder builder = Pair.newBuilder(); + builder.setKey("gtid"); + builder.setValue(String.format("%s:%d", logEvent.getSid(), logEvent.getGno())); + return createEntry(header, EntryType.GTIDLOG, builder.build().toByteString()); + } + private Entry parseQueryEvent(QueryLogEvent event, boolean isSeek) { String queryString = event.getQuery(); if (StringUtils.endsWithIgnoreCase(queryString, BEGIN)) { diff --git a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/dbsync/LogEventConvertGTID.java b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/dbsync/LogEventConvertGTID.java new file mode 100644 index 00000000..337e6f48 --- /dev/null +++ b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/dbsync/LogEventConvertGTID.java @@ -0,0 +1,55 @@ +package com.alibaba.otter.canal.parse.inbound.mysql.dbsync; + +import com.alibaba.otter.canal.parse.driver.mysql.packets.GTIDSet; +import com.alibaba.otter.canal.parse.exception.CanalParseException; +import com.alibaba.otter.canal.parse.inbound.BinlogParser; +import com.alibaba.otter.canal.protocol.CanalEntry; +import com.google.protobuf.InvalidProtocolBufferException; +import com.taobao.tddl.dbsync.binlog.LogEvent; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Created by hiwjd on 2018/5/2. + * hiwjd0@gmail.com + */ +public class LogEventConvertGTID extends LogEventConvert implements BinlogParser { + + public static final Logger logger = LoggerFactory.getLogger(LogEventConvertGTID.class); + + // latest gtid + private GTIDSet gtidSet; + + public LogEventConvertGTID(GTIDSet gtidSet) { + this.gtidSet = gtidSet; + } + + @Override + public CanalEntry.Entry parse(LogEvent event, boolean isSeek) throws CanalParseException { + CanalEntry.Entry entry = super.parse(event, isSeek); + if (entry == null) { + return null; + } + + if (entry.getEntryType() == CanalEntry.EntryType.GTIDLOG) { + try { + CanalEntry.Pair pair = CanalEntry.Pair.parseFrom(entry.getStoreValue()); + gtidSet.update(pair.getValue()); + + } catch (InvalidProtocolBufferException e) { + logger.error("retrive gtid failed.", e); + throw new CanalParseException("retrive gtid failed.", e); + } + + return null; + } + + if (gtidSet != null) { + String gtid = gtidSet.toString(); + CanalEntry.Header header = entry.getHeader().toBuilder().setGtid(gtid).build(); + entry = entry.toBuilder().setHeader(header).build(); + } + + return entry; + } +} diff --git a/protocol/src/main/java/com/alibaba/otter/canal/protocol/CanalEntry.java b/protocol/src/main/java/com/alibaba/otter/canal/protocol/CanalEntry.java index 84d6427e..eb911fb5 100644 --- a/protocol/src/main/java/com/alibaba/otter/canal/protocol/CanalEntry.java +++ b/protocol/src/main/java/com/alibaba/otter/canal/protocol/CanalEntry.java @@ -4,12778 +4,12801 @@ package com.alibaba.otter.canal.protocol; public final class CanalEntry { - - private CanalEntry(){ - } - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - } - + private CanalEntry() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + /** + * Protobuf enum {@code com.alibaba.otter.canal.protocol.EntryType} + * + *
+   **打散后的事件类型,主要用于标识事务的开始,变更数据,结束*
+   * 
+ */ + public enum EntryType + implements com.google.protobuf.ProtocolMessageEnum { /** - * Protobuf enum {@code com.alibaba.otter.canal.protocol.EntryType} + * TRANSACTIONBEGIN = 1; + */ + TRANSACTIONBEGIN(0, 1), + /** + * ROWDATA = 2; + */ + ROWDATA(1, 2), + /** + * TRANSACTIONEND = 3; + */ + TRANSACTIONEND(2, 3), + /** + * HEARTBEAT = 4; * *
-     * *打散后的事件类型,主要用于标识事务的开始,变更数据,结束*
+     ** 心跳类型,内部使用,外部暂不可见,可忽略 *
      * 
*/ - public enum EntryType implements com.google.protobuf.ProtocolMessageEnum { - /** - * TRANSACTIONBEGIN = 1; - */ - TRANSACTIONBEGIN(0, 1), - /** - * ROWDATA = 2; - */ - ROWDATA(1, 2), - /** - * TRANSACTIONEND = 3; - */ - TRANSACTIONEND(2, 3), - /** - * HEARTBEAT = 4; - * - *
-         * * 心跳类型,内部使用,外部暂不可见,可忽略 *
-         * 
- */ - HEARTBEAT(3, 4), ; - - /** - * TRANSACTIONBEGIN = 1; - */ - public static final int TRANSACTIONBEGIN_VALUE = 1; - /** - * ROWDATA = 2; - */ - public static final int ROWDATA_VALUE = 2; - /** - * TRANSACTIONEND = 3; - */ - public static final int TRANSACTIONEND_VALUE = 3; - /** - * HEARTBEAT = 4; - * - *
-         * * 心跳类型,内部使用,外部暂不可见,可忽略 *
-         * 
- */ - public static final int HEARTBEAT_VALUE = 4; - - public final int getNumber() { - return value; - } - - public static EntryType valueOf(int value) { - switch (value) { - case 1: - return TRANSACTIONBEGIN; - case 2: - return ROWDATA; - case 3: - return TRANSACTIONEND; - case 4: - return HEARTBEAT; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - - public EntryType findValueByNumber(int number) { - return EntryType.valueOf(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - return getDescriptor().getValues().get(index); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.alibaba.otter.canal.protocol.CanalEntry.getDescriptor().getEnumTypes().get(0); - } - - private static final EntryType[] VALUES = values(); - - public static EntryType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int index; - private final int value; - - private EntryType(int index, int value){ - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:com.alibaba.otter.canal.protocol.EntryType) - } + HEARTBEAT(3, 4), + /** + * GTIDLOG = 5; + */ + GTIDLOG(4, 5), + ; /** - * Protobuf enum {@code com.alibaba.otter.canal.protocol.EventType} + * TRANSACTIONBEGIN = 1; + */ + public static final int TRANSACTIONBEGIN_VALUE = 1; + /** + * ROWDATA = 2; + */ + public static final int ROWDATA_VALUE = 2; + /** + * TRANSACTIONEND = 3; + */ + public static final int TRANSACTIONEND_VALUE = 3; + /** + * HEARTBEAT = 4; * *
-     * * 事件类型 *
+     ** 心跳类型,内部使用,外部暂不可见,可忽略 *
      * 
*/ - public enum EventType implements com.google.protobuf.ProtocolMessageEnum { - /** - * INSERT = 1; - */ - INSERT(0, 1), - /** - * UPDATE = 2; - */ - UPDATE(1, 2), - /** - * DELETE = 3; - */ - DELETE(2, 3), - /** - * CREATE = 4; - */ - CREATE(3, 4), - /** - * ALTER = 5; - */ - ALTER(4, 5), - /** - * ERASE = 6; - */ - ERASE(5, 6), - /** - * QUERY = 7; - */ - QUERY(6, 7), - /** - * TRUNCATE = 8; - */ - TRUNCATE(7, 8), - /** - * RENAME = 9; - */ - RENAME(8, 9), - /** - * CINDEX = 10; - * - *
-         * *CREATE INDEX*
-         * 
- */ - CINDEX(9, 10), - /** - * DINDEX = 11; - */ - DINDEX(10, 11), ; + public static final int HEARTBEAT_VALUE = 4; + /** + * GTIDLOG = 5; + */ + public static final int GTIDLOG_VALUE = 5; - /** - * INSERT = 1; - */ - public static final int INSERT_VALUE = 1; - /** - * UPDATE = 2; - */ - public static final int UPDATE_VALUE = 2; - /** - * DELETE = 3; - */ - public static final int DELETE_VALUE = 3; - /** - * CREATE = 4; - */ - public static final int CREATE_VALUE = 4; - /** - * ALTER = 5; - */ - public static final int ALTER_VALUE = 5; - /** - * ERASE = 6; - */ - public static final int ERASE_VALUE = 6; - /** - * QUERY = 7; - */ - public static final int QUERY_VALUE = 7; - /** - * TRUNCATE = 8; - */ - public static final int TRUNCATE_VALUE = 8; - /** - * RENAME = 9; - */ - public static final int RENAME_VALUE = 9; - /** - * CINDEX = 10; - * - *
-         * *CREATE INDEX*
-         * 
- */ - public static final int CINDEX_VALUE = 10; - /** - * DINDEX = 11; - */ - public static final int DINDEX_VALUE = 11; - public final int getNumber() { - return value; - } + public final int getNumber() { return value; } - public static EventType valueOf(int value) { - switch (value) { - case 1: - return INSERT; - case 2: - return UPDATE; - case 3: - return DELETE; - case 4: - return CREATE; - case 5: - return ALTER; - case 6: - return ERASE; - case 7: - return QUERY; - case 8: - return TRUNCATE; - case 9: - return RENAME; - case 10: - return CINDEX; - case 11: - return DINDEX; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - - public EventType findValueByNumber(int number) { - return EventType.valueOf(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - return getDescriptor().getValues().get(index); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.alibaba.otter.canal.protocol.CanalEntry.getDescriptor().getEnumTypes().get(1); - } - - private static final EventType[] VALUES = values(); - - public static EventType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int index; - private final int value; - - private EventType(int index, int value){ - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:com.alibaba.otter.canal.protocol.EventType) + public static EntryType valueOf(int value) { + switch (value) { + case 1: return TRANSACTIONBEGIN; + case 2: return ROWDATA; + case 3: return TRANSACTIONEND; + case 4: return HEARTBEAT; + case 5: return GTIDLOG; + default: return null; + } } + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public EntryType findValueByNumber(int number) { + return EntryType.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alibaba.otter.canal.protocol.CanalEntry.getDescriptor().getEnumTypes().get(0); + } + + private static final EntryType[] VALUES = values(); + + public static EntryType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private EntryType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alibaba.otter.canal.protocol.EntryType) + } + + /** + * Protobuf enum {@code com.alibaba.otter.canal.protocol.EventType} + * + *
+   ** 事件类型 *
+   * 
+ */ + public enum EventType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * INSERT = 1; + */ + INSERT(0, 1), + /** + * UPDATE = 2; + */ + UPDATE(1, 2), + /** + * DELETE = 3; + */ + DELETE(2, 3), + /** + * CREATE = 4; + */ + CREATE(3, 4), + /** + * ALTER = 5; + */ + ALTER(4, 5), + /** + * ERASE = 6; + */ + ERASE(5, 6), + /** + * QUERY = 7; + */ + QUERY(6, 7), + /** + * TRUNCATE = 8; + */ + TRUNCATE(7, 8), + /** + * RENAME = 9; + */ + RENAME(8, 9), + /** + * CINDEX = 10; + * + *
+     **CREATE INDEX*
+     * 
+ */ + CINDEX(9, 10), + /** + * DINDEX = 11; + */ + DINDEX(10, 11), + /** + * GTID = 12; + */ + GTID(11, 12), + ; + /** - * Protobuf enum {@code com.alibaba.otter.canal.protocol.Type} + * INSERT = 1; + */ + public static final int INSERT_VALUE = 1; + /** + * UPDATE = 2; + */ + public static final int UPDATE_VALUE = 2; + /** + * DELETE = 3; + */ + public static final int DELETE_VALUE = 3; + /** + * CREATE = 4; + */ + public static final int CREATE_VALUE = 4; + /** + * ALTER = 5; + */ + public static final int ALTER_VALUE = 5; + /** + * ERASE = 6; + */ + public static final int ERASE_VALUE = 6; + /** + * QUERY = 7; + */ + public static final int QUERY_VALUE = 7; + /** + * TRUNCATE = 8; + */ + public static final int TRUNCATE_VALUE = 8; + /** + * RENAME = 9; + */ + public static final int RENAME_VALUE = 9; + /** + * CINDEX = 10; * *
-     * *数据库类型*
+     **CREATE INDEX*
      * 
*/ - public enum Type implements com.google.protobuf.ProtocolMessageEnum { - /** - * ORACLE = 1; - */ - ORACLE(0, 1), - /** - * MYSQL = 2; - */ - MYSQL(1, 2), - /** - * PGSQL = 3; - */ - PGSQL(2, 3), ; + public static final int CINDEX_VALUE = 10; + /** + * DINDEX = 11; + */ + public static final int DINDEX_VALUE = 11; + /** + * GTID = 12; + */ + public static final int GTID_VALUE = 12; - /** - * ORACLE = 1; - */ - public static final int ORACLE_VALUE = 1; - /** - * MYSQL = 2; - */ - public static final int MYSQL_VALUE = 2; - /** - * PGSQL = 3; - */ - public static final int PGSQL_VALUE = 3; - public final int getNumber() { - return value; - } + public final int getNumber() { return value; } - public static Type valueOf(int value) { - switch (value) { - case 1: - return ORACLE; - case 2: - return MYSQL; - case 3: - return PGSQL; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { - - public Type findValueByNumber(int number) { - return Type.valueOf(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - return getDescriptor().getValues().get(index); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.alibaba.otter.canal.protocol.CanalEntry.getDescriptor().getEnumTypes().get(2); - } - - private static final Type[] VALUES = values(); - - public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int index; - private final int value; - - private Type(int index, int value){ - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:com.alibaba.otter.canal.protocol.Type) + public static EventType valueOf(int value) { + switch (value) { + case 1: return INSERT; + case 2: return UPDATE; + case 3: return DELETE; + case 4: return CREATE; + case 5: return ALTER; + case 6: return ERASE; + case 7: return QUERY; + case 8: return TRUNCATE; + case 9: return RENAME; + case 10: return CINDEX; + case 11: return DINDEX; + case 12: return GTID; + default: return null; + } } - public interface EntryOrBuilder extends - // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Entry) - com.google.protobuf.MessageOrBuilder { + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public EventType findValueByNumber(int number) { + return EventType.valueOf(number); + } + }; - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-         * *协议头部信息*
-         * 
- */ - boolean hasHeader(); - - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-         * *协议头部信息*
-         * 
- */ - com.alibaba.otter.canal.protocol.CanalEntry.Header getHeader(); - - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-         * *协议头部信息*
-         * 
- */ - com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder getHeaderOrBuilder(); - - /** - * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; - * - *
-         * *打散后的事件类型*
-         * 
- */ - boolean hasEntryType(); - - /** - * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; - * - *
-         * *打散后的事件类型*
-         * 
- */ - com.alibaba.otter.canal.protocol.CanalEntry.EntryType getEntryType(); - - /** - * optional bytes storeValue = 3; - * - *
-         * *传输的二进制数组*
-         * 
- */ - boolean hasStoreValue(); - - /** - * optional bytes storeValue = 3; - * - *
-         * *传输的二进制数组*
-         * 
- */ - com.google.protobuf.ByteString getStoreValue(); + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alibaba.otter.canal.protocol.CanalEntry.getDescriptor().getEnumTypes().get(1); } + private static final EventType[] VALUES = values(); + + public static EventType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private EventType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alibaba.otter.canal.protocol.EventType) + } + + /** + * Protobuf enum {@code com.alibaba.otter.canal.protocol.Type} + * + *
+   **数据库类型*
+   * 
+ */ + public enum Type + implements com.google.protobuf.ProtocolMessageEnum { + /** + * ORACLE = 1; + */ + ORACLE(0, 1), + /** + * MYSQL = 2; + */ + MYSQL(1, 2), + /** + * PGSQL = 3; + */ + PGSQL(2, 3), + ; + + /** + * ORACLE = 1; + */ + public static final int ORACLE_VALUE = 1; + /** + * MYSQL = 2; + */ + public static final int MYSQL_VALUE = 2; + /** + * PGSQL = 3; + */ + public static final int PGSQL_VALUE = 3; + + + public final int getNumber() { return value; } + + public static Type valueOf(int value) { + switch (value) { + case 1: return ORACLE; + case 2: return MYSQL; + case 3: return PGSQL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alibaba.otter.canal.protocol.CanalEntry.getDescriptor().getEnumTypes().get(2); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private Type(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alibaba.otter.canal.protocol.Type) + } + + public interface EntryOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Entry) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+     **协议头部信息*
+     * 
+ */ + boolean hasHeader(); + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+     **协议头部信息*
+     * 
+ */ + com.alibaba.otter.canal.protocol.CanalEntry.Header getHeader(); + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+     **协议头部信息*
+     * 
+ */ + com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder getHeaderOrBuilder(); + + /** + * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + * + *
+     **打散后的事件类型*
+     * 
+ */ + boolean hasEntryType(); + /** + * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + * + *
+     **打散后的事件类型*
+     * 
+ */ + com.alibaba.otter.canal.protocol.CanalEntry.EntryType getEntryType(); + + /** + * optional bytes storeValue = 3; + * + *
+     **传输的二进制数组*
+     * 
+ */ + boolean hasStoreValue(); + /** + * optional bytes storeValue = 3; + * + *
+     **传输的二进制数组*
+     * 
+ */ + com.google.protobuf.ByteString getStoreValue(); + } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Entry} + * + *
+   ****************************************************************
+   * message model
+   *如果要在Enum中新增类型,确保以前的类型的下标值不变.
+   ***************************************************************
+   * 
+ */ + public static final class Entry extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Entry) + EntryOrBuilder { + // Use Entry.newBuilder() to construct. + private Entry(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private Entry(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final Entry defaultInstance; + public static Entry getDefaultInstance() { + return defaultInstance; + } + + public Entry getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Entry( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = header_.toBuilder(); + } + header_ = input.readMessage(com.alibaba.otter.canal.protocol.CanalEntry.Header.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(header_); + header_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + case 16: { + int rawValue = input.readEnum(); + com.alibaba.otter.canal.protocol.CanalEntry.EntryType value = com.alibaba.otter.canal.protocol.CanalEntry.EntryType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + entryType_ = value; + } + break; + } + case 26: { + bitField0_ |= 0x00000004; + storeValue_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalEntry.Entry.class, com.alibaba.otter.canal.protocol.CanalEntry.Entry.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Entry parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Entry(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int HEADER_FIELD_NUMBER = 1; + private com.alibaba.otter.canal.protocol.CanalEntry.Header header_; + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+     **协议头部信息*
+     * 
+ */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+     **协议头部信息*
+     * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Header getHeader() { + return header_; + } + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+     **协议头部信息*
+     * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder getHeaderOrBuilder() { + return header_; + } + + public static final int ENTRYTYPE_FIELD_NUMBER = 2; + private com.alibaba.otter.canal.protocol.CanalEntry.EntryType entryType_; + /** + * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + * + *
+     **打散后的事件类型*
+     * 
+ */ + public boolean hasEntryType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + * + *
+     **打散后的事件类型*
+     * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.EntryType getEntryType() { + return entryType_; + } + + public static final int STOREVALUE_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString storeValue_; + /** + * optional bytes storeValue = 3; + * + *
+     **传输的二进制数组*
+     * 
+ */ + public boolean hasStoreValue() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bytes storeValue = 3; + * + *
+     **传输的二进制数组*
+     * 
+ */ + public com.google.protobuf.ByteString getStoreValue() { + return storeValue_; + } + + private void initFields() { + header_ = com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance(); + entryType_ = com.alibaba.otter.canal.protocol.CanalEntry.EntryType.ROWDATA; + storeValue_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, header_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, entryType_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, storeValue_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, header_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, entryType_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, storeValue_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.Entry prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } /** * Protobuf type {@code com.alibaba.otter.canal.protocol.Entry} * *
-     ****************************************************************
-     *  message model
-     * 如果要在Enum中新增类型,确保以前的类型的下标值不变.
+     ****************************************************************
+     * message model
+     *如果要在Enum中新增类型,确保以前的类型的下标值不变.
      ***************************************************************
      * 
*/ - public static final class Entry extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Entry) - EntryOrBuilder { - - // Use Entry.newBuilder() to construct. - private Entry(com.google.protobuf.GeneratedMessage.Builder builder){ - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - - private Entry(boolean noInit){ - this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - - private static final Entry defaultInstance; - - public static Entry getDefaultInstance() { - return defaultInstance; - } - - public Entry getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Entry(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException{ - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - subBuilder = header_.toBuilder(); - } - header_ = input.readMessage(com.alibaba.otter.canal.protocol.CanalEntry.Header.PARSER, - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(header_); - header_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 16: { - int rawValue = input.readEnum(); - com.alibaba.otter.canal.protocol.CanalEntry.EntryType value = com.alibaba.otter.canal.protocol.CanalEntry.EntryType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(2, rawValue); - } else { - bitField0_ |= 0x00000002; - entryType_ = value; - } - break; - } - case 26: { - bitField0_ |= 0x00000004; - storeValue_ = input.readBytes(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_fieldAccessorTable.ensureFieldAccessorsInitialized(com.alibaba.otter.canal.protocol.CanalEntry.Entry.class, - com.alibaba.otter.canal.protocol.CanalEntry.Entry.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - - public Entry parsePartialFrom(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Entry(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int HEADER_FIELD_NUMBER = 1; - private com.alibaba.otter.canal.protocol.CanalEntry.Header header_; - - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-         * *协议头部信息*
-         * 
- */ - public boolean hasHeader() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-         * *协议头部信息*
-         * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Header getHeader() { - return header_; - } - - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-         * *协议头部信息*
-         * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder getHeaderOrBuilder() { - return header_; - } - - public static final int ENTRYTYPE_FIELD_NUMBER = 2; - private com.alibaba.otter.canal.protocol.CanalEntry.EntryType entryType_; - - /** - * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; - * - *
-         * *打散后的事件类型*
-         * 
- */ - public boolean hasEntryType() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - - /** - * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; - * - *
-         * *打散后的事件类型*
-         * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.EntryType getEntryType() { - return entryType_; - } - - public static final int STOREVALUE_FIELD_NUMBER = 3; - private com.google.protobuf.ByteString storeValue_; - - /** - * optional bytes storeValue = 3; - * - *
-         * *传输的二进制数组*
-         * 
- */ - public boolean hasStoreValue() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - - /** - * optional bytes storeValue = 3; - * - *
-         * *传输的二进制数组*
-         * 
- */ - public com.google.protobuf.ByteString getStoreValue() { - return storeValue_; - } - - private void initFields() { - header_ = com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance(); - entryType_ = com.alibaba.otter.canal.protocol.CanalEntry.EntryType.ROWDATA; - storeValue_ = com.google.protobuf.ByteString.EMPTY; - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, header_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeEnum(2, entryType_.getNumber()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, storeValue_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, header_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, entryType_.getNumber()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, storeValue_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - - @java.lang.Override - protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom(com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom(byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom(java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseDelimitedFrom(java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Entry parseFrom(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { - return Builder.create(); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.Entry prototype) { - return newBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return newBuilder(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.Entry} - * - *
-         ****************************************************************
-         *  message model
-         * 如果要在Enum中新增类型,确保以前的类型的下标值不变.
-         ***************************************************************
-         * 
- */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Entry) com.alibaba.otter.canal.protocol.CanalEntry.EntryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor; + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor; - } + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalEntry.Entry.class, com.alibaba.otter.canal.protocol.CanalEntry.Entry.Builder.class); + } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_fieldAccessorTable.ensureFieldAccessorsInitialized(com.alibaba.otter.canal.protocol.CanalEntry.Entry.class, - com.alibaba.otter.canal.protocol.CanalEntry.Entry.Builder.class); - } + // Construct using com.alibaba.otter.canal.protocol.CanalEntry.Entry.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - // Construct using - // com.alibaba.otter.canal.protocol.CanalEntry.Entry.newBuilder() - private Builder(){ - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent){ - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getHeaderFieldBuilder(); - } - } - - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - if (headerBuilder_ == null) { - header_ = com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance(); - } else { - headerBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - entryType_ = com.alibaba.otter.canal.protocol.CanalEntry.EntryType.ROWDATA; - bitField0_ = (bitField0_ & ~0x00000002); - storeValue_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor; - } - - public com.alibaba.otter.canal.protocol.CanalEntry.Entry getDefaultInstanceForType() { - return com.alibaba.otter.canal.protocol.CanalEntry.Entry.getDefaultInstance(); - } - - public com.alibaba.otter.canal.protocol.CanalEntry.Entry build() { - com.alibaba.otter.canal.protocol.CanalEntry.Entry result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.alibaba.otter.canal.protocol.CanalEntry.Entry buildPartial() { - com.alibaba.otter.canal.protocol.CanalEntry.Entry result = new com.alibaba.otter.canal.protocol.CanalEntry.Entry(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - if (headerBuilder_ == null) { - result.header_ = header_; - } else { - result.header_ = headerBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.entryType_ = entryType_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.storeValue_ = storeValue_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.Entry) { - return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.Entry) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalEntry.Entry other) { - if (other == com.alibaba.otter.canal.protocol.CanalEntry.Entry.getDefaultInstance()) return this; - if (other.hasHeader()) { - mergeHeader(other.getHeader()); - } - if (other.hasEntryType()) { - setEntryType(other.getEntryType()); - } - if (other.hasStoreValue()) { - setStoreValue(other.getStoreValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.alibaba.otter.canal.protocol.CanalEntry.Entry parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.CanalEntry.Entry) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.alibaba.otter.canal.protocol.CanalEntry.Header header_ = com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder headerBuilder_; - - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-             * *协议头部信息*
-             * 
- */ - public boolean hasHeader() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-             * *协议头部信息*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Header getHeader() { - if (headerBuilder_ == null) { - return header_; - } else { - return headerBuilder_.getMessage(); - } - } - - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-             * *协议头部信息*
-             * 
- */ - public Builder setHeader(com.alibaba.otter.canal.protocol.CanalEntry.Header value) { - if (headerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - header_ = value; - onChanged(); - } else { - headerBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - return this; - } - - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-             * *协议头部信息*
-             * 
- */ - public Builder setHeader(com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder builderForValue) { - if (headerBuilder_ == null) { - header_ = builderForValue.build(); - onChanged(); - } else { - headerBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - return this; - } - - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-             * *协议头部信息*
-             * 
- */ - public Builder mergeHeader(com.alibaba.otter.canal.protocol.CanalEntry.Header value) { - if (headerBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) - && header_ != com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance()) { - header_ = com.alibaba.otter.canal.protocol.CanalEntry.Header.newBuilder(header_) - .mergeFrom(value) - .buildPartial(); - } else { - header_ = value; - } - onChanged(); - } else { - headerBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - return this; - } - - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-             * *协议头部信息*
-             * 
- */ - public Builder clearHeader() { - if (headerBuilder_ == null) { - header_ = com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance(); - onChanged(); - } else { - headerBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-             * *协议头部信息*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder getHeaderBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getHeaderFieldBuilder().getBuilder(); - } - - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-             * *协议头部信息*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder getHeaderOrBuilder() { - if (headerBuilder_ != null) { - return headerBuilder_.getMessageOrBuilder(); - } else { - return header_; - } - } - - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-             * *协议头部信息*
-             * 
- */ - private com.google.protobuf.SingleFieldBuilder getHeaderFieldBuilder() { - if (headerBuilder_ == null) { - headerBuilder_ = new com.google.protobuf.SingleFieldBuilder(getHeader(), - getParentForChildren(), - isClean()); - header_ = null; - } - return headerBuilder_; - } - - private com.alibaba.otter.canal.protocol.CanalEntry.EntryType entryType_ = com.alibaba.otter.canal.protocol.CanalEntry.EntryType.ROWDATA; - - /** - * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; - * - *
-             * *打散后的事件类型*
-             * 
- */ - public boolean hasEntryType() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - - /** - * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; - * - *
-             * *打散后的事件类型*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.EntryType getEntryType() { - return entryType_; - } - - /** - * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; - * - *
-             * *打散后的事件类型*
-             * 
- */ - public Builder setEntryType(com.alibaba.otter.canal.protocol.CanalEntry.EntryType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - entryType_ = value; - onChanged(); - return this; - } - - /** - * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; - * - *
-             * *打散后的事件类型*
-             * 
- */ - public Builder clearEntryType() { - bitField0_ = (bitField0_ & ~0x00000002); - entryType_ = com.alibaba.otter.canal.protocol.CanalEntry.EntryType.ROWDATA; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString storeValue_ = com.google.protobuf.ByteString.EMPTY; - - /** - * optional bytes storeValue = 3; - * - *
-             * *传输的二进制数组*
-             * 
- */ - public boolean hasStoreValue() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - - /** - * optional bytes storeValue = 3; - * - *
-             * *传输的二进制数组*
-             * 
- */ - public com.google.protobuf.ByteString getStoreValue() { - return storeValue_; - } - - /** - * optional bytes storeValue = 3; - * - *
-             * *传输的二进制数组*
-             * 
- */ - public Builder setStoreValue(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - storeValue_ = value; - onChanged(); - return this; - } - - /** - * optional bytes storeValue = 3; - * - *
-             * *传输的二进制数组*
-             * 
- */ - public Builder clearStoreValue() { - bitField0_ = (bitField0_ & ~0x00000004); - storeValue_ = getDefaultInstance().getStoreValue(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Entry) + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getHeaderFieldBuilder(); } + } + private static Builder create() { + return new Builder(); + } - static { - defaultInstance = new Entry(true); - defaultInstance.initFields(); + public Builder clear() { + super.clear(); + if (headerBuilder_ == null) { + header_ = com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance(); + } else { + headerBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); + entryType_ = com.alibaba.otter.canal.protocol.CanalEntry.EntryType.ROWDATA; + bitField0_ = (bitField0_ & ~0x00000002); + storeValue_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } - // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Entry) + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor; + } + + public com.alibaba.otter.canal.protocol.CanalEntry.Entry getDefaultInstanceForType() { + return com.alibaba.otter.canal.protocol.CanalEntry.Entry.getDefaultInstance(); + } + + public com.alibaba.otter.canal.protocol.CanalEntry.Entry build() { + com.alibaba.otter.canal.protocol.CanalEntry.Entry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.alibaba.otter.canal.protocol.CanalEntry.Entry buildPartial() { + com.alibaba.otter.canal.protocol.CanalEntry.Entry result = new com.alibaba.otter.canal.protocol.CanalEntry.Entry(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (headerBuilder_ == null) { + result.header_ = header_; + } else { + result.header_ = headerBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.entryType_ = entryType_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.storeValue_ = storeValue_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.Entry) { + return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.Entry)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalEntry.Entry other) { + if (other == com.alibaba.otter.canal.protocol.CanalEntry.Entry.getDefaultInstance()) return this; + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (other.hasEntryType()) { + setEntryType(other.getEntryType()); + } + if (other.hasStoreValue()) { + setStoreValue(other.getStoreValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.alibaba.otter.canal.protocol.CanalEntry.Entry parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalEntry.Entry) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.alibaba.otter.canal.protocol.CanalEntry.Header header_ = com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Header, com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder, com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder> headerBuilder_; + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+       **协议头部信息*
+       * 
+ */ + public boolean hasHeader() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+       **协议头部信息*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Header getHeader() { + if (headerBuilder_ == null) { + return header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+       **协议头部信息*
+       * 
+ */ + public Builder setHeader(com.alibaba.otter.canal.protocol.CanalEntry.Header value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + onChanged(); + } else { + headerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+       **协议头部信息*
+       * 
+ */ + public Builder setHeader( + com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + onChanged(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+       **协议头部信息*
+       * 
+ */ + public Builder mergeHeader(com.alibaba.otter.canal.protocol.CanalEntry.Header value) { + if (headerBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + header_ != com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance()) { + header_ = + com.alibaba.otter.canal.protocol.CanalEntry.Header.newBuilder(header_).mergeFrom(value).buildPartial(); + } else { + header_ = value; + } + onChanged(); + } else { + headerBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+       **协议头部信息*
+       * 
+ */ + public Builder clearHeader() { + if (headerBuilder_ == null) { + header_ = com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance(); + onChanged(); + } else { + headerBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+       **协议头部信息*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder getHeaderBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+       **协议头部信息*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_; + } + } + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+       **协议头部信息*
+       * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Header, com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder, com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Header, com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder, com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder>( + getHeader(), + getParentForChildren(), + isClean()); + header_ = null; + } + return headerBuilder_; + } + + private com.alibaba.otter.canal.protocol.CanalEntry.EntryType entryType_ = com.alibaba.otter.canal.protocol.CanalEntry.EntryType.ROWDATA; + /** + * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + * + *
+       **打散后的事件类型*
+       * 
+ */ + public boolean hasEntryType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + * + *
+       **打散后的事件类型*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.EntryType getEntryType() { + return entryType_; + } + /** + * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + * + *
+       **打散后的事件类型*
+       * 
+ */ + public Builder setEntryType(com.alibaba.otter.canal.protocol.CanalEntry.EntryType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + entryType_ = value; + onChanged(); + return this; + } + /** + * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + * + *
+       **打散后的事件类型*
+       * 
+ */ + public Builder clearEntryType() { + bitField0_ = (bitField0_ & ~0x00000002); + entryType_ = com.alibaba.otter.canal.protocol.CanalEntry.EntryType.ROWDATA; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString storeValue_ = com.google.protobuf.ByteString.EMPTY; + /** + * optional bytes storeValue = 3; + * + *
+       **传输的二进制数组*
+       * 
+ */ + public boolean hasStoreValue() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bytes storeValue = 3; + * + *
+       **传输的二进制数组*
+       * 
+ */ + public com.google.protobuf.ByteString getStoreValue() { + return storeValue_; + } + /** + * optional bytes storeValue = 3; + * + *
+       **传输的二进制数组*
+       * 
+ */ + public Builder setStoreValue(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + storeValue_ = value; + onChanged(); + return this; + } + /** + * optional bytes storeValue = 3; + * + *
+       **传输的二进制数组*
+       * 
+ */ + public Builder clearStoreValue() { + bitField0_ = (bitField0_ & ~0x00000004); + storeValue_ = getDefaultInstance().getStoreValue(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Entry) } - public interface HeaderOrBuilder extends - // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Header) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 version = 1 [default = 1]; - * - *
-         * *协议的版本号*
-         * 
- */ - boolean hasVersion(); - - /** - * optional int32 version = 1 [default = 1]; - * - *
-         * *协议的版本号*
-         * 
- */ - int getVersion(); - - /** - * optional string logfileName = 2; - * - *
-         * *binlog/redolog 文件名*
-         * 
- */ - boolean hasLogfileName(); - - /** - * optional string logfileName = 2; - * - *
-         * *binlog/redolog 文件名*
-         * 
- */ - java.lang.String getLogfileName(); - - /** - * optional string logfileName = 2; - * - *
-         * *binlog/redolog 文件名*
-         * 
- */ - com.google.protobuf.ByteString getLogfileNameBytes(); - - /** - * optional int64 logfileOffset = 3; - * - *
-         * *binlog/redolog 文件的偏移位置*
-         * 
- */ - boolean hasLogfileOffset(); - - /** - * optional int64 logfileOffset = 3; - * - *
-         * *binlog/redolog 文件的偏移位置*
-         * 
- */ - long getLogfileOffset(); - - /** - * optional int64 serverId = 4; - * - *
-         * *服务端serverId*
-         * 
- */ - boolean hasServerId(); - - /** - * optional int64 serverId = 4; - * - *
-         * *服务端serverId*
-         * 
- */ - long getServerId(); - - /** - * optional string serverenCode = 5; - * - *
-         * * 变更数据的编码 *
-         * 
- */ - boolean hasServerenCode(); - - /** - * optional string serverenCode = 5; - * - *
-         * * 变更数据的编码 *
-         * 
- */ - java.lang.String getServerenCode(); - - /** - * optional string serverenCode = 5; - * - *
-         * * 变更数据的编码 *
-         * 
- */ - com.google.protobuf.ByteString getServerenCodeBytes(); - - /** - * optional int64 executeTime = 6; - * - *
-         * *变更数据的执行时间 *
-         * 
- */ - boolean hasExecuteTime(); - - /** - * optional int64 executeTime = 6; - * - *
-         * *变更数据的执行时间 *
-         * 
- */ - long getExecuteTime(); - - /** - * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; - * - *
-         * * 变更数据的来源*
-         * 
- */ - boolean hasSourceType(); - - /** - * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; - * - *
-         * * 变更数据的来源*
-         * 
- */ - com.alibaba.otter.canal.protocol.CanalEntry.Type getSourceType(); - - /** - * optional string schemaName = 8; - * - *
-         * * 变更数据的schemaname*
-         * 
- */ - boolean hasSchemaName(); - - /** - * optional string schemaName = 8; - * - *
-         * * 变更数据的schemaname*
-         * 
- */ - java.lang.String getSchemaName(); - - /** - * optional string schemaName = 8; - * - *
-         * * 变更数据的schemaname*
-         * 
- */ - com.google.protobuf.ByteString getSchemaNameBytes(); - - /** - * optional string tableName = 9; - * - *
-         * *变更数据的tablename*
-         * 
- */ - boolean hasTableName(); - - /** - * optional string tableName = 9; - * - *
-         * *变更数据的tablename*
-         * 
- */ - java.lang.String getTableName(); - - /** - * optional string tableName = 9; - * - *
-         * *变更数据的tablename*
-         * 
- */ - com.google.protobuf.ByteString getTableNameBytes(); - - /** - * optional int64 eventLength = 10; - * - *
-         * *每个event的长度*
-         * 
- */ - boolean hasEventLength(); - - /** - * optional int64 eventLength = 10; - * - *
-         * *每个event的长度*
-         * 
- */ - long getEventLength(); - - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; - * - *
-         * *数据变更类型*
-         * 
- */ - boolean hasEventType(); - - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; - * - *
-         * *数据变更类型*
-         * 
- */ - com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-         * *预留扩展*
-         * 
- */ - java.util.List getPropsList(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-         * *预留扩展*
-         * 
- */ - com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-         * *预留扩展*
-         * 
- */ - int getPropsCount(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-         * *预留扩展*
-         * 
- */ - java.util.List getPropsOrBuilderList(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-         * *预留扩展*
-         * 
- */ - com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder(int index); + static { + defaultInstance = new Entry(true); + defaultInstance.initFields(); } + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Entry) + } + + public interface HeaderOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Header) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 version = 1 [default = 1]; + * + *
+     **协议的版本号*
+     * 
+ */ + boolean hasVersion(); + /** + * optional int32 version = 1 [default = 1]; + * + *
+     **协议的版本号*
+     * 
+ */ + int getVersion(); + + /** + * optional string logfileName = 2; + * + *
+     **binlog/redolog 文件名*
+     * 
+ */ + boolean hasLogfileName(); + /** + * optional string logfileName = 2; + * + *
+     **binlog/redolog 文件名*
+     * 
+ */ + java.lang.String getLogfileName(); + /** + * optional string logfileName = 2; + * + *
+     **binlog/redolog 文件名*
+     * 
+ */ + com.google.protobuf.ByteString + getLogfileNameBytes(); + + /** + * optional int64 logfileOffset = 3; + * + *
+     **binlog/redolog 文件的偏移位置*
+     * 
+ */ + boolean hasLogfileOffset(); + /** + * optional int64 logfileOffset = 3; + * + *
+     **binlog/redolog 文件的偏移位置*
+     * 
+ */ + long getLogfileOffset(); + + /** + * optional int64 serverId = 4; + * + *
+     **服务端serverId*
+     * 
+ */ + boolean hasServerId(); + /** + * optional int64 serverId = 4; + * + *
+     **服务端serverId*
+     * 
+ */ + long getServerId(); + + /** + * optional string serverenCode = 5; + * + *
+     ** 变更数据的编码 *
+     * 
+ */ + boolean hasServerenCode(); + /** + * optional string serverenCode = 5; + * + *
+     ** 变更数据的编码 *
+     * 
+ */ + java.lang.String getServerenCode(); + /** + * optional string serverenCode = 5; + * + *
+     ** 变更数据的编码 *
+     * 
+ */ + com.google.protobuf.ByteString + getServerenCodeBytes(); + + /** + * optional int64 executeTime = 6; + * + *
+     **变更数据的执行时间 *
+     * 
+ */ + boolean hasExecuteTime(); + /** + * optional int64 executeTime = 6; + * + *
+     **变更数据的执行时间 *
+     * 
+ */ + long getExecuteTime(); + + /** + * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + * + *
+     ** 变更数据的来源*
+     * 
+ */ + boolean hasSourceType(); + /** + * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + * + *
+     ** 变更数据的来源*
+     * 
+ */ + com.alibaba.otter.canal.protocol.CanalEntry.Type getSourceType(); + + /** + * optional string schemaName = 8; + * + *
+     ** 变更数据的schemaname*
+     * 
+ */ + boolean hasSchemaName(); + /** + * optional string schemaName = 8; + * + *
+     ** 变更数据的schemaname*
+     * 
+ */ + java.lang.String getSchemaName(); + /** + * optional string schemaName = 8; + * + *
+     ** 变更数据的schemaname*
+     * 
+ */ + com.google.protobuf.ByteString + getSchemaNameBytes(); + + /** + * optional string tableName = 9; + * + *
+     **变更数据的tablename*
+     * 
+ */ + boolean hasTableName(); + /** + * optional string tableName = 9; + * + *
+     **变更数据的tablename*
+     * 
+ */ + java.lang.String getTableName(); + /** + * optional string tableName = 9; + * + *
+     **变更数据的tablename*
+     * 
+ */ + com.google.protobuf.ByteString + getTableNameBytes(); + + /** + * optional int64 eventLength = 10; + * + *
+     **每个event的长度*
+     * 
+ */ + boolean hasEventLength(); + /** + * optional int64 eventLength = 10; + * + *
+     **每个event的长度*
+     * 
+ */ + long getEventLength(); + + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + * + *
+     **数据变更类型*
+     * 
+ */ + boolean hasEventType(); + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + * + *
+     **数据变更类型*
+     * 
+ */ + com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType(); + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+     **预留扩展*
+     * 
+ */ + java.util.List + getPropsList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+     **预留扩展*
+     * 
+ */ + com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+     **预留扩展*
+     * 
+ */ + int getPropsCount(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+     **预留扩展*
+     * 
+ */ + java.util.List + getPropsOrBuilderList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+     **预留扩展*
+     * 
+ */ + com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( + int index); + + /** + * optional string gtid = 13; + * + *
+     **当前事务的gitd*
+     * 
+ */ + boolean hasGtid(); + /** + * optional string gtid = 13; + * + *
+     **当前事务的gitd*
+     * 
+ */ + java.lang.String getGtid(); + /** + * optional string gtid = 13; + * + *
+     **当前事务的gitd*
+     * 
+ */ + com.google.protobuf.ByteString + getGtidBytes(); + } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Header} + * + *
+   **message Header*
+   * 
+ */ + public static final class Header extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Header) + HeaderOrBuilder { + // Use Header.newBuilder() to construct. + private Header(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private Header(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final Header defaultInstance; + public static Header getDefaultInstance() { + return defaultInstance; + } + + public Header getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Header( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + version_ = input.readInt32(); + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + logfileName_ = bs; + break; + } + case 24: { + bitField0_ |= 0x00000004; + logfileOffset_ = input.readInt64(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + serverId_ = input.readInt64(); + break; + } + case 42: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000010; + serverenCode_ = bs; + break; + } + case 48: { + bitField0_ |= 0x00000020; + executeTime_ = input.readInt64(); + break; + } + case 56: { + int rawValue = input.readEnum(); + com.alibaba.otter.canal.protocol.CanalEntry.Type value = com.alibaba.otter.canal.protocol.CanalEntry.Type.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(7, rawValue); + } else { + bitField0_ |= 0x00000040; + sourceType_ = value; + } + break; + } + case 66: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000080; + schemaName_ = bs; + break; + } + case 74: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000100; + tableName_ = bs; + break; + } + case 80: { + bitField0_ |= 0x00000200; + eventLength_ = input.readInt64(); + break; + } + case 88: { + int rawValue = input.readEnum(); + com.alibaba.otter.canal.protocol.CanalEntry.EventType value = com.alibaba.otter.canal.protocol.CanalEntry.EventType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(11, rawValue); + } else { + bitField0_ |= 0x00000400; + eventType_ = value; + } + break; + } + case 98: { + if (!((mutable_bitField0_ & 0x00000800) == 0x00000800)) { + props_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000800; + } + props_.add(input.readMessage(com.alibaba.otter.canal.protocol.CanalEntry.Pair.PARSER, extensionRegistry)); + break; + } + case 106: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000800; + gtid_ = bs; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000800) == 0x00000800)) { + props_ = java.util.Collections.unmodifiableList(props_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalEntry.Header.class, com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder.class); + } + + public static com.google.protobuf.Parser
PARSER = + new com.google.protobuf.AbstractParser
() { + public Header parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Header(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser
getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int VERSION_FIELD_NUMBER = 1; + private int version_; + /** + * optional int32 version = 1 [default = 1]; + * + *
+     **协议的版本号*
+     * 
+ */ + public boolean hasVersion() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 version = 1 [default = 1]; + * + *
+     **协议的版本号*
+     * 
+ */ + public int getVersion() { + return version_; + } + + public static final int LOGFILENAME_FIELD_NUMBER = 2; + private java.lang.Object logfileName_; + /** + * optional string logfileName = 2; + * + *
+     **binlog/redolog 文件名*
+     * 
+ */ + public boolean hasLogfileName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string logfileName = 2; + * + *
+     **binlog/redolog 文件名*
+     * 
+ */ + public java.lang.String getLogfileName() { + java.lang.Object ref = logfileName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + logfileName_ = s; + } + return s; + } + } + /** + * optional string logfileName = 2; + * + *
+     **binlog/redolog 文件名*
+     * 
+ */ + public com.google.protobuf.ByteString + getLogfileNameBytes() { + java.lang.Object ref = logfileName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + logfileName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOGFILEOFFSET_FIELD_NUMBER = 3; + private long logfileOffset_; + /** + * optional int64 logfileOffset = 3; + * + *
+     **binlog/redolog 文件的偏移位置*
+     * 
+ */ + public boolean hasLogfileOffset() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional int64 logfileOffset = 3; + * + *
+     **binlog/redolog 文件的偏移位置*
+     * 
+ */ + public long getLogfileOffset() { + return logfileOffset_; + } + + public static final int SERVERID_FIELD_NUMBER = 4; + private long serverId_; + /** + * optional int64 serverId = 4; + * + *
+     **服务端serverId*
+     * 
+ */ + public boolean hasServerId() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int64 serverId = 4; + * + *
+     **服务端serverId*
+     * 
+ */ + public long getServerId() { + return serverId_; + } + + public static final int SERVERENCODE_FIELD_NUMBER = 5; + private java.lang.Object serverenCode_; + /** + * optional string serverenCode = 5; + * + *
+     ** 变更数据的编码 *
+     * 
+ */ + public boolean hasServerenCode() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional string serverenCode = 5; + * + *
+     ** 变更数据的编码 *
+     * 
+ */ + public java.lang.String getServerenCode() { + java.lang.Object ref = serverenCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + serverenCode_ = s; + } + return s; + } + } + /** + * optional string serverenCode = 5; + * + *
+     ** 变更数据的编码 *
+     * 
+ */ + public com.google.protobuf.ByteString + getServerenCodeBytes() { + java.lang.Object ref = serverenCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + serverenCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXECUTETIME_FIELD_NUMBER = 6; + private long executeTime_; + /** + * optional int64 executeTime = 6; + * + *
+     **变更数据的执行时间 *
+     * 
+ */ + public boolean hasExecuteTime() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional int64 executeTime = 6; + * + *
+     **变更数据的执行时间 *
+     * 
+ */ + public long getExecuteTime() { + return executeTime_; + } + + public static final int SOURCETYPE_FIELD_NUMBER = 7; + private com.alibaba.otter.canal.protocol.CanalEntry.Type sourceType_; + /** + * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + * + *
+     ** 变更数据的来源*
+     * 
+ */ + public boolean hasSourceType() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + * + *
+     ** 变更数据的来源*
+     * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Type getSourceType() { + return sourceType_; + } + + public static final int SCHEMANAME_FIELD_NUMBER = 8; + private java.lang.Object schemaName_; + /** + * optional string schemaName = 8; + * + *
+     ** 变更数据的schemaname*
+     * 
+ */ + public boolean hasSchemaName() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional string schemaName = 8; + * + *
+     ** 变更数据的schemaname*
+     * 
+ */ + public java.lang.String getSchemaName() { + java.lang.Object ref = schemaName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + schemaName_ = s; + } + return s; + } + } + /** + * optional string schemaName = 8; + * + *
+     ** 变更数据的schemaname*
+     * 
+ */ + public com.google.protobuf.ByteString + getSchemaNameBytes() { + java.lang.Object ref = schemaName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schemaName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TABLENAME_FIELD_NUMBER = 9; + private java.lang.Object tableName_; + /** + * optional string tableName = 9; + * + *
+     **变更数据的tablename*
+     * 
+ */ + public boolean hasTableName() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional string tableName = 9; + * + *
+     **变更数据的tablename*
+     * 
+ */ + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + tableName_ = s; + } + return s; + } + } + /** + * optional string tableName = 9; + * + *
+     **变更数据的tablename*
+     * 
+ */ + public com.google.protobuf.ByteString + getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EVENTLENGTH_FIELD_NUMBER = 10; + private long eventLength_; + /** + * optional int64 eventLength = 10; + * + *
+     **每个event的长度*
+     * 
+ */ + public boolean hasEventLength() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional int64 eventLength = 10; + * + *
+     **每个event的长度*
+     * 
+ */ + public long getEventLength() { + return eventLength_; + } + + public static final int EVENTTYPE_FIELD_NUMBER = 11; + private com.alibaba.otter.canal.protocol.CanalEntry.EventType eventType_; + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + * + *
+     **数据变更类型*
+     * 
+ */ + public boolean hasEventType() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + * + *
+     **数据变更类型*
+     * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType() { + return eventType_; + } + + public static final int PROPS_FIELD_NUMBER = 12; + private java.util.List props_; + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+     **预留扩展*
+     * 
+ */ + public java.util.List getPropsList() { + return props_; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+     **预留扩展*
+     * 
+ */ + public java.util.List + getPropsOrBuilderList() { + return props_; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+     **预留扩展*
+     * 
+ */ + public int getPropsCount() { + return props_.size(); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+     **预留扩展*
+     * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { + return props_.get(index); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+     **预留扩展*
+     * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( + int index) { + return props_.get(index); + } + + public static final int GTID_FIELD_NUMBER = 13; + private java.lang.Object gtid_; + /** + * optional string gtid = 13; + * + *
+     **当前事务的gitd*
+     * 
+ */ + public boolean hasGtid() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional string gtid = 13; + * + *
+     **当前事务的gitd*
+     * 
+ */ + public java.lang.String getGtid() { + java.lang.Object ref = gtid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + gtid_ = s; + } + return s; + } + } + /** + * optional string gtid = 13; + * + *
+     **当前事务的gitd*
+     * 
+ */ + public com.google.protobuf.ByteString + getGtidBytes() { + java.lang.Object ref = gtid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gtid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + version_ = 1; + logfileName_ = ""; + logfileOffset_ = 0L; + serverId_ = 0L; + serverenCode_ = ""; + executeTime_ = 0L; + sourceType_ = com.alibaba.otter.canal.protocol.CanalEntry.Type.MYSQL; + schemaName_ = ""; + tableName_ = ""; + eventLength_ = 0L; + eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; + props_ = java.util.Collections.emptyList(); + gtid_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, version_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getLogfileNameBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt64(3, logfileOffset_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt64(4, serverId_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBytes(5, getServerenCodeBytes()); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeInt64(6, executeTime_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeEnum(7, sourceType_.getNumber()); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeBytes(8, getSchemaNameBytes()); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeBytes(9, getTableNameBytes()); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeInt64(10, eventLength_); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + output.writeEnum(11, eventType_.getNumber()); + } + for (int i = 0; i < props_.size(); i++) { + output.writeMessage(12, props_.get(i)); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + output.writeBytes(13, getGtidBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, version_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getLogfileNameBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, logfileOffset_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, serverId_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(5, getServerenCodeBytes()); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(6, executeTime_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, sourceType_.getNumber()); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(8, getSchemaNameBytes()); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(9, getTableNameBytes()); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(10, eventLength_); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(11, eventType_.getNumber()); + } + for (int i = 0; i < props_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, props_.get(i)); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(13, getGtidBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.Header prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } /** * Protobuf type {@code com.alibaba.otter.canal.protocol.Header} * *
-     * *message Header*
+     **message Header*
      * 
*/ - public static final class Header extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Header) - HeaderOrBuilder { - - // Use Header.newBuilder() to construct. - private Header(com.google.protobuf.GeneratedMessage.Builder builder){ - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - - private Header(boolean noInit){ - this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - - private static final Header defaultInstance; - - public static Header getDefaultInstance() { - return defaultInstance; - } - - public Header getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Header(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException{ - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - version_ = input.readInt32(); - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - logfileName_ = bs; - break; - } - case 24: { - bitField0_ |= 0x00000004; - logfileOffset_ = input.readInt64(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - serverId_ = input.readInt64(); - break; - } - case 42: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000010; - serverenCode_ = bs; - break; - } - case 48: { - bitField0_ |= 0x00000020; - executeTime_ = input.readInt64(); - break; - } - case 56: { - int rawValue = input.readEnum(); - com.alibaba.otter.canal.protocol.CanalEntry.Type value = com.alibaba.otter.canal.protocol.CanalEntry.Type.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(7, rawValue); - } else { - bitField0_ |= 0x00000040; - sourceType_ = value; - } - break; - } - case 66: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000080; - schemaName_ = bs; - break; - } - case 74: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000100; - tableName_ = bs; - break; - } - case 80: { - bitField0_ |= 0x00000200; - eventLength_ = input.readInt64(); - break; - } - case 88: { - int rawValue = input.readEnum(); - com.alibaba.otter.canal.protocol.CanalEntry.EventType value = com.alibaba.otter.canal.protocol.CanalEntry.EventType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(11, rawValue); - } else { - bitField0_ |= 0x00000400; - eventType_ = value; - } - break; - } - case 98: { - if (!((mutable_bitField0_ & 0x00000800) == 0x00000800)) { - props_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000800; - } - props_.add(input.readMessage(com.alibaba.otter.canal.protocol.CanalEntry.Pair.PARSER, - extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000800) == 0x00000800)) { - props_ = java.util.Collections.unmodifiableList(props_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_fieldAccessorTable.ensureFieldAccessorsInitialized(com.alibaba.otter.canal.protocol.CanalEntry.Header.class, - com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder.class); - } - - public static com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser
() { - - public Header parsePartialFrom(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Header(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser
getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int VERSION_FIELD_NUMBER = 1; - private int version_; - - /** - * optional int32 version = 1 [default = 1]; - * - *
-         * *协议的版本号*
-         * 
- */ - public boolean hasVersion() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - - /** - * optional int32 version = 1 [default = 1]; - * - *
-         * *协议的版本号*
-         * 
- */ - public int getVersion() { - return version_; - } - - public static final int LOGFILENAME_FIELD_NUMBER = 2; - private java.lang.Object logfileName_; - - /** - * optional string logfileName = 2; - * - *
-         * *binlog/redolog 文件名*
-         * 
- */ - public boolean hasLogfileName() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - - /** - * optional string logfileName = 2; - * - *
-         * *binlog/redolog 文件名*
-         * 
- */ - public java.lang.String getLogfileName() { - java.lang.Object ref = logfileName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - logfileName_ = s; - } - return s; - } - } - - /** - * optional string logfileName = 2; - * - *
-         * *binlog/redolog 文件名*
-         * 
- */ - public com.google.protobuf.ByteString getLogfileNameBytes() { - java.lang.Object ref = logfileName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - logfileName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOGFILEOFFSET_FIELD_NUMBER = 3; - private long logfileOffset_; - - /** - * optional int64 logfileOffset = 3; - * - *
-         * *binlog/redolog 文件的偏移位置*
-         * 
- */ - public boolean hasLogfileOffset() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - - /** - * optional int64 logfileOffset = 3; - * - *
-         * *binlog/redolog 文件的偏移位置*
-         * 
- */ - public long getLogfileOffset() { - return logfileOffset_; - } - - public static final int SERVERID_FIELD_NUMBER = 4; - private long serverId_; - - /** - * optional int64 serverId = 4; - * - *
-         * *服务端serverId*
-         * 
- */ - public boolean hasServerId() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - - /** - * optional int64 serverId = 4; - * - *
-         * *服务端serverId*
-         * 
- */ - public long getServerId() { - return serverId_; - } - - public static final int SERVERENCODE_FIELD_NUMBER = 5; - private java.lang.Object serverenCode_; - - /** - * optional string serverenCode = 5; - * - *
-         * * 变更数据的编码 *
-         * 
- */ - public boolean hasServerenCode() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - - /** - * optional string serverenCode = 5; - * - *
-         * * 变更数据的编码 *
-         * 
- */ - public java.lang.String getServerenCode() { - java.lang.Object ref = serverenCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - serverenCode_ = s; - } - return s; - } - } - - /** - * optional string serverenCode = 5; - * - *
-         * * 变更数据的编码 *
-         * 
- */ - public com.google.protobuf.ByteString getServerenCodeBytes() { - java.lang.Object ref = serverenCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serverenCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXECUTETIME_FIELD_NUMBER = 6; - private long executeTime_; - - /** - * optional int64 executeTime = 6; - * - *
-         * *变更数据的执行时间 *
-         * 
- */ - public boolean hasExecuteTime() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - - /** - * optional int64 executeTime = 6; - * - *
-         * *变更数据的执行时间 *
-         * 
- */ - public long getExecuteTime() { - return executeTime_; - } - - public static final int SOURCETYPE_FIELD_NUMBER = 7; - private com.alibaba.otter.canal.protocol.CanalEntry.Type sourceType_; - - /** - * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; - * - *
-         * * 变更数据的来源*
-         * 
- */ - public boolean hasSourceType() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - - /** - * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; - * - *
-         * * 变更数据的来源*
-         * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Type getSourceType() { - return sourceType_; - } - - public static final int SCHEMANAME_FIELD_NUMBER = 8; - private java.lang.Object schemaName_; - - /** - * optional string schemaName = 8; - * - *
-         * * 变更数据的schemaname*
-         * 
- */ - public boolean hasSchemaName() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - - /** - * optional string schemaName = 8; - * - *
-         * * 变更数据的schemaname*
-         * 
- */ - public java.lang.String getSchemaName() { - java.lang.Object ref = schemaName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - schemaName_ = s; - } - return s; - } - } - - /** - * optional string schemaName = 8; - * - *
-         * * 变更数据的schemaname*
-         * 
- */ - public com.google.protobuf.ByteString getSchemaNameBytes() { - java.lang.Object ref = schemaName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - schemaName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TABLENAME_FIELD_NUMBER = 9; - private java.lang.Object tableName_; - - /** - * optional string tableName = 9; - * - *
-         * *变更数据的tablename*
-         * 
- */ - public boolean hasTableName() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - - /** - * optional string tableName = 9; - * - *
-         * *变更数据的tablename*
-         * 
- */ - public java.lang.String getTableName() { - java.lang.Object ref = tableName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - tableName_ = s; - } - return s; - } - } - - /** - * optional string tableName = 9; - * - *
-         * *变更数据的tablename*
-         * 
- */ - public com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - tableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EVENTLENGTH_FIELD_NUMBER = 10; - private long eventLength_; - - /** - * optional int64 eventLength = 10; - * - *
-         * *每个event的长度*
-         * 
- */ - public boolean hasEventLength() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - - /** - * optional int64 eventLength = 10; - * - *
-         * *每个event的长度*
-         * 
- */ - public long getEventLength() { - return eventLength_; - } - - public static final int EVENTTYPE_FIELD_NUMBER = 11; - private com.alibaba.otter.canal.protocol.CanalEntry.EventType eventType_; - - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; - * - *
-         * *数据变更类型*
-         * 
- */ - public boolean hasEventType() { - return ((bitField0_ & 0x00000400) == 0x00000400); - } - - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; - * - *
-         * *数据变更类型*
-         * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType() { - return eventType_; - } - - public static final int PROPS_FIELD_NUMBER = 12; - private java.util.List props_; - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-         * *预留扩展*
-         * 
- */ - public java.util.List getPropsList() { - return props_; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-         * *预留扩展*
-         * 
- */ - public java.util.List getPropsOrBuilderList() { - return props_; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-         * *预留扩展*
-         * 
- */ - public int getPropsCount() { - return props_.size(); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-         * *预留扩展*
-         * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { - return props_.get(index); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-         * *预留扩展*
-         * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder(int index) { - return props_.get(index); - } - - private void initFields() { - version_ = 1; - logfileName_ = ""; - logfileOffset_ = 0L; - serverId_ = 0L; - serverenCode_ = ""; - executeTime_ = 0L; - sourceType_ = com.alibaba.otter.canal.protocol.CanalEntry.Type.MYSQL; - schemaName_ = ""; - tableName_ = ""; - eventLength_ = 0L; - eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; - props_ = java.util.Collections.emptyList(); - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, version_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getLogfileNameBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt64(3, logfileOffset_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeInt64(4, serverId_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBytes(5, getServerenCodeBytes()); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeInt64(6, executeTime_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeEnum(7, sourceType_.getNumber()); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeBytes(8, getSchemaNameBytes()); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeBytes(9, getTableNameBytes()); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - output.writeInt64(10, eventLength_); - } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - output.writeEnum(11, eventType_.getNumber()); - } - for (int i = 0; i < props_.size(); i++) { - output.writeMessage(12, props_.get(i)); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, version_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, getLogfileNameBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, logfileOffset_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, serverId_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(5, getServerenCodeBytes()); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, executeTime_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, sourceType_.getNumber()); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(8, getSchemaNameBytes()); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(9, getTableNameBytes()); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(10, eventLength_); - } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, eventType_.getNumber()); - } - for (int i = 0; i < props_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, props_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - - @java.lang.Override - protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom(com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom(byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom(java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseDelimitedFrom(java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Header parseFrom(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { - return Builder.create(); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.Header prototype) { - return newBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return newBuilder(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.Header} - * - *
-         * *message Header*
-         * 
- */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Header) com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder { - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_fieldAccessorTable.ensureFieldAccessorsInitialized(com.alibaba.otter.canal.protocol.CanalEntry.Header.class, - com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder.class); - } - - // Construct using - // com.alibaba.otter.canal.protocol.CanalEntry.Header.newBuilder() - private Builder(){ - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent){ - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getPropsFieldBuilder(); - } - } - - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - version_ = 1; - bitField0_ = (bitField0_ & ~0x00000001); - logfileName_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - logfileOffset_ = 0L; - bitField0_ = (bitField0_ & ~0x00000004); - serverId_ = 0L; - bitField0_ = (bitField0_ & ~0x00000008); - serverenCode_ = ""; - bitField0_ = (bitField0_ & ~0x00000010); - executeTime_ = 0L; - bitField0_ = (bitField0_ & ~0x00000020); - sourceType_ = com.alibaba.otter.canal.protocol.CanalEntry.Type.MYSQL; - bitField0_ = (bitField0_ & ~0x00000040); - schemaName_ = ""; - bitField0_ = (bitField0_ & ~0x00000080); - tableName_ = ""; - bitField0_ = (bitField0_ & ~0x00000100); - eventLength_ = 0L; - bitField0_ = (bitField0_ & ~0x00000200); - eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; - bitField0_ = (bitField0_ & ~0x00000400); - if (propsBuilder_ == null) { - props_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); - } else { - propsBuilder_.clear(); - } - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_descriptor; - } - - public com.alibaba.otter.canal.protocol.CanalEntry.Header getDefaultInstanceForType() { - return com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance(); - } - - public com.alibaba.otter.canal.protocol.CanalEntry.Header build() { - com.alibaba.otter.canal.protocol.CanalEntry.Header result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.alibaba.otter.canal.protocol.CanalEntry.Header buildPartial() { - com.alibaba.otter.canal.protocol.CanalEntry.Header result = new com.alibaba.otter.canal.protocol.CanalEntry.Header(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.version_ = version_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.logfileName_ = logfileName_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.logfileOffset_ = logfileOffset_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.serverId_ = serverId_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.serverenCode_ = serverenCode_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; - } - result.executeTime_ = executeTime_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000040; - } - result.sourceType_ = sourceType_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000080; - } - result.schemaName_ = schemaName_; - if (((from_bitField0_ & 0x00000100) == 0x00000100)) { - to_bitField0_ |= 0x00000100; - } - result.tableName_ = tableName_; - if (((from_bitField0_ & 0x00000200) == 0x00000200)) { - to_bitField0_ |= 0x00000200; - } - result.eventLength_ = eventLength_; - if (((from_bitField0_ & 0x00000400) == 0x00000400)) { - to_bitField0_ |= 0x00000400; - } - result.eventType_ = eventType_; - if (propsBuilder_ == null) { - if (((bitField0_ & 0x00000800) == 0x00000800)) { - props_ = java.util.Collections.unmodifiableList(props_); - bitField0_ = (bitField0_ & ~0x00000800); - } - result.props_ = props_; - } else { - result.props_ = propsBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.Header) { - return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.Header) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalEntry.Header other) { - if (other == com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance()) return this; - if (other.hasVersion()) { - setVersion(other.getVersion()); - } - if (other.hasLogfileName()) { - bitField0_ |= 0x00000002; - logfileName_ = other.logfileName_; - onChanged(); - } - if (other.hasLogfileOffset()) { - setLogfileOffset(other.getLogfileOffset()); - } - if (other.hasServerId()) { - setServerId(other.getServerId()); - } - if (other.hasServerenCode()) { - bitField0_ |= 0x00000010; - serverenCode_ = other.serverenCode_; - onChanged(); - } - if (other.hasExecuteTime()) { - setExecuteTime(other.getExecuteTime()); - } - if (other.hasSourceType()) { - setSourceType(other.getSourceType()); - } - if (other.hasSchemaName()) { - bitField0_ |= 0x00000080; - schemaName_ = other.schemaName_; - onChanged(); - } - if (other.hasTableName()) { - bitField0_ |= 0x00000100; - tableName_ = other.tableName_; - onChanged(); - } - if (other.hasEventLength()) { - setEventLength(other.getEventLength()); - } - if (other.hasEventType()) { - setEventType(other.getEventType()); - } - if (propsBuilder_ == null) { - if (!other.props_.isEmpty()) { - if (props_.isEmpty()) { - props_ = other.props_; - bitField0_ = (bitField0_ & ~0x00000800); - } else { - ensurePropsIsMutable(); - props_.addAll(other.props_); - } - onChanged(); - } - } else { - if (!other.props_.isEmpty()) { - if (propsBuilder_.isEmpty()) { - propsBuilder_.dispose(); - propsBuilder_ = null; - props_ = other.props_; - bitField0_ = (bitField0_ & ~0x00000800); - propsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getPropsFieldBuilder() : null; - } else { - propsBuilder_.addAllMessages(other.props_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.alibaba.otter.canal.protocol.CanalEntry.Header parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.CanalEntry.Header) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private int version_ = 1; - - /** - * optional int32 version = 1 [default = 1]; - * - *
-             * *协议的版本号*
-             * 
- */ - public boolean hasVersion() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - - /** - * optional int32 version = 1 [default = 1]; - * - *
-             * *协议的版本号*
-             * 
- */ - public int getVersion() { - return version_; - } - - /** - * optional int32 version = 1 [default = 1]; - * - *
-             * *协议的版本号*
-             * 
- */ - public Builder setVersion(int value) { - bitField0_ |= 0x00000001; - version_ = value; - onChanged(); - return this; - } - - /** - * optional int32 version = 1 [default = 1]; - * - *
-             * *协议的版本号*
-             * 
- */ - public Builder clearVersion() { - bitField0_ = (bitField0_ & ~0x00000001); - version_ = 1; - onChanged(); - return this; - } - - private java.lang.Object logfileName_ = ""; - - /** - * optional string logfileName = 2; - * - *
-             * *binlog/redolog 文件名*
-             * 
- */ - public boolean hasLogfileName() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - - /** - * optional string logfileName = 2; - * - *
-             * *binlog/redolog 文件名*
-             * 
- */ - public java.lang.String getLogfileName() { - java.lang.Object ref = logfileName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - logfileName_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * optional string logfileName = 2; - * - *
-             * *binlog/redolog 文件名*
-             * 
- */ - public com.google.protobuf.ByteString getLogfileNameBytes() { - java.lang.Object ref = logfileName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - logfileName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * optional string logfileName = 2; - * - *
-             * *binlog/redolog 文件名*
-             * 
- */ - public Builder setLogfileName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - logfileName_ = value; - onChanged(); - return this; - } - - /** - * optional string logfileName = 2; - * - *
-             * *binlog/redolog 文件名*
-             * 
- */ - public Builder clearLogfileName() { - bitField0_ = (bitField0_ & ~0x00000002); - logfileName_ = getDefaultInstance().getLogfileName(); - onChanged(); - return this; - } - - /** - * optional string logfileName = 2; - * - *
-             * *binlog/redolog 文件名*
-             * 
- */ - public Builder setLogfileNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - logfileName_ = value; - onChanged(); - return this; - } - - private long logfileOffset_; - - /** - * optional int64 logfileOffset = 3; - * - *
-             * *binlog/redolog 文件的偏移位置*
-             * 
- */ - public boolean hasLogfileOffset() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - - /** - * optional int64 logfileOffset = 3; - * - *
-             * *binlog/redolog 文件的偏移位置*
-             * 
- */ - public long getLogfileOffset() { - return logfileOffset_; - } - - /** - * optional int64 logfileOffset = 3; - * - *
-             * *binlog/redolog 文件的偏移位置*
-             * 
- */ - public Builder setLogfileOffset(long value) { - bitField0_ |= 0x00000004; - logfileOffset_ = value; - onChanged(); - return this; - } - - /** - * optional int64 logfileOffset = 3; - * - *
-             * *binlog/redolog 文件的偏移位置*
-             * 
- */ - public Builder clearLogfileOffset() { - bitField0_ = (bitField0_ & ~0x00000004); - logfileOffset_ = 0L; - onChanged(); - return this; - } - - private long serverId_; - - /** - * optional int64 serverId = 4; - * - *
-             * *服务端serverId*
-             * 
- */ - public boolean hasServerId() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - - /** - * optional int64 serverId = 4; - * - *
-             * *服务端serverId*
-             * 
- */ - public long getServerId() { - return serverId_; - } - - /** - * optional int64 serverId = 4; - * - *
-             * *服务端serverId*
-             * 
- */ - public Builder setServerId(long value) { - bitField0_ |= 0x00000008; - serverId_ = value; - onChanged(); - return this; - } - - /** - * optional int64 serverId = 4; - * - *
-             * *服务端serverId*
-             * 
- */ - public Builder clearServerId() { - bitField0_ = (bitField0_ & ~0x00000008); - serverId_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object serverenCode_ = ""; - - /** - * optional string serverenCode = 5; - * - *
-             * * 变更数据的编码 *
-             * 
- */ - public boolean hasServerenCode() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - - /** - * optional string serverenCode = 5; - * - *
-             * * 变更数据的编码 *
-             * 
- */ - public java.lang.String getServerenCode() { - java.lang.Object ref = serverenCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - serverenCode_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * optional string serverenCode = 5; - * - *
-             * * 变更数据的编码 *
-             * 
- */ - public com.google.protobuf.ByteString getServerenCodeBytes() { - java.lang.Object ref = serverenCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serverenCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * optional string serverenCode = 5; - * - *
-             * * 变更数据的编码 *
-             * 
- */ - public Builder setServerenCode(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - serverenCode_ = value; - onChanged(); - return this; - } - - /** - * optional string serverenCode = 5; - * - *
-             * * 变更数据的编码 *
-             * 
- */ - public Builder clearServerenCode() { - bitField0_ = (bitField0_ & ~0x00000010); - serverenCode_ = getDefaultInstance().getServerenCode(); - onChanged(); - return this; - } - - /** - * optional string serverenCode = 5; - * - *
-             * * 变更数据的编码 *
-             * 
- */ - public Builder setServerenCodeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - serverenCode_ = value; - onChanged(); - return this; - } - - private long executeTime_; - - /** - * optional int64 executeTime = 6; - * - *
-             * *变更数据的执行时间 *
-             * 
- */ - public boolean hasExecuteTime() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - - /** - * optional int64 executeTime = 6; - * - *
-             * *变更数据的执行时间 *
-             * 
- */ - public long getExecuteTime() { - return executeTime_; - } - - /** - * optional int64 executeTime = 6; - * - *
-             * *变更数据的执行时间 *
-             * 
- */ - public Builder setExecuteTime(long value) { - bitField0_ |= 0x00000020; - executeTime_ = value; - onChanged(); - return this; - } - - /** - * optional int64 executeTime = 6; - * - *
-             * *变更数据的执行时间 *
-             * 
- */ - public Builder clearExecuteTime() { - bitField0_ = (bitField0_ & ~0x00000020); - executeTime_ = 0L; - onChanged(); - return this; - } - - private com.alibaba.otter.canal.protocol.CanalEntry.Type sourceType_ = com.alibaba.otter.canal.protocol.CanalEntry.Type.MYSQL; - - /** - * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; - * - *
-             * * 变更数据的来源*
-             * 
- */ - public boolean hasSourceType() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - - /** - * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; - * - *
-             * * 变更数据的来源*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Type getSourceType() { - return sourceType_; - } - - /** - * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; - * - *
-             * * 变更数据的来源*
-             * 
- */ - public Builder setSourceType(com.alibaba.otter.canal.protocol.CanalEntry.Type value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000040; - sourceType_ = value; - onChanged(); - return this; - } - - /** - * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; - * - *
-             * * 变更数据的来源*
-             * 
- */ - public Builder clearSourceType() { - bitField0_ = (bitField0_ & ~0x00000040); - sourceType_ = com.alibaba.otter.canal.protocol.CanalEntry.Type.MYSQL; - onChanged(); - return this; - } - - private java.lang.Object schemaName_ = ""; - - /** - * optional string schemaName = 8; - * - *
-             * * 变更数据的schemaname*
-             * 
- */ - public boolean hasSchemaName() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - - /** - * optional string schemaName = 8; - * - *
-             * * 变更数据的schemaname*
-             * 
- */ - public java.lang.String getSchemaName() { - java.lang.Object ref = schemaName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - schemaName_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * optional string schemaName = 8; - * - *
-             * * 变更数据的schemaname*
-             * 
- */ - public com.google.protobuf.ByteString getSchemaNameBytes() { - java.lang.Object ref = schemaName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - schemaName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * optional string schemaName = 8; - * - *
-             * * 变更数据的schemaname*
-             * 
- */ - public Builder setSchemaName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; - schemaName_ = value; - onChanged(); - return this; - } - - /** - * optional string schemaName = 8; - * - *
-             * * 变更数据的schemaname*
-             * 
- */ - public Builder clearSchemaName() { - bitField0_ = (bitField0_ & ~0x00000080); - schemaName_ = getDefaultInstance().getSchemaName(); - onChanged(); - return this; - } - - /** - * optional string schemaName = 8; - * - *
-             * * 变更数据的schemaname*
-             * 
- */ - public Builder setSchemaNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; - schemaName_ = value; - onChanged(); - return this; - } - - private java.lang.Object tableName_ = ""; - - /** - * optional string tableName = 9; - * - *
-             * *变更数据的tablename*
-             * 
- */ - public boolean hasTableName() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - - /** - * optional string tableName = 9; - * - *
-             * *变更数据的tablename*
-             * 
- */ - public java.lang.String getTableName() { - java.lang.Object ref = tableName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - tableName_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * optional string tableName = 9; - * - *
-             * *变更数据的tablename*
-             * 
- */ - public com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - tableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * optional string tableName = 9; - * - *
-             * *变更数据的tablename*
-             * 
- */ - public Builder setTableName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; - tableName_ = value; - onChanged(); - return this; - } - - /** - * optional string tableName = 9; - * - *
-             * *变更数据的tablename*
-             * 
- */ - public Builder clearTableName() { - bitField0_ = (bitField0_ & ~0x00000100); - tableName_ = getDefaultInstance().getTableName(); - onChanged(); - return this; - } - - /** - * optional string tableName = 9; - * - *
-             * *变更数据的tablename*
-             * 
- */ - public Builder setTableNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; - tableName_ = value; - onChanged(); - return this; - } - - private long eventLength_; - - /** - * optional int64 eventLength = 10; - * - *
-             * *每个event的长度*
-             * 
- */ - public boolean hasEventLength() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - - /** - * optional int64 eventLength = 10; - * - *
-             * *每个event的长度*
-             * 
- */ - public long getEventLength() { - return eventLength_; - } - - /** - * optional int64 eventLength = 10; - * - *
-             * *每个event的长度*
-             * 
- */ - public Builder setEventLength(long value) { - bitField0_ |= 0x00000200; - eventLength_ = value; - onChanged(); - return this; - } - - /** - * optional int64 eventLength = 10; - * - *
-             * *每个event的长度*
-             * 
- */ - public Builder clearEventLength() { - bitField0_ = (bitField0_ & ~0x00000200); - eventLength_ = 0L; - onChanged(); - return this; - } - - private com.alibaba.otter.canal.protocol.CanalEntry.EventType eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; - - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; - * - *
-             * *数据变更类型*
-             * 
- */ - public boolean hasEventType() { - return ((bitField0_ & 0x00000400) == 0x00000400); - } - - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; - * - *
-             * *数据变更类型*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType() { - return eventType_; - } - - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; - * - *
-             * *数据变更类型*
-             * 
- */ - public Builder setEventType(com.alibaba.otter.canal.protocol.CanalEntry.EventType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000400; - eventType_ = value; - onChanged(); - return this; - } - - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; - * - *
-             * *数据变更类型*
-             * 
- */ - public Builder clearEventType() { - bitField0_ = (bitField0_ & ~0x00000400); - eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; - onChanged(); - return this; - } - - private java.util.List props_ = java.util.Collections.emptyList(); - - private void ensurePropsIsMutable() { - if (!((bitField0_ & 0x00000800) == 0x00000800)) { - props_ = new java.util.ArrayList(props_); - bitField0_ |= 0x00000800; - } - } - - private com.google.protobuf.RepeatedFieldBuilder propsBuilder_; - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-             * *预留扩展*
-             * 
- */ - public java.util.List getPropsList() { - if (propsBuilder_ == null) { - return java.util.Collections.unmodifiableList(props_); - } else { - return propsBuilder_.getMessageList(); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-             * *预留扩展*
-             * 
- */ - public int getPropsCount() { - if (propsBuilder_ == null) { - return props_.size(); - } else { - return propsBuilder_.getCount(); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { - if (propsBuilder_ == null) { - return props_.get(index); - } else { - return propsBuilder_.getMessage(index); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder setProps(int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { - if (propsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropsIsMutable(); - props_.set(index, value); - onChanged(); - } else { - propsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder setProps(int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - props_.set(index, builderForValue.build()); - onChanged(); - } else { - propsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { - if (propsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropsIsMutable(); - props_.add(value); - onChanged(); - } else { - propsBuilder_.addMessage(value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addProps(int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { - if (propsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropsIsMutable(); - props_.add(index, value); - onChanged(); - } else { - propsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - props_.add(builderForValue.build()); - onChanged(); - } else { - propsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addProps(int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - props_.add(index, builderForValue.build()); - onChanged(); - } else { - propsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addAllProps(java.lang.Iterable values) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, props_); - onChanged(); - } else { - propsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder clearProps() { - if (propsBuilder_ == null) { - props_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); - onChanged(); - } else { - propsBuilder_.clear(); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder removeProps(int index) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - props_.remove(index); - onChanged(); - } else { - propsBuilder_.remove(index); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder getPropsBuilder(int index) { - return getPropsFieldBuilder().getBuilder(index); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder(int index) { - if (propsBuilder_ == null) { - return props_.get(index); - } else { - return propsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-             * *预留扩展*
-             * 
- */ - public java.util.List getPropsOrBuilderList() { - if (propsBuilder_ != null) { - return propsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(props_); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { - return getPropsFieldBuilder().addBuilder(com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder(int index) { - return getPropsFieldBuilder().addBuilder(index, - com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-             * *预留扩展*
-             * 
- */ - public java.util.List getPropsBuilderList() { - return getPropsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder getPropsFieldBuilder() { - if (propsBuilder_ == null) { - propsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder(props_, - ((bitField0_ & 0x00000800) == 0x00000800), - getParentForChildren(), - isClean()); - props_ = null; - } - return propsBuilder_; - } - - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Header) + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalEntry.Header.class, com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder.class); + } + + // Construct using com.alibaba.otter.canal.protocol.CanalEntry.Header.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getPropsFieldBuilder(); } + } + private static Builder create() { + return new Builder(); + } - static { - defaultInstance = new Header(true); - defaultInstance.initFields(); + public Builder clear() { + super.clear(); + version_ = 1; + bitField0_ = (bitField0_ & ~0x00000001); + logfileName_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + logfileOffset_ = 0L; + bitField0_ = (bitField0_ & ~0x00000004); + serverId_ = 0L; + bitField0_ = (bitField0_ & ~0x00000008); + serverenCode_ = ""; + bitField0_ = (bitField0_ & ~0x00000010); + executeTime_ = 0L; + bitField0_ = (bitField0_ & ~0x00000020); + sourceType_ = com.alibaba.otter.canal.protocol.CanalEntry.Type.MYSQL; + bitField0_ = (bitField0_ & ~0x00000040); + schemaName_ = ""; + bitField0_ = (bitField0_ & ~0x00000080); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000100); + eventLength_ = 0L; + bitField0_ = (bitField0_ & ~0x00000200); + eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; + bitField0_ = (bitField0_ & ~0x00000400); + if (propsBuilder_ == null) { + props_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); + } else { + propsBuilder_.clear(); } + gtid_ = ""; + bitField0_ = (bitField0_ & ~0x00001000); + return this; + } - // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Header) + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_descriptor; + } + + public com.alibaba.otter.canal.protocol.CanalEntry.Header getDefaultInstanceForType() { + return com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance(); + } + + public com.alibaba.otter.canal.protocol.CanalEntry.Header build() { + com.alibaba.otter.canal.protocol.CanalEntry.Header result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.alibaba.otter.canal.protocol.CanalEntry.Header buildPartial() { + com.alibaba.otter.canal.protocol.CanalEntry.Header result = new com.alibaba.otter.canal.protocol.CanalEntry.Header(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.version_ = version_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.logfileName_ = logfileName_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.logfileOffset_ = logfileOffset_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.serverId_ = serverId_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.serverenCode_ = serverenCode_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.executeTime_ = executeTime_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.sourceType_ = sourceType_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000080; + } + result.schemaName_ = schemaName_; + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000100; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000200; + } + result.eventLength_ = eventLength_; + if (((from_bitField0_ & 0x00000400) == 0x00000400)) { + to_bitField0_ |= 0x00000400; + } + result.eventType_ = eventType_; + if (propsBuilder_ == null) { + if (((bitField0_ & 0x00000800) == 0x00000800)) { + props_ = java.util.Collections.unmodifiableList(props_); + bitField0_ = (bitField0_ & ~0x00000800); + } + result.props_ = props_; + } else { + result.props_ = propsBuilder_.build(); + } + if (((from_bitField0_ & 0x00001000) == 0x00001000)) { + to_bitField0_ |= 0x00000800; + } + result.gtid_ = gtid_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.Header) { + return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.Header)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalEntry.Header other) { + if (other == com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance()) return this; + if (other.hasVersion()) { + setVersion(other.getVersion()); + } + if (other.hasLogfileName()) { + bitField0_ |= 0x00000002; + logfileName_ = other.logfileName_; + onChanged(); + } + if (other.hasLogfileOffset()) { + setLogfileOffset(other.getLogfileOffset()); + } + if (other.hasServerId()) { + setServerId(other.getServerId()); + } + if (other.hasServerenCode()) { + bitField0_ |= 0x00000010; + serverenCode_ = other.serverenCode_; + onChanged(); + } + if (other.hasExecuteTime()) { + setExecuteTime(other.getExecuteTime()); + } + if (other.hasSourceType()) { + setSourceType(other.getSourceType()); + } + if (other.hasSchemaName()) { + bitField0_ |= 0x00000080; + schemaName_ = other.schemaName_; + onChanged(); + } + if (other.hasTableName()) { + bitField0_ |= 0x00000100; + tableName_ = other.tableName_; + onChanged(); + } + if (other.hasEventLength()) { + setEventLength(other.getEventLength()); + } + if (other.hasEventType()) { + setEventType(other.getEventType()); + } + if (propsBuilder_ == null) { + if (!other.props_.isEmpty()) { + if (props_.isEmpty()) { + props_ = other.props_; + bitField0_ = (bitField0_ & ~0x00000800); + } else { + ensurePropsIsMutable(); + props_.addAll(other.props_); + } + onChanged(); + } + } else { + if (!other.props_.isEmpty()) { + if (propsBuilder_.isEmpty()) { + propsBuilder_.dispose(); + propsBuilder_ = null; + props_ = other.props_; + bitField0_ = (bitField0_ & ~0x00000800); + propsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getPropsFieldBuilder() : null; + } else { + propsBuilder_.addAllMessages(other.props_); + } + } + } + if (other.hasGtid()) { + bitField0_ |= 0x00001000; + gtid_ = other.gtid_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.alibaba.otter.canal.protocol.CanalEntry.Header parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalEntry.Header) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int version_ = 1; + /** + * optional int32 version = 1 [default = 1]; + * + *
+       **协议的版本号*
+       * 
+ */ + public boolean hasVersion() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 version = 1 [default = 1]; + * + *
+       **协议的版本号*
+       * 
+ */ + public int getVersion() { + return version_; + } + /** + * optional int32 version = 1 [default = 1]; + * + *
+       **协议的版本号*
+       * 
+ */ + public Builder setVersion(int value) { + bitField0_ |= 0x00000001; + version_ = value; + onChanged(); + return this; + } + /** + * optional int32 version = 1 [default = 1]; + * + *
+       **协议的版本号*
+       * 
+ */ + public Builder clearVersion() { + bitField0_ = (bitField0_ & ~0x00000001); + version_ = 1; + onChanged(); + return this; + } + + private java.lang.Object logfileName_ = ""; + /** + * optional string logfileName = 2; + * + *
+       **binlog/redolog 文件名*
+       * 
+ */ + public boolean hasLogfileName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string logfileName = 2; + * + *
+       **binlog/redolog 文件名*
+       * 
+ */ + public java.lang.String getLogfileName() { + java.lang.Object ref = logfileName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + logfileName_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string logfileName = 2; + * + *
+       **binlog/redolog 文件名*
+       * 
+ */ + public com.google.protobuf.ByteString + getLogfileNameBytes() { + java.lang.Object ref = logfileName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + logfileName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string logfileName = 2; + * + *
+       **binlog/redolog 文件名*
+       * 
+ */ + public Builder setLogfileName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + logfileName_ = value; + onChanged(); + return this; + } + /** + * optional string logfileName = 2; + * + *
+       **binlog/redolog 文件名*
+       * 
+ */ + public Builder clearLogfileName() { + bitField0_ = (bitField0_ & ~0x00000002); + logfileName_ = getDefaultInstance().getLogfileName(); + onChanged(); + return this; + } + /** + * optional string logfileName = 2; + * + *
+       **binlog/redolog 文件名*
+       * 
+ */ + public Builder setLogfileNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + logfileName_ = value; + onChanged(); + return this; + } + + private long logfileOffset_ ; + /** + * optional int64 logfileOffset = 3; + * + *
+       **binlog/redolog 文件的偏移位置*
+       * 
+ */ + public boolean hasLogfileOffset() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional int64 logfileOffset = 3; + * + *
+       **binlog/redolog 文件的偏移位置*
+       * 
+ */ + public long getLogfileOffset() { + return logfileOffset_; + } + /** + * optional int64 logfileOffset = 3; + * + *
+       **binlog/redolog 文件的偏移位置*
+       * 
+ */ + public Builder setLogfileOffset(long value) { + bitField0_ |= 0x00000004; + logfileOffset_ = value; + onChanged(); + return this; + } + /** + * optional int64 logfileOffset = 3; + * + *
+       **binlog/redolog 文件的偏移位置*
+       * 
+ */ + public Builder clearLogfileOffset() { + bitField0_ = (bitField0_ & ~0x00000004); + logfileOffset_ = 0L; + onChanged(); + return this; + } + + private long serverId_ ; + /** + * optional int64 serverId = 4; + * + *
+       **服务端serverId*
+       * 
+ */ + public boolean hasServerId() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int64 serverId = 4; + * + *
+       **服务端serverId*
+       * 
+ */ + public long getServerId() { + return serverId_; + } + /** + * optional int64 serverId = 4; + * + *
+       **服务端serverId*
+       * 
+ */ + public Builder setServerId(long value) { + bitField0_ |= 0x00000008; + serverId_ = value; + onChanged(); + return this; + } + /** + * optional int64 serverId = 4; + * + *
+       **服务端serverId*
+       * 
+ */ + public Builder clearServerId() { + bitField0_ = (bitField0_ & ~0x00000008); + serverId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object serverenCode_ = ""; + /** + * optional string serverenCode = 5; + * + *
+       ** 变更数据的编码 *
+       * 
+ */ + public boolean hasServerenCode() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional string serverenCode = 5; + * + *
+       ** 变更数据的编码 *
+       * 
+ */ + public java.lang.String getServerenCode() { + java.lang.Object ref = serverenCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + serverenCode_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string serverenCode = 5; + * + *
+       ** 变更数据的编码 *
+       * 
+ */ + public com.google.protobuf.ByteString + getServerenCodeBytes() { + java.lang.Object ref = serverenCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + serverenCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string serverenCode = 5; + * + *
+       ** 变更数据的编码 *
+       * 
+ */ + public Builder setServerenCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + serverenCode_ = value; + onChanged(); + return this; + } + /** + * optional string serverenCode = 5; + * + *
+       ** 变更数据的编码 *
+       * 
+ */ + public Builder clearServerenCode() { + bitField0_ = (bitField0_ & ~0x00000010); + serverenCode_ = getDefaultInstance().getServerenCode(); + onChanged(); + return this; + } + /** + * optional string serverenCode = 5; + * + *
+       ** 变更数据的编码 *
+       * 
+ */ + public Builder setServerenCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + serverenCode_ = value; + onChanged(); + return this; + } + + private long executeTime_ ; + /** + * optional int64 executeTime = 6; + * + *
+       **变更数据的执行时间 *
+       * 
+ */ + public boolean hasExecuteTime() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional int64 executeTime = 6; + * + *
+       **变更数据的执行时间 *
+       * 
+ */ + public long getExecuteTime() { + return executeTime_; + } + /** + * optional int64 executeTime = 6; + * + *
+       **变更数据的执行时间 *
+       * 
+ */ + public Builder setExecuteTime(long value) { + bitField0_ |= 0x00000020; + executeTime_ = value; + onChanged(); + return this; + } + /** + * optional int64 executeTime = 6; + * + *
+       **变更数据的执行时间 *
+       * 
+ */ + public Builder clearExecuteTime() { + bitField0_ = (bitField0_ & ~0x00000020); + executeTime_ = 0L; + onChanged(); + return this; + } + + private com.alibaba.otter.canal.protocol.CanalEntry.Type sourceType_ = com.alibaba.otter.canal.protocol.CanalEntry.Type.MYSQL; + /** + * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + * + *
+       ** 变更数据的来源*
+       * 
+ */ + public boolean hasSourceType() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + * + *
+       ** 变更数据的来源*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Type getSourceType() { + return sourceType_; + } + /** + * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + * + *
+       ** 变更数据的来源*
+       * 
+ */ + public Builder setSourceType(com.alibaba.otter.canal.protocol.CanalEntry.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + sourceType_ = value; + onChanged(); + return this; + } + /** + * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + * + *
+       ** 变更数据的来源*
+       * 
+ */ + public Builder clearSourceType() { + bitField0_ = (bitField0_ & ~0x00000040); + sourceType_ = com.alibaba.otter.canal.protocol.CanalEntry.Type.MYSQL; + onChanged(); + return this; + } + + private java.lang.Object schemaName_ = ""; + /** + * optional string schemaName = 8; + * + *
+       ** 变更数据的schemaname*
+       * 
+ */ + public boolean hasSchemaName() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional string schemaName = 8; + * + *
+       ** 变更数据的schemaname*
+       * 
+ */ + public java.lang.String getSchemaName() { + java.lang.Object ref = schemaName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + schemaName_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string schemaName = 8; + * + *
+       ** 变更数据的schemaname*
+       * 
+ */ + public com.google.protobuf.ByteString + getSchemaNameBytes() { + java.lang.Object ref = schemaName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schemaName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string schemaName = 8; + * + *
+       ** 变更数据的schemaname*
+       * 
+ */ + public Builder setSchemaName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + schemaName_ = value; + onChanged(); + return this; + } + /** + * optional string schemaName = 8; + * + *
+       ** 变更数据的schemaname*
+       * 
+ */ + public Builder clearSchemaName() { + bitField0_ = (bitField0_ & ~0x00000080); + schemaName_ = getDefaultInstance().getSchemaName(); + onChanged(); + return this; + } + /** + * optional string schemaName = 8; + * + *
+       ** 变更数据的schemaname*
+       * 
+ */ + public Builder setSchemaNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + schemaName_ = value; + onChanged(); + return this; + } + + private java.lang.Object tableName_ = ""; + /** + * optional string tableName = 9; + * + *
+       **变更数据的tablename*
+       * 
+ */ + public boolean hasTableName() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional string tableName = 9; + * + *
+       **变更数据的tablename*
+       * 
+ */ + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + tableName_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string tableName = 9; + * + *
+       **变更数据的tablename*
+       * 
+ */ + public com.google.protobuf.ByteString + getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string tableName = 9; + * + *
+       **变更数据的tablename*
+       * 
+ */ + public Builder setTableName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + tableName_ = value; + onChanged(); + return this; + } + /** + * optional string tableName = 9; + * + *
+       **变更数据的tablename*
+       * 
+ */ + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000100); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + /** + * optional string tableName = 9; + * + *
+       **变更数据的tablename*
+       * 
+ */ + public Builder setTableNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + tableName_ = value; + onChanged(); + return this; + } + + private long eventLength_ ; + /** + * optional int64 eventLength = 10; + * + *
+       **每个event的长度*
+       * 
+ */ + public boolean hasEventLength() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional int64 eventLength = 10; + * + *
+       **每个event的长度*
+       * 
+ */ + public long getEventLength() { + return eventLength_; + } + /** + * optional int64 eventLength = 10; + * + *
+       **每个event的长度*
+       * 
+ */ + public Builder setEventLength(long value) { + bitField0_ |= 0x00000200; + eventLength_ = value; + onChanged(); + return this; + } + /** + * optional int64 eventLength = 10; + * + *
+       **每个event的长度*
+       * 
+ */ + public Builder clearEventLength() { + bitField0_ = (bitField0_ & ~0x00000200); + eventLength_ = 0L; + onChanged(); + return this; + } + + private com.alibaba.otter.canal.protocol.CanalEntry.EventType eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + * + *
+       **数据变更类型*
+       * 
+ */ + public boolean hasEventType() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + * + *
+       **数据变更类型*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType() { + return eventType_; + } + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + * + *
+       **数据变更类型*
+       * 
+ */ + public Builder setEventType(com.alibaba.otter.canal.protocol.CanalEntry.EventType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + eventType_ = value; + onChanged(); + return this; + } + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + * + *
+       **数据变更类型*
+       * 
+ */ + public Builder clearEventType() { + bitField0_ = (bitField0_ & ~0x00000400); + eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; + onChanged(); + return this; + } + + private java.util.List props_ = + java.util.Collections.emptyList(); + private void ensurePropsIsMutable() { + if (!((bitField0_ & 0x00000800) == 0x00000800)) { + props_ = new java.util.ArrayList(props_); + bitField0_ |= 0x00000800; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> propsBuilder_; + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ + public java.util.List getPropsList() { + if (propsBuilder_ == null) { + return java.util.Collections.unmodifiableList(props_); + } else { + return propsBuilder_.getMessageList(); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ + public int getPropsCount() { + if (propsBuilder_ == null) { + return props_.size(); + } else { + return propsBuilder_.getCount(); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { + if (propsBuilder_ == null) { + return props_.get(index); + } else { + return propsBuilder_.getMessage(index); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder setProps( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { + if (propsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropsIsMutable(); + props_.set(index, value); + onChanged(); + } else { + propsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder setProps( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.set(index, builderForValue.build()); + onChanged(); + } else { + propsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { + if (propsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropsIsMutable(); + props_.add(value); + onChanged(); + } else { + propsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addProps( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { + if (propsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropsIsMutable(); + props_.add(index, value); + onChanged(); + } else { + propsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addProps( + com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.add(builderForValue.build()); + onChanged(); + } else { + propsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addProps( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.add(index, builderForValue.build()); + onChanged(); + } else { + propsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addAllProps( + java.lang.Iterable values) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, props_); + onChanged(); + } else { + propsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder clearProps() { + if (propsBuilder_ == null) { + props_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + } else { + propsBuilder_.clear(); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder removeProps(int index) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.remove(index); + onChanged(); + } else { + propsBuilder_.remove(index); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder getPropsBuilder( + int index) { + return getPropsFieldBuilder().getBuilder(index); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( + int index) { + if (propsBuilder_ == null) { + return props_.get(index); } else { + return propsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ + public java.util.List + getPropsOrBuilderList() { + if (propsBuilder_ != null) { + return propsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(props_); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { + return getPropsFieldBuilder().addBuilder( + com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder( + int index) { + return getPropsFieldBuilder().addBuilder( + index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+       **预留扩展*
+       * 
+ */ + public java.util.List + getPropsBuilderList() { + return getPropsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> + getPropsFieldBuilder() { + if (propsBuilder_ == null) { + propsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder>( + props_, + ((bitField0_ & 0x00000800) == 0x00000800), + getParentForChildren(), + isClean()); + props_ = null; + } + return propsBuilder_; + } + + private java.lang.Object gtid_ = ""; + /** + * optional string gtid = 13; + * + *
+       **当前事务的gitd*
+       * 
+ */ + public boolean hasGtid() { + return ((bitField0_ & 0x00001000) == 0x00001000); + } + /** + * optional string gtid = 13; + * + *
+       **当前事务的gitd*
+       * 
+ */ + public java.lang.String getGtid() { + java.lang.Object ref = gtid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + gtid_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string gtid = 13; + * + *
+       **当前事务的gitd*
+       * 
+ */ + public com.google.protobuf.ByteString + getGtidBytes() { + java.lang.Object ref = gtid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gtid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string gtid = 13; + * + *
+       **当前事务的gitd*
+       * 
+ */ + public Builder setGtid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00001000; + gtid_ = value; + onChanged(); + return this; + } + /** + * optional string gtid = 13; + * + *
+       **当前事务的gitd*
+       * 
+ */ + public Builder clearGtid() { + bitField0_ = (bitField0_ & ~0x00001000); + gtid_ = getDefaultInstance().getGtid(); + onChanged(); + return this; + } + /** + * optional string gtid = 13; + * + *
+       **当前事务的gitd*
+       * 
+ */ + public Builder setGtidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00001000; + gtid_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Header) } - public interface ColumnOrBuilder extends - // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Column) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 index = 1; - * - *
-         * *字段下标*
-         * 
- */ - boolean hasIndex(); - - /** - * optional int32 index = 1; - * - *
-         * *字段下标*
-         * 
- */ - int getIndex(); - - /** - * optional int32 sqlType = 2; - * - *
-         * *字段java中类型*
-         * 
- */ - boolean hasSqlType(); - - /** - * optional int32 sqlType = 2; - * - *
-         * *字段java中类型*
-         * 
- */ - int getSqlType(); - - /** - * optional string name = 3; - * - *
-         * *字段名称(忽略大小写),在mysql中是没有的*
-         * 
- */ - boolean hasName(); - - /** - * optional string name = 3; - * - *
-         * *字段名称(忽略大小写),在mysql中是没有的*
-         * 
- */ - java.lang.String getName(); - - /** - * optional string name = 3; - * - *
-         * *字段名称(忽略大小写),在mysql中是没有的*
-         * 
- */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * optional bool isKey = 4; - * - *
-         * *是否是主键*
-         * 
- */ - boolean hasIsKey(); - - /** - * optional bool isKey = 4; - * - *
-         * *是否是主键*
-         * 
- */ - boolean getIsKey(); - - /** - * optional bool updated = 5; - * - *
-         * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
-         * 
- */ - boolean hasUpdated(); - - /** - * optional bool updated = 5; - * - *
-         * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
-         * 
- */ - boolean getUpdated(); - - /** - * optional bool isNull = 6 [default = false]; - * - *
-         * * 标识是否为空  *
-         * 
- */ - boolean hasIsNull(); - - /** - * optional bool isNull = 6 [default = false]; - * - *
-         * * 标识是否为空  *
-         * 
- */ - boolean getIsNull(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-         * *预留扩展*
-         * 
- */ - java.util.List getPropsList(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-         * *预留扩展*
-         * 
- */ - com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-         * *预留扩展*
-         * 
- */ - int getPropsCount(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-         * *预留扩展*
-         * 
- */ - java.util.List getPropsOrBuilderList(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-         * *预留扩展*
-         * 
- */ - com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder(int index); - - /** - * optional string value = 8; - * - *
-         * * 字段值,timestamp,Datetime是一个时间格式的文本 *
-         * 
- */ - boolean hasValue(); - - /** - * optional string value = 8; - * - *
-         * * 字段值,timestamp,Datetime是一个时间格式的文本 *
-         * 
- */ - java.lang.String getValue(); - - /** - * optional string value = 8; - * - *
-         * * 字段值,timestamp,Datetime是一个时间格式的文本 *
-         * 
- */ - com.google.protobuf.ByteString getValueBytes(); - - /** - * optional int32 length = 9; - * - *
-         * * 对应数据对象原始长度 *
-         * 
- */ - boolean hasLength(); - - /** - * optional int32 length = 9; - * - *
-         * * 对应数据对象原始长度 *
-         * 
- */ - int getLength(); - - /** - * optional string mysqlType = 10; - * - *
-         * *字段mysql类型*
-         * 
- */ - boolean hasMysqlType(); - - /** - * optional string mysqlType = 10; - * - *
-         * *字段mysql类型*
-         * 
- */ - java.lang.String getMysqlType(); - - /** - * optional string mysqlType = 10; - * - *
-         * *字段mysql类型*
-         * 
- */ - com.google.protobuf.ByteString getMysqlTypeBytes(); + static { + defaultInstance = new Header(true); + defaultInstance.initFields(); } + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Header) + } + + public interface ColumnOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Column) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 index = 1; + * + *
+     **字段下标*
+     * 
+ */ + boolean hasIndex(); + /** + * optional int32 index = 1; + * + *
+     **字段下标*
+     * 
+ */ + int getIndex(); + + /** + * optional int32 sqlType = 2; + * + *
+     **字段java中类型*
+     * 
+ */ + boolean hasSqlType(); + /** + * optional int32 sqlType = 2; + * + *
+     **字段java中类型*
+     * 
+ */ + int getSqlType(); + + /** + * optional string name = 3; + * + *
+     **字段名称(忽略大小写),在mysql中是没有的*
+     * 
+ */ + boolean hasName(); + /** + * optional string name = 3; + * + *
+     **字段名称(忽略大小写),在mysql中是没有的*
+     * 
+ */ + java.lang.String getName(); + /** + * optional string name = 3; + * + *
+     **字段名称(忽略大小写),在mysql中是没有的*
+     * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * optional bool isKey = 4; + * + *
+     **是否是主键*
+     * 
+ */ + boolean hasIsKey(); + /** + * optional bool isKey = 4; + * + *
+     **是否是主键*
+     * 
+ */ + boolean getIsKey(); + + /** + * optional bool updated = 5; + * + *
+     **如果EventType=UPDATE,用于标识这个字段值是否有修改*
+     * 
+ */ + boolean hasUpdated(); + /** + * optional bool updated = 5; + * + *
+     **如果EventType=UPDATE,用于标识这个字段值是否有修改*
+     * 
+ */ + boolean getUpdated(); + + /** + * optional bool isNull = 6 [default = false]; + * + *
+     ** 标识是否为空  *
+     * 
+ */ + boolean hasIsNull(); + /** + * optional bool isNull = 6 [default = false]; + * + *
+     ** 标识是否为空  *
+     * 
+ */ + boolean getIsNull(); + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+     **预留扩展*
+     * 
+ */ + java.util.List + getPropsList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+     **预留扩展*
+     * 
+ */ + com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+     **预留扩展*
+     * 
+ */ + int getPropsCount(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+     **预留扩展*
+     * 
+ */ + java.util.List + getPropsOrBuilderList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+     **预留扩展*
+     * 
+ */ + com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( + int index); + + /** + * optional string value = 8; + * + *
+     ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+     * 
+ */ + boolean hasValue(); + /** + * optional string value = 8; + * + *
+     ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+     * 
+ */ + java.lang.String getValue(); + /** + * optional string value = 8; + * + *
+     ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+     * 
+ */ + com.google.protobuf.ByteString + getValueBytes(); + + /** + * optional int32 length = 9; + * + *
+     ** 对应数据对象原始长度 *
+     * 
+ */ + boolean hasLength(); + /** + * optional int32 length = 9; + * + *
+     ** 对应数据对象原始长度 *
+     * 
+ */ + int getLength(); + + /** + * optional string mysqlType = 10; + * + *
+     **字段mysql类型*
+     * 
+ */ + boolean hasMysqlType(); + /** + * optional string mysqlType = 10; + * + *
+     **字段mysql类型*
+     * 
+ */ + java.lang.String getMysqlType(); + /** + * optional string mysqlType = 10; + * + *
+     **字段mysql类型*
+     * 
+ */ + com.google.protobuf.ByteString + getMysqlTypeBytes(); + } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Column} + * + *
+   **每个字段的数据结构*
+   * 
+ */ + public static final class Column extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Column) + ColumnOrBuilder { + // Use Column.newBuilder() to construct. + private Column(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private Column(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final Column defaultInstance; + public static Column getDefaultInstance() { + return defaultInstance; + } + + public Column getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Column( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + index_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + sqlType_ = input.readInt32(); + break; + } + case 26: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000004; + name_ = bs; + break; + } + case 32: { + bitField0_ |= 0x00000008; + isKey_ = input.readBool(); + break; + } + case 40: { + bitField0_ |= 0x00000010; + updated_ = input.readBool(); + break; + } + case 48: { + bitField0_ |= 0x00000020; + isNull_ = input.readBool(); + break; + } + case 58: { + if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + props_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000040; + } + props_.add(input.readMessage(com.alibaba.otter.canal.protocol.CanalEntry.Pair.PARSER, extensionRegistry)); + break; + } + case 66: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000040; + value_ = bs; + break; + } + case 72: { + bitField0_ |= 0x00000080; + length_ = input.readInt32(); + break; + } + case 82: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000100; + mysqlType_ = bs; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + props_ = java.util.Collections.unmodifiableList(props_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalEntry.Column.class, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Column parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Column(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int INDEX_FIELD_NUMBER = 1; + private int index_; + /** + * optional int32 index = 1; + * + *
+     **字段下标*
+     * 
+ */ + public boolean hasIndex() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 index = 1; + * + *
+     **字段下标*
+     * 
+ */ + public int getIndex() { + return index_; + } + + public static final int SQLTYPE_FIELD_NUMBER = 2; + private int sqlType_; + /** + * optional int32 sqlType = 2; + * + *
+     **字段java中类型*
+     * 
+ */ + public boolean hasSqlType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 sqlType = 2; + * + *
+     **字段java中类型*
+     * 
+ */ + public int getSqlType() { + return sqlType_; + } + + public static final int NAME_FIELD_NUMBER = 3; + private java.lang.Object name_; + /** + * optional string name = 3; + * + *
+     **字段名称(忽略大小写),在mysql中是没有的*
+     * 
+ */ + public boolean hasName() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional string name = 3; + * + *
+     **字段名称(忽略大小写),在mysql中是没有的*
+     * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } + } + /** + * optional string name = 3; + * + *
+     **字段名称(忽略大小写),在mysql中是没有的*
+     * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ISKEY_FIELD_NUMBER = 4; + private boolean isKey_; + /** + * optional bool isKey = 4; + * + *
+     **是否是主键*
+     * 
+ */ + public boolean hasIsKey() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional bool isKey = 4; + * + *
+     **是否是主键*
+     * 
+ */ + public boolean getIsKey() { + return isKey_; + } + + public static final int UPDATED_FIELD_NUMBER = 5; + private boolean updated_; + /** + * optional bool updated = 5; + * + *
+     **如果EventType=UPDATE,用于标识这个字段值是否有修改*
+     * 
+ */ + public boolean hasUpdated() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional bool updated = 5; + * + *
+     **如果EventType=UPDATE,用于标识这个字段值是否有修改*
+     * 
+ */ + public boolean getUpdated() { + return updated_; + } + + public static final int ISNULL_FIELD_NUMBER = 6; + private boolean isNull_; + /** + * optional bool isNull = 6 [default = false]; + * + *
+     ** 标识是否为空  *
+     * 
+ */ + public boolean hasIsNull() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional bool isNull = 6 [default = false]; + * + *
+     ** 标识是否为空  *
+     * 
+ */ + public boolean getIsNull() { + return isNull_; + } + + public static final int PROPS_FIELD_NUMBER = 7; + private java.util.List props_; + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+     **预留扩展*
+     * 
+ */ + public java.util.List getPropsList() { + return props_; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+     **预留扩展*
+     * 
+ */ + public java.util.List + getPropsOrBuilderList() { + return props_; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+     **预留扩展*
+     * 
+ */ + public int getPropsCount() { + return props_.size(); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+     **预留扩展*
+     * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { + return props_.get(index); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+     **预留扩展*
+     * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( + int index) { + return props_.get(index); + } + + public static final int VALUE_FIELD_NUMBER = 8; + private java.lang.Object value_; + /** + * optional string value = 8; + * + *
+     ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+     * 
+ */ + public boolean hasValue() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional string value = 8; + * + *
+     ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+     * 
+ */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + value_ = s; + } + return s; + } + } + /** + * optional string value = 8; + * + *
+     ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+     * 
+ */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LENGTH_FIELD_NUMBER = 9; + private int length_; + /** + * optional int32 length = 9; + * + *
+     ** 对应数据对象原始长度 *
+     * 
+ */ + public boolean hasLength() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional int32 length = 9; + * + *
+     ** 对应数据对象原始长度 *
+     * 
+ */ + public int getLength() { + return length_; + } + + public static final int MYSQLTYPE_FIELD_NUMBER = 10; + private java.lang.Object mysqlType_; + /** + * optional string mysqlType = 10; + * + *
+     **字段mysql类型*
+     * 
+ */ + public boolean hasMysqlType() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional string mysqlType = 10; + * + *
+     **字段mysql类型*
+     * 
+ */ + public java.lang.String getMysqlType() { + java.lang.Object ref = mysqlType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + mysqlType_ = s; + } + return s; + } + } + /** + * optional string mysqlType = 10; + * + *
+     **字段mysql类型*
+     * 
+ */ + public com.google.protobuf.ByteString + getMysqlTypeBytes() { + java.lang.Object ref = mysqlType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mysqlType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + index_ = 0; + sqlType_ = 0; + name_ = ""; + isKey_ = false; + updated_ = false; + isNull_ = false; + props_ = java.util.Collections.emptyList(); + value_ = ""; + length_ = 0; + mysqlType_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, index_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, sqlType_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, getNameBytes()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBool(4, isKey_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBool(5, updated_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeBool(6, isNull_); + } + for (int i = 0; i < props_.size(); i++) { + output.writeMessage(7, props_.get(i)); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeBytes(8, getValueBytes()); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeInt32(9, length_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeBytes(10, getMysqlTypeBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, index_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, sqlType_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getNameBytes()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, isKey_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, updated_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, isNull_); + } + for (int i = 0; i < props_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, props_.get(i)); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(8, getValueBytes()); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(9, length_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(10, getMysqlTypeBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.Column prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } /** * Protobuf type {@code com.alibaba.otter.canal.protocol.Column} * *
-     * *每个字段的数据结构*
+     **每个字段的数据结构*
      * 
*/ - public static final class Column extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Column) - ColumnOrBuilder { - - // Use Column.newBuilder() to construct. - private Column(com.google.protobuf.GeneratedMessage.Builder builder){ - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - - private Column(boolean noInit){ - this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - - private static final Column defaultInstance; - - public static Column getDefaultInstance() { - return defaultInstance; - } - - public Column getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Column(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException{ - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - index_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - sqlType_ = input.readInt32(); - break; - } - case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000004; - name_ = bs; - break; - } - case 32: { - bitField0_ |= 0x00000008; - isKey_ = input.readBool(); - break; - } - case 40: { - bitField0_ |= 0x00000010; - updated_ = input.readBool(); - break; - } - case 48: { - bitField0_ |= 0x00000020; - isNull_ = input.readBool(); - break; - } - case 58: { - if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { - props_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - props_.add(input.readMessage(com.alibaba.otter.canal.protocol.CanalEntry.Pair.PARSER, - extensionRegistry)); - break; - } - case 66: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000040; - value_ = bs; - break; - } - case 72: { - bitField0_ |= 0x00000080; - length_ = input.readInt32(); - break; - } - case 82: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000100; - mysqlType_ = bs; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { - props_ = java.util.Collections.unmodifiableList(props_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_fieldAccessorTable.ensureFieldAccessorsInitialized(com.alibaba.otter.canal.protocol.CanalEntry.Column.class, - com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - - public Column parsePartialFrom(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Column(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int INDEX_FIELD_NUMBER = 1; - private int index_; - - /** - * optional int32 index = 1; - * - *
-         * *字段下标*
-         * 
- */ - public boolean hasIndex() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - - /** - * optional int32 index = 1; - * - *
-         * *字段下标*
-         * 
- */ - public int getIndex() { - return index_; - } - - public static final int SQLTYPE_FIELD_NUMBER = 2; - private int sqlType_; - - /** - * optional int32 sqlType = 2; - * - *
-         * *字段java中类型*
-         * 
- */ - public boolean hasSqlType() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - - /** - * optional int32 sqlType = 2; - * - *
-         * *字段java中类型*
-         * 
- */ - public int getSqlType() { - return sqlType_; - } - - public static final int NAME_FIELD_NUMBER = 3; - private java.lang.Object name_; - - /** - * optional string name = 3; - * - *
-         * *字段名称(忽略大小写),在mysql中是没有的*
-         * 
- */ - public boolean hasName() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - - /** - * optional string name = 3; - * - *
-         * *字段名称(忽略大小写),在mysql中是没有的*
-         * 
- */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - name_ = s; - } - return s; - } - } - - /** - * optional string name = 3; - * - *
-         * *字段名称(忽略大小写),在mysql中是没有的*
-         * 
- */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ISKEY_FIELD_NUMBER = 4; - private boolean isKey_; - - /** - * optional bool isKey = 4; - * - *
-         * *是否是主键*
-         * 
- */ - public boolean hasIsKey() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - - /** - * optional bool isKey = 4; - * - *
-         * *是否是主键*
-         * 
- */ - public boolean getIsKey() { - return isKey_; - } - - public static final int UPDATED_FIELD_NUMBER = 5; - private boolean updated_; - - /** - * optional bool updated = 5; - * - *
-         * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
-         * 
- */ - public boolean hasUpdated() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - - /** - * optional bool updated = 5; - * - *
-         * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
-         * 
- */ - public boolean getUpdated() { - return updated_; - } - - public static final int ISNULL_FIELD_NUMBER = 6; - private boolean isNull_; - - /** - * optional bool isNull = 6 [default = false]; - * - *
-         * * 标识是否为空  *
-         * 
- */ - public boolean hasIsNull() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - - /** - * optional bool isNull = 6 [default = false]; - * - *
-         * * 标识是否为空  *
-         * 
- */ - public boolean getIsNull() { - return isNull_; - } - - public static final int PROPS_FIELD_NUMBER = 7; - private java.util.List props_; - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-         * *预留扩展*
-         * 
- */ - public java.util.List getPropsList() { - return props_; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-         * *预留扩展*
-         * 
- */ - public java.util.List getPropsOrBuilderList() { - return props_; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-         * *预留扩展*
-         * 
- */ - public int getPropsCount() { - return props_.size(); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-         * *预留扩展*
-         * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { - return props_.get(index); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-         * *预留扩展*
-         * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder(int index) { - return props_.get(index); - } - - public static final int VALUE_FIELD_NUMBER = 8; - private java.lang.Object value_; - - /** - * optional string value = 8; - * - *
-         * * 字段值,timestamp,Datetime是一个时间格式的文本 *
-         * 
- */ - public boolean hasValue() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - - /** - * optional string value = 8; - * - *
-         * * 字段值,timestamp,Datetime是一个时间格式的文本 *
-         * 
- */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - value_ = s; - } - return s; - } - } - - /** - * optional string value = 8; - * - *
-         * * 字段值,timestamp,Datetime是一个时间格式的文本 *
-         * 
- */ - public com.google.protobuf.ByteString getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LENGTH_FIELD_NUMBER = 9; - private int length_; - - /** - * optional int32 length = 9; - * - *
-         * * 对应数据对象原始长度 *
-         * 
- */ - public boolean hasLength() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - - /** - * optional int32 length = 9; - * - *
-         * * 对应数据对象原始长度 *
-         * 
- */ - public int getLength() { - return length_; - } - - public static final int MYSQLTYPE_FIELD_NUMBER = 10; - private java.lang.Object mysqlType_; - - /** - * optional string mysqlType = 10; - * - *
-         * *字段mysql类型*
-         * 
- */ - public boolean hasMysqlType() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - - /** - * optional string mysqlType = 10; - * - *
-         * *字段mysql类型*
-         * 
- */ - public java.lang.String getMysqlType() { - java.lang.Object ref = mysqlType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - mysqlType_ = s; - } - return s; - } - } - - /** - * optional string mysqlType = 10; - * - *
-         * *字段mysql类型*
-         * 
- */ - public com.google.protobuf.ByteString getMysqlTypeBytes() { - java.lang.Object ref = mysqlType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - mysqlType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private void initFields() { - index_ = 0; - sqlType_ = 0; - name_ = ""; - isKey_ = false; - updated_ = false; - isNull_ = false; - props_ = java.util.Collections.emptyList(); - value_ = ""; - length_ = 0; - mysqlType_ = ""; - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, index_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt32(2, sqlType_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, getNameBytes()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBool(4, isKey_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBool(5, updated_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeBool(6, isNull_); - } - for (int i = 0; i < props_.size(); i++) { - output.writeMessage(7, props_.get(i)); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeBytes(8, getValueBytes()); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeInt32(9, length_); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeBytes(10, getMysqlTypeBytes()); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, index_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, sqlType_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, getNameBytes()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, isKey_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, updated_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, isNull_); - } - for (int i = 0; i < props_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, props_.get(i)); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(8, getValueBytes()); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(9, length_); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(10, getMysqlTypeBytes()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - - @java.lang.Override - protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom(com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom(byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom(java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseDelimitedFrom(java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Column parseFrom(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { - return Builder.create(); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.Column prototype) { - return newBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return newBuilder(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.Column} - * - *
-         * *每个字段的数据结构*
-         * 
- */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Column) com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder { - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_fieldAccessorTable.ensureFieldAccessorsInitialized(com.alibaba.otter.canal.protocol.CanalEntry.Column.class, - com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder.class); - } - - // Construct using - // com.alibaba.otter.canal.protocol.CanalEntry.Column.newBuilder() - private Builder(){ - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent){ - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getPropsFieldBuilder(); - } - } - - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - index_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - sqlType_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000004); - isKey_ = false; - bitField0_ = (bitField0_ & ~0x00000008); - updated_ = false; - bitField0_ = (bitField0_ & ~0x00000010); - isNull_ = false; - bitField0_ = (bitField0_ & ~0x00000020); - if (propsBuilder_ == null) { - props_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - } else { - propsBuilder_.clear(); - } - value_ = ""; - bitField0_ = (bitField0_ & ~0x00000080); - length_ = 0; - bitField0_ = (bitField0_ & ~0x00000100); - mysqlType_ = ""; - bitField0_ = (bitField0_ & ~0x00000200); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_descriptor; - } - - public com.alibaba.otter.canal.protocol.CanalEntry.Column getDefaultInstanceForType() { - return com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance(); - } - - public com.alibaba.otter.canal.protocol.CanalEntry.Column build() { - com.alibaba.otter.canal.protocol.CanalEntry.Column result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.alibaba.otter.canal.protocol.CanalEntry.Column buildPartial() { - com.alibaba.otter.canal.protocol.CanalEntry.Column result = new com.alibaba.otter.canal.protocol.CanalEntry.Column(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.index_ = index_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.sqlType_ = sqlType_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.name_ = name_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.isKey_ = isKey_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.updated_ = updated_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; - } - result.isNull_ = isNull_; - if (propsBuilder_ == null) { - if (((bitField0_ & 0x00000040) == 0x00000040)) { - props_ = java.util.Collections.unmodifiableList(props_); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.props_ = props_; - } else { - result.props_ = propsBuilder_.build(); - } - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000040; - } - result.value_ = value_; - if (((from_bitField0_ & 0x00000100) == 0x00000100)) { - to_bitField0_ |= 0x00000080; - } - result.length_ = length_; - if (((from_bitField0_ & 0x00000200) == 0x00000200)) { - to_bitField0_ |= 0x00000100; - } - result.mysqlType_ = mysqlType_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.Column) { - return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.Column) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalEntry.Column other) { - if (other == com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance()) return this; - if (other.hasIndex()) { - setIndex(other.getIndex()); - } - if (other.hasSqlType()) { - setSqlType(other.getSqlType()); - } - if (other.hasName()) { - bitField0_ |= 0x00000004; - name_ = other.name_; - onChanged(); - } - if (other.hasIsKey()) { - setIsKey(other.getIsKey()); - } - if (other.hasUpdated()) { - setUpdated(other.getUpdated()); - } - if (other.hasIsNull()) { - setIsNull(other.getIsNull()); - } - if (propsBuilder_ == null) { - if (!other.props_.isEmpty()) { - if (props_.isEmpty()) { - props_ = other.props_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensurePropsIsMutable(); - props_.addAll(other.props_); - } - onChanged(); - } - } else { - if (!other.props_.isEmpty()) { - if (propsBuilder_.isEmpty()) { - propsBuilder_.dispose(); - propsBuilder_ = null; - props_ = other.props_; - bitField0_ = (bitField0_ & ~0x00000040); - propsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getPropsFieldBuilder() : null; - } else { - propsBuilder_.addAllMessages(other.props_); - } - } - } - if (other.hasValue()) { - bitField0_ |= 0x00000080; - value_ = other.value_; - onChanged(); - } - if (other.hasLength()) { - setLength(other.getLength()); - } - if (other.hasMysqlType()) { - bitField0_ |= 0x00000200; - mysqlType_ = other.mysqlType_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.alibaba.otter.canal.protocol.CanalEntry.Column parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.CanalEntry.Column) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private int index_; - - /** - * optional int32 index = 1; - * - *
-             * *字段下标*
-             * 
- */ - public boolean hasIndex() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - - /** - * optional int32 index = 1; - * - *
-             * *字段下标*
-             * 
- */ - public int getIndex() { - return index_; - } - - /** - * optional int32 index = 1; - * - *
-             * *字段下标*
-             * 
- */ - public Builder setIndex(int value) { - bitField0_ |= 0x00000001; - index_ = value; - onChanged(); - return this; - } - - /** - * optional int32 index = 1; - * - *
-             * *字段下标*
-             * 
- */ - public Builder clearIndex() { - bitField0_ = (bitField0_ & ~0x00000001); - index_ = 0; - onChanged(); - return this; - } - - private int sqlType_; - - /** - * optional int32 sqlType = 2; - * - *
-             * *字段java中类型*
-             * 
- */ - public boolean hasSqlType() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - - /** - * optional int32 sqlType = 2; - * - *
-             * *字段java中类型*
-             * 
- */ - public int getSqlType() { - return sqlType_; - } - - /** - * optional int32 sqlType = 2; - * - *
-             * *字段java中类型*
-             * 
- */ - public Builder setSqlType(int value) { - bitField0_ |= 0x00000002; - sqlType_ = value; - onChanged(); - return this; - } - - /** - * optional int32 sqlType = 2; - * - *
-             * *字段java中类型*
-             * 
- */ - public Builder clearSqlType() { - bitField0_ = (bitField0_ & ~0x00000002); - sqlType_ = 0; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - - /** - * optional string name = 3; - * - *
-             * *字段名称(忽略大小写),在mysql中是没有的*
-             * 
- */ - public boolean hasName() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - - /** - * optional string name = 3; - * - *
-             * *字段名称(忽略大小写),在mysql中是没有的*
-             * 
- */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - name_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * optional string name = 3; - * - *
-             * *字段名称(忽略大小写),在mysql中是没有的*
-             * 
- */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * optional string name = 3; - * - *
-             * *字段名称(忽略大小写),在mysql中是没有的*
-             * 
- */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - name_ = value; - onChanged(); - return this; - } - - /** - * optional string name = 3; - * - *
-             * *字段名称(忽略大小写),在mysql中是没有的*
-             * 
- */ - public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000004); - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - - /** - * optional string name = 3; - * - *
-             * *字段名称(忽略大小写),在mysql中是没有的*
-             * 
- */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - name_ = value; - onChanged(); - return this; - } - - private boolean isKey_; - - /** - * optional bool isKey = 4; - * - *
-             * *是否是主键*
-             * 
- */ - public boolean hasIsKey() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - - /** - * optional bool isKey = 4; - * - *
-             * *是否是主键*
-             * 
- */ - public boolean getIsKey() { - return isKey_; - } - - /** - * optional bool isKey = 4; - * - *
-             * *是否是主键*
-             * 
- */ - public Builder setIsKey(boolean value) { - bitField0_ |= 0x00000008; - isKey_ = value; - onChanged(); - return this; - } - - /** - * optional bool isKey = 4; - * - *
-             * *是否是主键*
-             * 
- */ - public Builder clearIsKey() { - bitField0_ = (bitField0_ & ~0x00000008); - isKey_ = false; - onChanged(); - return this; - } - - private boolean updated_; - - /** - * optional bool updated = 5; - * - *
-             * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
-             * 
- */ - public boolean hasUpdated() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - - /** - * optional bool updated = 5; - * - *
-             * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
-             * 
- */ - public boolean getUpdated() { - return updated_; - } - - /** - * optional bool updated = 5; - * - *
-             * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
-             * 
- */ - public Builder setUpdated(boolean value) { - bitField0_ |= 0x00000010; - updated_ = value; - onChanged(); - return this; - } - - /** - * optional bool updated = 5; - * - *
-             * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
-             * 
- */ - public Builder clearUpdated() { - bitField0_ = (bitField0_ & ~0x00000010); - updated_ = false; - onChanged(); - return this; - } - - private boolean isNull_; - - /** - * optional bool isNull = 6 [default = false]; - * - *
-             * * 标识是否为空  *
-             * 
- */ - public boolean hasIsNull() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - - /** - * optional bool isNull = 6 [default = false]; - * - *
-             * * 标识是否为空  *
-             * 
- */ - public boolean getIsNull() { - return isNull_; - } - - /** - * optional bool isNull = 6 [default = false]; - * - *
-             * * 标识是否为空  *
-             * 
- */ - public Builder setIsNull(boolean value) { - bitField0_ |= 0x00000020; - isNull_ = value; - onChanged(); - return this; - } - - /** - * optional bool isNull = 6 [default = false]; - * - *
-             * * 标识是否为空  *
-             * 
- */ - public Builder clearIsNull() { - bitField0_ = (bitField0_ & ~0x00000020); - isNull_ = false; - onChanged(); - return this; - } - - private java.util.List props_ = java.util.Collections.emptyList(); - - private void ensurePropsIsMutable() { - if (!((bitField0_ & 0x00000040) == 0x00000040)) { - props_ = new java.util.ArrayList(props_); - bitField0_ |= 0x00000040; - } - } - - private com.google.protobuf.RepeatedFieldBuilder propsBuilder_; - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-             * *预留扩展*
-             * 
- */ - public java.util.List getPropsList() { - if (propsBuilder_ == null) { - return java.util.Collections.unmodifiableList(props_); - } else { - return propsBuilder_.getMessageList(); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-             * *预留扩展*
-             * 
- */ - public int getPropsCount() { - if (propsBuilder_ == null) { - return props_.size(); - } else { - return propsBuilder_.getCount(); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { - if (propsBuilder_ == null) { - return props_.get(index); - } else { - return propsBuilder_.getMessage(index); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder setProps(int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { - if (propsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropsIsMutable(); - props_.set(index, value); - onChanged(); - } else { - propsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder setProps(int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - props_.set(index, builderForValue.build()); - onChanged(); - } else { - propsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { - if (propsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropsIsMutable(); - props_.add(value); - onChanged(); - } else { - propsBuilder_.addMessage(value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addProps(int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { - if (propsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropsIsMutable(); - props_.add(index, value); - onChanged(); - } else { - propsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - props_.add(builderForValue.build()); - onChanged(); - } else { - propsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addProps(int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - props_.add(index, builderForValue.build()); - onChanged(); - } else { - propsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addAllProps(java.lang.Iterable values) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, props_); - onChanged(); - } else { - propsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder clearProps() { - if (propsBuilder_ == null) { - props_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - } else { - propsBuilder_.clear(); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder removeProps(int index) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - props_.remove(index); - onChanged(); - } else { - propsBuilder_.remove(index); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder getPropsBuilder(int index) { - return getPropsFieldBuilder().getBuilder(index); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder(int index) { - if (propsBuilder_ == null) { - return props_.get(index); - } else { - return propsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-             * *预留扩展*
-             * 
- */ - public java.util.List getPropsOrBuilderList() { - if (propsBuilder_ != null) { - return propsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(props_); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { - return getPropsFieldBuilder().addBuilder(com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder(int index) { - return getPropsFieldBuilder().addBuilder(index, - com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-             * *预留扩展*
-             * 
- */ - public java.util.List getPropsBuilderList() { - return getPropsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder getPropsFieldBuilder() { - if (propsBuilder_ == null) { - propsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder(props_, - ((bitField0_ & 0x00000040) == 0x00000040), - getParentForChildren(), - isClean()); - props_ = null; - } - return propsBuilder_; - } - - private java.lang.Object value_ = ""; - - /** - * optional string value = 8; - * - *
-             * * 字段值,timestamp,Datetime是一个时间格式的文本 *
-             * 
- */ - public boolean hasValue() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - - /** - * optional string value = 8; - * - *
-             * * 字段值,timestamp,Datetime是一个时间格式的文本 *
-             * 
- */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - value_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * optional string value = 8; - * - *
-             * * 字段值,timestamp,Datetime是一个时间格式的文本 *
-             * 
- */ - public com.google.protobuf.ByteString getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * optional string value = 8; - * - *
-             * * 字段值,timestamp,Datetime是一个时间格式的文本 *
-             * 
- */ - public Builder setValue(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; - value_ = value; - onChanged(); - return this; - } - - /** - * optional string value = 8; - * - *
-             * * 字段值,timestamp,Datetime是一个时间格式的文本 *
-             * 
- */ - public Builder clearValue() { - bitField0_ = (bitField0_ & ~0x00000080); - value_ = getDefaultInstance().getValue(); - onChanged(); - return this; - } - - /** - * optional string value = 8; - * - *
-             * * 字段值,timestamp,Datetime是一个时间格式的文本 *
-             * 
- */ - public Builder setValueBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; - value_ = value; - onChanged(); - return this; - } - - private int length_; - - /** - * optional int32 length = 9; - * - *
-             * * 对应数据对象原始长度 *
-             * 
- */ - public boolean hasLength() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - - /** - * optional int32 length = 9; - * - *
-             * * 对应数据对象原始长度 *
-             * 
- */ - public int getLength() { - return length_; - } - - /** - * optional int32 length = 9; - * - *
-             * * 对应数据对象原始长度 *
-             * 
- */ - public Builder setLength(int value) { - bitField0_ |= 0x00000100; - length_ = value; - onChanged(); - return this; - } - - /** - * optional int32 length = 9; - * - *
-             * * 对应数据对象原始长度 *
-             * 
- */ - public Builder clearLength() { - bitField0_ = (bitField0_ & ~0x00000100); - length_ = 0; - onChanged(); - return this; - } - - private java.lang.Object mysqlType_ = ""; - - /** - * optional string mysqlType = 10; - * - *
-             * *字段mysql类型*
-             * 
- */ - public boolean hasMysqlType() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - - /** - * optional string mysqlType = 10; - * - *
-             * *字段mysql类型*
-             * 
- */ - public java.lang.String getMysqlType() { - java.lang.Object ref = mysqlType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - mysqlType_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * optional string mysqlType = 10; - * - *
-             * *字段mysql类型*
-             * 
- */ - public com.google.protobuf.ByteString getMysqlTypeBytes() { - java.lang.Object ref = mysqlType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - mysqlType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * optional string mysqlType = 10; - * - *
-             * *字段mysql类型*
-             * 
- */ - public Builder setMysqlType(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000200; - mysqlType_ = value; - onChanged(); - return this; - } - - /** - * optional string mysqlType = 10; - * - *
-             * *字段mysql类型*
-             * 
- */ - public Builder clearMysqlType() { - bitField0_ = (bitField0_ & ~0x00000200); - mysqlType_ = getDefaultInstance().getMysqlType(); - onChanged(); - return this; - } - - /** - * optional string mysqlType = 10; - * - *
-             * *字段mysql类型*
-             * 
- */ - public Builder setMysqlTypeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000200; - mysqlType_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Column) + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalEntry.Column.class, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder.class); + } + + // Construct using com.alibaba.otter.canal.protocol.CanalEntry.Column.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getPropsFieldBuilder(); } + } + private static Builder create() { + return new Builder(); + } - static { - defaultInstance = new Column(true); - defaultInstance.initFields(); + public Builder clear() { + super.clear(); + index_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + sqlType_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + isKey_ = false; + bitField0_ = (bitField0_ & ~0x00000008); + updated_ = false; + bitField0_ = (bitField0_ & ~0x00000010); + isNull_ = false; + bitField0_ = (bitField0_ & ~0x00000020); + if (propsBuilder_ == null) { + props_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + } else { + propsBuilder_.clear(); } + value_ = ""; + bitField0_ = (bitField0_ & ~0x00000080); + length_ = 0; + bitField0_ = (bitField0_ & ~0x00000100); + mysqlType_ = ""; + bitField0_ = (bitField0_ & ~0x00000200); + return this; + } - // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Column) + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_descriptor; + } + + public com.alibaba.otter.canal.protocol.CanalEntry.Column getDefaultInstanceForType() { + return com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance(); + } + + public com.alibaba.otter.canal.protocol.CanalEntry.Column build() { + com.alibaba.otter.canal.protocol.CanalEntry.Column result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.alibaba.otter.canal.protocol.CanalEntry.Column buildPartial() { + com.alibaba.otter.canal.protocol.CanalEntry.Column result = new com.alibaba.otter.canal.protocol.CanalEntry.Column(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.index_ = index_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.sqlType_ = sqlType_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.name_ = name_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.isKey_ = isKey_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.updated_ = updated_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.isNull_ = isNull_; + if (propsBuilder_ == null) { + if (((bitField0_ & 0x00000040) == 0x00000040)) { + props_ = java.util.Collections.unmodifiableList(props_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.props_ = props_; + } else { + result.props_ = propsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000040; + } + result.value_ = value_; + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000080; + } + result.length_ = length_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000100; + } + result.mysqlType_ = mysqlType_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.Column) { + return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.Column)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalEntry.Column other) { + if (other == com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance()) return this; + if (other.hasIndex()) { + setIndex(other.getIndex()); + } + if (other.hasSqlType()) { + setSqlType(other.getSqlType()); + } + if (other.hasName()) { + bitField0_ |= 0x00000004; + name_ = other.name_; + onChanged(); + } + if (other.hasIsKey()) { + setIsKey(other.getIsKey()); + } + if (other.hasUpdated()) { + setUpdated(other.getUpdated()); + } + if (other.hasIsNull()) { + setIsNull(other.getIsNull()); + } + if (propsBuilder_ == null) { + if (!other.props_.isEmpty()) { + if (props_.isEmpty()) { + props_ = other.props_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensurePropsIsMutable(); + props_.addAll(other.props_); + } + onChanged(); + } + } else { + if (!other.props_.isEmpty()) { + if (propsBuilder_.isEmpty()) { + propsBuilder_.dispose(); + propsBuilder_ = null; + props_ = other.props_; + bitField0_ = (bitField0_ & ~0x00000040); + propsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getPropsFieldBuilder() : null; + } else { + propsBuilder_.addAllMessages(other.props_); + } + } + } + if (other.hasValue()) { + bitField0_ |= 0x00000080; + value_ = other.value_; + onChanged(); + } + if (other.hasLength()) { + setLength(other.getLength()); + } + if (other.hasMysqlType()) { + bitField0_ |= 0x00000200; + mysqlType_ = other.mysqlType_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.alibaba.otter.canal.protocol.CanalEntry.Column parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalEntry.Column) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int index_ ; + /** + * optional int32 index = 1; + * + *
+       **字段下标*
+       * 
+ */ + public boolean hasIndex() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 index = 1; + * + *
+       **字段下标*
+       * 
+ */ + public int getIndex() { + return index_; + } + /** + * optional int32 index = 1; + * + *
+       **字段下标*
+       * 
+ */ + public Builder setIndex(int value) { + bitField0_ |= 0x00000001; + index_ = value; + onChanged(); + return this; + } + /** + * optional int32 index = 1; + * + *
+       **字段下标*
+       * 
+ */ + public Builder clearIndex() { + bitField0_ = (bitField0_ & ~0x00000001); + index_ = 0; + onChanged(); + return this; + } + + private int sqlType_ ; + /** + * optional int32 sqlType = 2; + * + *
+       **字段java中类型*
+       * 
+ */ + public boolean hasSqlType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 sqlType = 2; + * + *
+       **字段java中类型*
+       * 
+ */ + public int getSqlType() { + return sqlType_; + } + /** + * optional int32 sqlType = 2; + * + *
+       **字段java中类型*
+       * 
+ */ + public Builder setSqlType(int value) { + bitField0_ |= 0x00000002; + sqlType_ = value; + onChanged(); + return this; + } + /** + * optional int32 sqlType = 2; + * + *
+       **字段java中类型*
+       * 
+ */ + public Builder clearSqlType() { + bitField0_ = (bitField0_ & ~0x00000002); + sqlType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * optional string name = 3; + * + *
+       **字段名称(忽略大小写),在mysql中是没有的*
+       * 
+ */ + public boolean hasName() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional string name = 3; + * + *
+       **字段名称(忽略大小写),在mysql中是没有的*
+       * 
+ */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 3; + * + *
+       **字段名称(忽略大小写),在mysql中是没有的*
+       * 
+ */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 3; + * + *
+       **字段名称(忽略大小写),在mysql中是没有的*
+       * 
+ */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 3; + * + *
+       **字段名称(忽略大小写),在mysql中是没有的*
+       * 
+ */ + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000004); + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 3; + * + *
+       **字段名称(忽略大小写),在mysql中是没有的*
+       * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + name_ = value; + onChanged(); + return this; + } + + private boolean isKey_ ; + /** + * optional bool isKey = 4; + * + *
+       **是否是主键*
+       * 
+ */ + public boolean hasIsKey() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional bool isKey = 4; + * + *
+       **是否是主键*
+       * 
+ */ + public boolean getIsKey() { + return isKey_; + } + /** + * optional bool isKey = 4; + * + *
+       **是否是主键*
+       * 
+ */ + public Builder setIsKey(boolean value) { + bitField0_ |= 0x00000008; + isKey_ = value; + onChanged(); + return this; + } + /** + * optional bool isKey = 4; + * + *
+       **是否是主键*
+       * 
+ */ + public Builder clearIsKey() { + bitField0_ = (bitField0_ & ~0x00000008); + isKey_ = false; + onChanged(); + return this; + } + + private boolean updated_ ; + /** + * optional bool updated = 5; + * + *
+       **如果EventType=UPDATE,用于标识这个字段值是否有修改*
+       * 
+ */ + public boolean hasUpdated() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional bool updated = 5; + * + *
+       **如果EventType=UPDATE,用于标识这个字段值是否有修改*
+       * 
+ */ + public boolean getUpdated() { + return updated_; + } + /** + * optional bool updated = 5; + * + *
+       **如果EventType=UPDATE,用于标识这个字段值是否有修改*
+       * 
+ */ + public Builder setUpdated(boolean value) { + bitField0_ |= 0x00000010; + updated_ = value; + onChanged(); + return this; + } + /** + * optional bool updated = 5; + * + *
+       **如果EventType=UPDATE,用于标识这个字段值是否有修改*
+       * 
+ */ + public Builder clearUpdated() { + bitField0_ = (bitField0_ & ~0x00000010); + updated_ = false; + onChanged(); + return this; + } + + private boolean isNull_ ; + /** + * optional bool isNull = 6 [default = false]; + * + *
+       ** 标识是否为空  *
+       * 
+ */ + public boolean hasIsNull() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional bool isNull = 6 [default = false]; + * + *
+       ** 标识是否为空  *
+       * 
+ */ + public boolean getIsNull() { + return isNull_; + } + /** + * optional bool isNull = 6 [default = false]; + * + *
+       ** 标识是否为空  *
+       * 
+ */ + public Builder setIsNull(boolean value) { + bitField0_ |= 0x00000020; + isNull_ = value; + onChanged(); + return this; + } + /** + * optional bool isNull = 6 [default = false]; + * + *
+       ** 标识是否为空  *
+       * 
+ */ + public Builder clearIsNull() { + bitField0_ = (bitField0_ & ~0x00000020); + isNull_ = false; + onChanged(); + return this; + } + + private java.util.List props_ = + java.util.Collections.emptyList(); + private void ensurePropsIsMutable() { + if (!((bitField0_ & 0x00000040) == 0x00000040)) { + props_ = new java.util.ArrayList(props_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> propsBuilder_; + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ + public java.util.List getPropsList() { + if (propsBuilder_ == null) { + return java.util.Collections.unmodifiableList(props_); + } else { + return propsBuilder_.getMessageList(); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ + public int getPropsCount() { + if (propsBuilder_ == null) { + return props_.size(); + } else { + return propsBuilder_.getCount(); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { + if (propsBuilder_ == null) { + return props_.get(index); + } else { + return propsBuilder_.getMessage(index); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder setProps( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { + if (propsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropsIsMutable(); + props_.set(index, value); + onChanged(); + } else { + propsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder setProps( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.set(index, builderForValue.build()); + onChanged(); + } else { + propsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { + if (propsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropsIsMutable(); + props_.add(value); + onChanged(); + } else { + propsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addProps( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { + if (propsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropsIsMutable(); + props_.add(index, value); + onChanged(); + } else { + propsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addProps( + com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.add(builderForValue.build()); + onChanged(); + } else { + propsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addProps( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.add(index, builderForValue.build()); + onChanged(); + } else { + propsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addAllProps( + java.lang.Iterable values) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, props_); + onChanged(); + } else { + propsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder clearProps() { + if (propsBuilder_ == null) { + props_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + propsBuilder_.clear(); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder removeProps(int index) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.remove(index); + onChanged(); + } else { + propsBuilder_.remove(index); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder getPropsBuilder( + int index) { + return getPropsFieldBuilder().getBuilder(index); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( + int index) { + if (propsBuilder_ == null) { + return props_.get(index); } else { + return propsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ + public java.util.List + getPropsOrBuilderList() { + if (propsBuilder_ != null) { + return propsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(props_); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { + return getPropsFieldBuilder().addBuilder( + com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder( + int index) { + return getPropsFieldBuilder().addBuilder( + index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+       **预留扩展*
+       * 
+ */ + public java.util.List + getPropsBuilderList() { + return getPropsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> + getPropsFieldBuilder() { + if (propsBuilder_ == null) { + propsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder>( + props_, + ((bitField0_ & 0x00000040) == 0x00000040), + getParentForChildren(), + isClean()); + props_ = null; + } + return propsBuilder_; + } + + private java.lang.Object value_ = ""; + /** + * optional string value = 8; + * + *
+       ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+       * 
+ */ + public boolean hasValue() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional string value = 8; + * + *
+       ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+       * 
+ */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + value_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string value = 8; + * + *
+       ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+       * 
+ */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string value = 8; + * + *
+       ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+       * 
+ */ + public Builder setValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + value_ = value; + onChanged(); + return this; + } + /** + * optional string value = 8; + * + *
+       ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+       * 
+ */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000080); + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + * optional string value = 8; + * + *
+       ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+       * 
+ */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + value_ = value; + onChanged(); + return this; + } + + private int length_ ; + /** + * optional int32 length = 9; + * + *
+       ** 对应数据对象原始长度 *
+       * 
+ */ + public boolean hasLength() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional int32 length = 9; + * + *
+       ** 对应数据对象原始长度 *
+       * 
+ */ + public int getLength() { + return length_; + } + /** + * optional int32 length = 9; + * + *
+       ** 对应数据对象原始长度 *
+       * 
+ */ + public Builder setLength(int value) { + bitField0_ |= 0x00000100; + length_ = value; + onChanged(); + return this; + } + /** + * optional int32 length = 9; + * + *
+       ** 对应数据对象原始长度 *
+       * 
+ */ + public Builder clearLength() { + bitField0_ = (bitField0_ & ~0x00000100); + length_ = 0; + onChanged(); + return this; + } + + private java.lang.Object mysqlType_ = ""; + /** + * optional string mysqlType = 10; + * + *
+       **字段mysql类型*
+       * 
+ */ + public boolean hasMysqlType() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional string mysqlType = 10; + * + *
+       **字段mysql类型*
+       * 
+ */ + public java.lang.String getMysqlType() { + java.lang.Object ref = mysqlType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + mysqlType_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string mysqlType = 10; + * + *
+       **字段mysql类型*
+       * 
+ */ + public com.google.protobuf.ByteString + getMysqlTypeBytes() { + java.lang.Object ref = mysqlType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mysqlType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string mysqlType = 10; + * + *
+       **字段mysql类型*
+       * 
+ */ + public Builder setMysqlType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + mysqlType_ = value; + onChanged(); + return this; + } + /** + * optional string mysqlType = 10; + * + *
+       **字段mysql类型*
+       * 
+ */ + public Builder clearMysqlType() { + bitField0_ = (bitField0_ & ~0x00000200); + mysqlType_ = getDefaultInstance().getMysqlType(); + onChanged(); + return this; + } + /** + * optional string mysqlType = 10; + * + *
+       **字段mysql类型*
+       * 
+ */ + public Builder setMysqlTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + mysqlType_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Column) } - public interface RowDataOrBuilder extends - // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.RowData) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-         * * 字段信息,增量数据(修改前,删除前) *
-         * 
- */ - java.util.List getBeforeColumnsList(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-         * * 字段信息,增量数据(修改前,删除前) *
-         * 
- */ - com.alibaba.otter.canal.protocol.CanalEntry.Column getBeforeColumns(int index); - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-         * * 字段信息,增量数据(修改前,删除前) *
-         * 
- */ - int getBeforeColumnsCount(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-         * * 字段信息,增量数据(修改前,删除前) *
-         * 
- */ - java.util.List getBeforeColumnsOrBuilderList(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-         * * 字段信息,增量数据(修改前,删除前) *
-         * 
- */ - com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getBeforeColumnsOrBuilder(int index); - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-         * * 字段信息,增量数据(修改后,新增后)  *
-         * 
- */ - java.util.List getAfterColumnsList(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-         * * 字段信息,增量数据(修改后,新增后)  *
-         * 
- */ - com.alibaba.otter.canal.protocol.CanalEntry.Column getAfterColumns(int index); - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-         * * 字段信息,增量数据(修改后,新增后)  *
-         * 
- */ - int getAfterColumnsCount(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-         * * 字段信息,增量数据(修改后,新增后)  *
-         * 
- */ - java.util.List getAfterColumnsOrBuilderList(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-         * * 字段信息,增量数据(修改后,新增后)  *
-         * 
- */ - com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getAfterColumnsOrBuilder(int index); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - java.util.List getPropsList(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - int getPropsCount(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - java.util.List getPropsOrBuilderList(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder(int index); + static { + defaultInstance = new Column(true); + defaultInstance.initFields(); } + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Column) + } + + public interface RowDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.RowData) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+     ** 字段信息,增量数据(修改前,删除前) *
+     * 
+ */ + java.util.List + getBeforeColumnsList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+     ** 字段信息,增量数据(修改前,删除前) *
+     * 
+ */ + com.alibaba.otter.canal.protocol.CanalEntry.Column getBeforeColumns(int index); + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+     ** 字段信息,增量数据(修改前,删除前) *
+     * 
+ */ + int getBeforeColumnsCount(); + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+     ** 字段信息,增量数据(修改前,删除前) *
+     * 
+ */ + java.util.List + getBeforeColumnsOrBuilderList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+     ** 字段信息,增量数据(修改前,删除前) *
+     * 
+ */ + com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getBeforeColumnsOrBuilder( + int index); + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+     ** 字段信息,增量数据(修改后,新增后)  *
+     * 
+ */ + java.util.List + getAfterColumnsList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+     ** 字段信息,增量数据(修改后,新增后)  *
+     * 
+ */ + com.alibaba.otter.canal.protocol.CanalEntry.Column getAfterColumns(int index); + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+     ** 字段信息,增量数据(修改后,新增后)  *
+     * 
+ */ + int getAfterColumnsCount(); + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+     ** 字段信息,增量数据(修改后,新增后)  *
+     * 
+ */ + java.util.List + getAfterColumnsOrBuilderList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+     ** 字段信息,增量数据(修改后,新增后)  *
+     * 
+ */ + com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getAfterColumnsOrBuilder( + int index); + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + java.util.List + getPropsList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + int getPropsCount(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + java.util.List + getPropsOrBuilderList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( + int index); + } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.RowData} + */ + public static final class RowData extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.RowData) + RowDataOrBuilder { + // Use RowData.newBuilder() to construct. + private RowData(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private RowData(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final RowData defaultInstance; + public static RowData getDefaultInstance() { + return defaultInstance; + } + + public RowData getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RowData( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + beforeColumns_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + beforeColumns_.add(input.readMessage(com.alibaba.otter.canal.protocol.CanalEntry.Column.PARSER, extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + afterColumns_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + afterColumns_.add(input.readMessage(com.alibaba.otter.canal.protocol.CanalEntry.Column.PARSER, extensionRegistry)); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + props_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + props_.add(input.readMessage(com.alibaba.otter.canal.protocol.CanalEntry.Pair.PARSER, extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + beforeColumns_ = java.util.Collections.unmodifiableList(beforeColumns_); + } + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + afterColumns_ = java.util.Collections.unmodifiableList(afterColumns_); + } + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + props_ = java.util.Collections.unmodifiableList(props_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalEntry.RowData.class, com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public RowData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RowData(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public static final int BEFORECOLUMNS_FIELD_NUMBER = 1; + private java.util.List beforeColumns_; + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+     ** 字段信息,增量数据(修改前,删除前) *
+     * 
+ */ + public java.util.List getBeforeColumnsList() { + return beforeColumns_; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+     ** 字段信息,增量数据(修改前,删除前) *
+     * 
+ */ + public java.util.List + getBeforeColumnsOrBuilderList() { + return beforeColumns_; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+     ** 字段信息,增量数据(修改前,删除前) *
+     * 
+ */ + public int getBeforeColumnsCount() { + return beforeColumns_.size(); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+     ** 字段信息,增量数据(修改前,删除前) *
+     * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Column getBeforeColumns(int index) { + return beforeColumns_.get(index); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+     ** 字段信息,增量数据(修改前,删除前) *
+     * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getBeforeColumnsOrBuilder( + int index) { + return beforeColumns_.get(index); + } + + public static final int AFTERCOLUMNS_FIELD_NUMBER = 2; + private java.util.List afterColumns_; + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+     ** 字段信息,增量数据(修改后,新增后)  *
+     * 
+ */ + public java.util.List getAfterColumnsList() { + return afterColumns_; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+     ** 字段信息,增量数据(修改后,新增后)  *
+     * 
+ */ + public java.util.List + getAfterColumnsOrBuilderList() { + return afterColumns_; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+     ** 字段信息,增量数据(修改后,新增后)  *
+     * 
+ */ + public int getAfterColumnsCount() { + return afterColumns_.size(); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+     ** 字段信息,增量数据(修改后,新增后)  *
+     * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Column getAfterColumns(int index) { + return afterColumns_.get(index); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+     ** 字段信息,增量数据(修改后,新增后)  *
+     * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getAfterColumnsOrBuilder( + int index) { + return afterColumns_.get(index); + } + + public static final int PROPS_FIELD_NUMBER = 3; + private java.util.List props_; + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + public java.util.List getPropsList() { + return props_; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + public java.util.List + getPropsOrBuilderList() { + return props_; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + public int getPropsCount() { + return props_.size(); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { + return props_.get(index); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( + int index) { + return props_.get(index); + } + + private void initFields() { + beforeColumns_ = java.util.Collections.emptyList(); + afterColumns_ = java.util.Collections.emptyList(); + props_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < beforeColumns_.size(); i++) { + output.writeMessage(1, beforeColumns_.get(i)); + } + for (int i = 0; i < afterColumns_.size(); i++) { + output.writeMessage(2, afterColumns_.get(i)); + } + for (int i = 0; i < props_.size(); i++) { + output.writeMessage(3, props_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < beforeColumns_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, beforeColumns_.get(i)); + } + for (int i = 0; i < afterColumns_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, afterColumns_.get(i)); + } + for (int i = 0; i < props_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, props_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.RowData prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } /** * Protobuf type {@code com.alibaba.otter.canal.protocol.RowData} */ - public static final class RowData extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.RowData) - RowDataOrBuilder { - - // Use RowData.newBuilder() to construct. - private RowData(com.google.protobuf.GeneratedMessage.Builder builder){ - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - - private RowData(boolean noInit){ - this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - - private static final RowData defaultInstance; - - public static RowData getDefaultInstance() { - return defaultInstance; - } - - public RowData getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private RowData(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException{ - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - beforeColumns_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - beforeColumns_.add(input.readMessage(com.alibaba.otter.canal.protocol.CanalEntry.Column.PARSER, - extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - afterColumns_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - afterColumns_.add(input.readMessage(com.alibaba.otter.canal.protocol.CanalEntry.Column.PARSER, - extensionRegistry)); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - props_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - props_.add(input.readMessage(com.alibaba.otter.canal.protocol.CanalEntry.Pair.PARSER, - extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - beforeColumns_ = java.util.Collections.unmodifiableList(beforeColumns_); - } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - afterColumns_ = java.util.Collections.unmodifiableList(afterColumns_); - } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - props_ = java.util.Collections.unmodifiableList(props_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_fieldAccessorTable.ensureFieldAccessorsInitialized(com.alibaba.otter.canal.protocol.CanalEntry.RowData.class, - com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - - public RowData parsePartialFrom(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RowData(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public static final int BEFORECOLUMNS_FIELD_NUMBER = 1; - private java.util.List beforeColumns_; - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-         * * 字段信息,增量数据(修改前,删除前) *
-         * 
- */ - public java.util.List getBeforeColumnsList() { - return beforeColumns_; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-         * * 字段信息,增量数据(修改前,删除前) *
-         * 
- */ - public java.util.List getBeforeColumnsOrBuilderList() { - return beforeColumns_; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-         * * 字段信息,增量数据(修改前,删除前) *
-         * 
- */ - public int getBeforeColumnsCount() { - return beforeColumns_.size(); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-         * * 字段信息,增量数据(修改前,删除前) *
-         * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Column getBeforeColumns(int index) { - return beforeColumns_.get(index); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-         * * 字段信息,增量数据(修改前,删除前) *
-         * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getBeforeColumnsOrBuilder(int index) { - return beforeColumns_.get(index); - } - - public static final int AFTERCOLUMNS_FIELD_NUMBER = 2; - private java.util.List afterColumns_; - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-         * * 字段信息,增量数据(修改后,新增后)  *
-         * 
- */ - public java.util.List getAfterColumnsList() { - return afterColumns_; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-         * * 字段信息,增量数据(修改后,新增后)  *
-         * 
- */ - public java.util.List getAfterColumnsOrBuilderList() { - return afterColumns_; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-         * * 字段信息,增量数据(修改后,新增后)  *
-         * 
- */ - public int getAfterColumnsCount() { - return afterColumns_.size(); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-         * * 字段信息,增量数据(修改后,新增后)  *
-         * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Column getAfterColumns(int index) { - return afterColumns_.get(index); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-         * * 字段信息,增量数据(修改后,新增后)  *
-         * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getAfterColumnsOrBuilder(int index) { - return afterColumns_.get(index); - } - - public static final int PROPS_FIELD_NUMBER = 3; - private java.util.List props_; - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - public java.util.List getPropsList() { - return props_; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - public java.util.List getPropsOrBuilderList() { - return props_; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - public int getPropsCount() { - return props_.size(); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { - return props_.get(index); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder(int index) { - return props_.get(index); - } - - private void initFields() { - beforeColumns_ = java.util.Collections.emptyList(); - afterColumns_ = java.util.Collections.emptyList(); - props_ = java.util.Collections.emptyList(); - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - for (int i = 0; i < beforeColumns_.size(); i++) { - output.writeMessage(1, beforeColumns_.get(i)); - } - for (int i = 0; i < afterColumns_.size(); i++) { - output.writeMessage(2, afterColumns_.get(i)); - } - for (int i = 0; i < props_.size(); i++) { - output.writeMessage(3, props_.get(i)); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < beforeColumns_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, beforeColumns_.get(i)); - } - for (int i = 0; i < afterColumns_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, afterColumns_.get(i)); - } - for (int i = 0; i < props_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, props_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - - @java.lang.Override - protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom(com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom(byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom(java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseDelimitedFrom(java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.RowData parseFrom(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { - return Builder.create(); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.RowData prototype) { - return newBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return newBuilder(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.RowData} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.RowData) com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder { - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_fieldAccessorTable.ensureFieldAccessorsInitialized(com.alibaba.otter.canal.protocol.CanalEntry.RowData.class, - com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder.class); - } - - // Construct using - // com.alibaba.otter.canal.protocol.CanalEntry.RowData.newBuilder() - private Builder(){ - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent){ - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getBeforeColumnsFieldBuilder(); - getAfterColumnsFieldBuilder(); - getPropsFieldBuilder(); - } - } - - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - if (beforeColumnsBuilder_ == null) { - beforeColumns_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - beforeColumnsBuilder_.clear(); - } - if (afterColumnsBuilder_ == null) { - afterColumns_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - afterColumnsBuilder_.clear(); - } - if (propsBuilder_ == null) { - props_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - propsBuilder_.clear(); - } - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor; - } - - public com.alibaba.otter.canal.protocol.CanalEntry.RowData getDefaultInstanceForType() { - return com.alibaba.otter.canal.protocol.CanalEntry.RowData.getDefaultInstance(); - } - - public com.alibaba.otter.canal.protocol.CanalEntry.RowData build() { - com.alibaba.otter.canal.protocol.CanalEntry.RowData result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.alibaba.otter.canal.protocol.CanalEntry.RowData buildPartial() { - com.alibaba.otter.canal.protocol.CanalEntry.RowData result = new com.alibaba.otter.canal.protocol.CanalEntry.RowData(this); - int from_bitField0_ = bitField0_; - if (beforeColumnsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - beforeColumns_ = java.util.Collections.unmodifiableList(beforeColumns_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.beforeColumns_ = beforeColumns_; - } else { - result.beforeColumns_ = beforeColumnsBuilder_.build(); - } - if (afterColumnsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - afterColumns_ = java.util.Collections.unmodifiableList(afterColumns_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.afterColumns_ = afterColumns_; - } else { - result.afterColumns_ = afterColumnsBuilder_.build(); - } - if (propsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { - props_ = java.util.Collections.unmodifiableList(props_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.props_ = props_; - } else { - result.props_ = propsBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.RowData) { - return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.RowData) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalEntry.RowData other) { - if (other == com.alibaba.otter.canal.protocol.CanalEntry.RowData.getDefaultInstance()) return this; - if (beforeColumnsBuilder_ == null) { - if (!other.beforeColumns_.isEmpty()) { - if (beforeColumns_.isEmpty()) { - beforeColumns_ = other.beforeColumns_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBeforeColumnsIsMutable(); - beforeColumns_.addAll(other.beforeColumns_); - } - onChanged(); - } - } else { - if (!other.beforeColumns_.isEmpty()) { - if (beforeColumnsBuilder_.isEmpty()) { - beforeColumnsBuilder_.dispose(); - beforeColumnsBuilder_ = null; - beforeColumns_ = other.beforeColumns_; - bitField0_ = (bitField0_ & ~0x00000001); - beforeColumnsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getBeforeColumnsFieldBuilder() : null; - } else { - beforeColumnsBuilder_.addAllMessages(other.beforeColumns_); - } - } - } - if (afterColumnsBuilder_ == null) { - if (!other.afterColumns_.isEmpty()) { - if (afterColumns_.isEmpty()) { - afterColumns_ = other.afterColumns_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureAfterColumnsIsMutable(); - afterColumns_.addAll(other.afterColumns_); - } - onChanged(); - } - } else { - if (!other.afterColumns_.isEmpty()) { - if (afterColumnsBuilder_.isEmpty()) { - afterColumnsBuilder_.dispose(); - afterColumnsBuilder_ = null; - afterColumns_ = other.afterColumns_; - bitField0_ = (bitField0_ & ~0x00000002); - afterColumnsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getAfterColumnsFieldBuilder() : null; - } else { - afterColumnsBuilder_.addAllMessages(other.afterColumns_); - } - } - } - if (propsBuilder_ == null) { - if (!other.props_.isEmpty()) { - if (props_.isEmpty()) { - props_ = other.props_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensurePropsIsMutable(); - props_.addAll(other.props_); - } - onChanged(); - } - } else { - if (!other.props_.isEmpty()) { - if (propsBuilder_.isEmpty()) { - propsBuilder_.dispose(); - propsBuilder_ = null; - props_ = other.props_; - bitField0_ = (bitField0_ & ~0x00000004); - propsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getPropsFieldBuilder() : null; - } else { - propsBuilder_.addAllMessages(other.props_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.alibaba.otter.canal.protocol.CanalEntry.RowData parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.CanalEntry.RowData) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List beforeColumns_ = java.util.Collections.emptyList(); - - private void ensureBeforeColumnsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - beforeColumns_ = new java.util.ArrayList(beforeColumns_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder beforeColumnsBuilder_; - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-             * * 字段信息,增量数据(修改前,删除前) *
-             * 
- */ - public java.util.List getBeforeColumnsList() { - if (beforeColumnsBuilder_ == null) { - return java.util.Collections.unmodifiableList(beforeColumns_); - } else { - return beforeColumnsBuilder_.getMessageList(); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-             * * 字段信息,增量数据(修改前,删除前) *
-             * 
- */ - public int getBeforeColumnsCount() { - if (beforeColumnsBuilder_ == null) { - return beforeColumns_.size(); - } else { - return beforeColumnsBuilder_.getCount(); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-             * * 字段信息,增量数据(修改前,删除前) *
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Column getBeforeColumns(int index) { - if (beforeColumnsBuilder_ == null) { - return beforeColumns_.get(index); - } else { - return beforeColumnsBuilder_.getMessage(index); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-             * * 字段信息,增量数据(修改前,删除前) *
-             * 
- */ - public Builder setBeforeColumns(int index, com.alibaba.otter.canal.protocol.CanalEntry.Column value) { - if (beforeColumnsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBeforeColumnsIsMutable(); - beforeColumns_.set(index, value); - onChanged(); - } else { - beforeColumnsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-             * * 字段信息,增量数据(修改前,删除前) *
-             * 
- */ - public Builder setBeforeColumns(int index, - com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { - if (beforeColumnsBuilder_ == null) { - ensureBeforeColumnsIsMutable(); - beforeColumns_.set(index, builderForValue.build()); - onChanged(); - } else { - beforeColumnsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-             * * 字段信息,增量数据(修改前,删除前) *
-             * 
- */ - public Builder addBeforeColumns(com.alibaba.otter.canal.protocol.CanalEntry.Column value) { - if (beforeColumnsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBeforeColumnsIsMutable(); - beforeColumns_.add(value); - onChanged(); - } else { - beforeColumnsBuilder_.addMessage(value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-             * * 字段信息,增量数据(修改前,删除前) *
-             * 
- */ - public Builder addBeforeColumns(int index, com.alibaba.otter.canal.protocol.CanalEntry.Column value) { - if (beforeColumnsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBeforeColumnsIsMutable(); - beforeColumns_.add(index, value); - onChanged(); - } else { - beforeColumnsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-             * * 字段信息,增量数据(修改前,删除前) *
-             * 
- */ - public Builder addBeforeColumns(com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { - if (beforeColumnsBuilder_ == null) { - ensureBeforeColumnsIsMutable(); - beforeColumns_.add(builderForValue.build()); - onChanged(); - } else { - beforeColumnsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-             * * 字段信息,增量数据(修改前,删除前) *
-             * 
- */ - public Builder addBeforeColumns(int index, - com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { - if (beforeColumnsBuilder_ == null) { - ensureBeforeColumnsIsMutable(); - beforeColumns_.add(index, builderForValue.build()); - onChanged(); - } else { - beforeColumnsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-             * * 字段信息,增量数据(修改前,删除前) *
-             * 
- */ - public Builder addAllBeforeColumns(java.lang.Iterable values) { - if (beforeColumnsBuilder_ == null) { - ensureBeforeColumnsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, beforeColumns_); - onChanged(); - } else { - beforeColumnsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-             * * 字段信息,增量数据(修改前,删除前) *
-             * 
- */ - public Builder clearBeforeColumns() { - if (beforeColumnsBuilder_ == null) { - beforeColumns_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - beforeColumnsBuilder_.clear(); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-             * * 字段信息,增量数据(修改前,删除前) *
-             * 
- */ - public Builder removeBeforeColumns(int index) { - if (beforeColumnsBuilder_ == null) { - ensureBeforeColumnsIsMutable(); - beforeColumns_.remove(index); - onChanged(); - } else { - beforeColumnsBuilder_.remove(index); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-             * * 字段信息,增量数据(修改前,删除前) *
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder getBeforeColumnsBuilder(int index) { - return getBeforeColumnsFieldBuilder().getBuilder(index); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-             * * 字段信息,增量数据(修改前,删除前) *
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getBeforeColumnsOrBuilder(int index) { - if (beforeColumnsBuilder_ == null) { - return beforeColumns_.get(index); - } else { - return beforeColumnsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-             * * 字段信息,增量数据(修改前,删除前) *
-             * 
- */ - public java.util.List getBeforeColumnsOrBuilderList() { - if (beforeColumnsBuilder_ != null) { - return beforeColumnsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(beforeColumns_); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-             * * 字段信息,增量数据(修改前,删除前) *
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder addBeforeColumnsBuilder() { - return getBeforeColumnsFieldBuilder().addBuilder(com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance()); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-             * * 字段信息,增量数据(修改前,删除前) *
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder addBeforeColumnsBuilder(int index) { - return getBeforeColumnsFieldBuilder().addBuilder(index, - com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance()); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-             * * 字段信息,增量数据(修改前,删除前) *
-             * 
- */ - public java.util.List getBeforeColumnsBuilderList() { - return getBeforeColumnsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder getBeforeColumnsFieldBuilder() { - if (beforeColumnsBuilder_ == null) { - beforeColumnsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder(beforeColumns_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - beforeColumns_ = null; - } - return beforeColumnsBuilder_; - } - - private java.util.List afterColumns_ = java.util.Collections.emptyList(); - - private void ensureAfterColumnsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - afterColumns_ = new java.util.ArrayList(afterColumns_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder afterColumnsBuilder_; - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-             * * 字段信息,增量数据(修改后,新增后)  *
-             * 
- */ - public java.util.List getAfterColumnsList() { - if (afterColumnsBuilder_ == null) { - return java.util.Collections.unmodifiableList(afterColumns_); - } else { - return afterColumnsBuilder_.getMessageList(); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-             * * 字段信息,增量数据(修改后,新增后)  *
-             * 
- */ - public int getAfterColumnsCount() { - if (afterColumnsBuilder_ == null) { - return afterColumns_.size(); - } else { - return afterColumnsBuilder_.getCount(); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-             * * 字段信息,增量数据(修改后,新增后)  *
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Column getAfterColumns(int index) { - if (afterColumnsBuilder_ == null) { - return afterColumns_.get(index); - } else { - return afterColumnsBuilder_.getMessage(index); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-             * * 字段信息,增量数据(修改后,新增后)  *
-             * 
- */ - public Builder setAfterColumns(int index, com.alibaba.otter.canal.protocol.CanalEntry.Column value) { - if (afterColumnsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAfterColumnsIsMutable(); - afterColumns_.set(index, value); - onChanged(); - } else { - afterColumnsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-             * * 字段信息,增量数据(修改后,新增后)  *
-             * 
- */ - public Builder setAfterColumns(int index, - com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { - if (afterColumnsBuilder_ == null) { - ensureAfterColumnsIsMutable(); - afterColumns_.set(index, builderForValue.build()); - onChanged(); - } else { - afterColumnsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-             * * 字段信息,增量数据(修改后,新增后)  *
-             * 
- */ - public Builder addAfterColumns(com.alibaba.otter.canal.protocol.CanalEntry.Column value) { - if (afterColumnsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAfterColumnsIsMutable(); - afterColumns_.add(value); - onChanged(); - } else { - afterColumnsBuilder_.addMessage(value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-             * * 字段信息,增量数据(修改后,新增后)  *
-             * 
- */ - public Builder addAfterColumns(int index, com.alibaba.otter.canal.protocol.CanalEntry.Column value) { - if (afterColumnsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAfterColumnsIsMutable(); - afterColumns_.add(index, value); - onChanged(); - } else { - afterColumnsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-             * * 字段信息,增量数据(修改后,新增后)  *
-             * 
- */ - public Builder addAfterColumns(com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { - if (afterColumnsBuilder_ == null) { - ensureAfterColumnsIsMutable(); - afterColumns_.add(builderForValue.build()); - onChanged(); - } else { - afterColumnsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-             * * 字段信息,增量数据(修改后,新增后)  *
-             * 
- */ - public Builder addAfterColumns(int index, - com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { - if (afterColumnsBuilder_ == null) { - ensureAfterColumnsIsMutable(); - afterColumns_.add(index, builderForValue.build()); - onChanged(); - } else { - afterColumnsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-             * * 字段信息,增量数据(修改后,新增后)  *
-             * 
- */ - public Builder addAllAfterColumns(java.lang.Iterable values) { - if (afterColumnsBuilder_ == null) { - ensureAfterColumnsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, afterColumns_); - onChanged(); - } else { - afterColumnsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-             * * 字段信息,增量数据(修改后,新增后)  *
-             * 
- */ - public Builder clearAfterColumns() { - if (afterColumnsBuilder_ == null) { - afterColumns_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - afterColumnsBuilder_.clear(); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-             * * 字段信息,增量数据(修改后,新增后)  *
-             * 
- */ - public Builder removeAfterColumns(int index) { - if (afterColumnsBuilder_ == null) { - ensureAfterColumnsIsMutable(); - afterColumns_.remove(index); - onChanged(); - } else { - afterColumnsBuilder_.remove(index); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-             * * 字段信息,增量数据(修改后,新增后)  *
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder getAfterColumnsBuilder(int index) { - return getAfterColumnsFieldBuilder().getBuilder(index); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-             * * 字段信息,增量数据(修改后,新增后)  *
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getAfterColumnsOrBuilder(int index) { - if (afterColumnsBuilder_ == null) { - return afterColumns_.get(index); - } else { - return afterColumnsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-             * * 字段信息,增量数据(修改后,新增后)  *
-             * 
- */ - public java.util.List getAfterColumnsOrBuilderList() { - if (afterColumnsBuilder_ != null) { - return afterColumnsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(afterColumns_); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-             * * 字段信息,增量数据(修改后,新增后)  *
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder addAfterColumnsBuilder() { - return getAfterColumnsFieldBuilder().addBuilder(com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance()); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-             * * 字段信息,增量数据(修改后,新增后)  *
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder addAfterColumnsBuilder(int index) { - return getAfterColumnsFieldBuilder().addBuilder(index, - com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance()); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-             * * 字段信息,增量数据(修改后,新增后)  *
-             * 
- */ - public java.util.List getAfterColumnsBuilderList() { - return getAfterColumnsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder getAfterColumnsFieldBuilder() { - if (afterColumnsBuilder_ == null) { - afterColumnsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder(afterColumns_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - afterColumns_ = null; - } - return afterColumnsBuilder_; - } - - private java.util.List props_ = java.util.Collections.emptyList(); - - private void ensurePropsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - props_ = new java.util.ArrayList(props_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder propsBuilder_; - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public java.util.List getPropsList() { - if (propsBuilder_ == null) { - return java.util.Collections.unmodifiableList(props_); - } else { - return propsBuilder_.getMessageList(); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public int getPropsCount() { - if (propsBuilder_ == null) { - return props_.size(); - } else { - return propsBuilder_.getCount(); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { - if (propsBuilder_ == null) { - return props_.get(index); - } else { - return propsBuilder_.getMessage(index); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder setProps(int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { - if (propsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropsIsMutable(); - props_.set(index, value); - onChanged(); - } else { - propsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder setProps(int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - props_.set(index, builderForValue.build()); - onChanged(); - } else { - propsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { - if (propsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropsIsMutable(); - props_.add(value); - onChanged(); - } else { - propsBuilder_.addMessage(value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addProps(int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { - if (propsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropsIsMutable(); - props_.add(index, value); - onChanged(); - } else { - propsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - props_.add(builderForValue.build()); - onChanged(); - } else { - propsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addProps(int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - props_.add(index, builderForValue.build()); - onChanged(); - } else { - propsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addAllProps(java.lang.Iterable values) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, props_); - onChanged(); - } else { - propsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder clearProps() { - if (propsBuilder_ == null) { - props_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - propsBuilder_.clear(); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder removeProps(int index) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - props_.remove(index); - onChanged(); - } else { - propsBuilder_.remove(index); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder getPropsBuilder(int index) { - return getPropsFieldBuilder().getBuilder(index); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder(int index) { - if (propsBuilder_ == null) { - return props_.get(index); - } else { - return propsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public java.util.List getPropsOrBuilderList() { - if (propsBuilder_ != null) { - return propsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(props_); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { - return getPropsFieldBuilder().addBuilder(com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder(int index) { - return getPropsFieldBuilder().addBuilder(index, - com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public java.util.List getPropsBuilderList() { - return getPropsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder getPropsFieldBuilder() { - if (propsBuilder_ == null) { - propsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder(props_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); - props_ = null; - } - return propsBuilder_; - } - - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.RowData) + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalEntry.RowData.class, com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder.class); + } + + // Construct using com.alibaba.otter.canal.protocol.CanalEntry.RowData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getBeforeColumnsFieldBuilder(); + getAfterColumnsFieldBuilder(); + getPropsFieldBuilder(); } + } + private static Builder create() { + return new Builder(); + } - static { - defaultInstance = new RowData(true); - defaultInstance.initFields(); + public Builder clear() { + super.clear(); + if (beforeColumnsBuilder_ == null) { + beforeColumns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + beforeColumnsBuilder_.clear(); } + if (afterColumnsBuilder_ == null) { + afterColumns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + afterColumnsBuilder_.clear(); + } + if (propsBuilder_ == null) { + props_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + propsBuilder_.clear(); + } + return this; + } - // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.RowData) + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor; + } + + public com.alibaba.otter.canal.protocol.CanalEntry.RowData getDefaultInstanceForType() { + return com.alibaba.otter.canal.protocol.CanalEntry.RowData.getDefaultInstance(); + } + + public com.alibaba.otter.canal.protocol.CanalEntry.RowData build() { + com.alibaba.otter.canal.protocol.CanalEntry.RowData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.alibaba.otter.canal.protocol.CanalEntry.RowData buildPartial() { + com.alibaba.otter.canal.protocol.CanalEntry.RowData result = new com.alibaba.otter.canal.protocol.CanalEntry.RowData(this); + int from_bitField0_ = bitField0_; + if (beforeColumnsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + beforeColumns_ = java.util.Collections.unmodifiableList(beforeColumns_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.beforeColumns_ = beforeColumns_; + } else { + result.beforeColumns_ = beforeColumnsBuilder_.build(); + } + if (afterColumnsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + afterColumns_ = java.util.Collections.unmodifiableList(afterColumns_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.afterColumns_ = afterColumns_; + } else { + result.afterColumns_ = afterColumnsBuilder_.build(); + } + if (propsBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + props_ = java.util.Collections.unmodifiableList(props_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.props_ = props_; + } else { + result.props_ = propsBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.RowData) { + return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.RowData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalEntry.RowData other) { + if (other == com.alibaba.otter.canal.protocol.CanalEntry.RowData.getDefaultInstance()) return this; + if (beforeColumnsBuilder_ == null) { + if (!other.beforeColumns_.isEmpty()) { + if (beforeColumns_.isEmpty()) { + beforeColumns_ = other.beforeColumns_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBeforeColumnsIsMutable(); + beforeColumns_.addAll(other.beforeColumns_); + } + onChanged(); + } + } else { + if (!other.beforeColumns_.isEmpty()) { + if (beforeColumnsBuilder_.isEmpty()) { + beforeColumnsBuilder_.dispose(); + beforeColumnsBuilder_ = null; + beforeColumns_ = other.beforeColumns_; + bitField0_ = (bitField0_ & ~0x00000001); + beforeColumnsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getBeforeColumnsFieldBuilder() : null; + } else { + beforeColumnsBuilder_.addAllMessages(other.beforeColumns_); + } + } + } + if (afterColumnsBuilder_ == null) { + if (!other.afterColumns_.isEmpty()) { + if (afterColumns_.isEmpty()) { + afterColumns_ = other.afterColumns_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAfterColumnsIsMutable(); + afterColumns_.addAll(other.afterColumns_); + } + onChanged(); + } + } else { + if (!other.afterColumns_.isEmpty()) { + if (afterColumnsBuilder_.isEmpty()) { + afterColumnsBuilder_.dispose(); + afterColumnsBuilder_ = null; + afterColumns_ = other.afterColumns_; + bitField0_ = (bitField0_ & ~0x00000002); + afterColumnsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getAfterColumnsFieldBuilder() : null; + } else { + afterColumnsBuilder_.addAllMessages(other.afterColumns_); + } + } + } + if (propsBuilder_ == null) { + if (!other.props_.isEmpty()) { + if (props_.isEmpty()) { + props_ = other.props_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensurePropsIsMutable(); + props_.addAll(other.props_); + } + onChanged(); + } + } else { + if (!other.props_.isEmpty()) { + if (propsBuilder_.isEmpty()) { + propsBuilder_.dispose(); + propsBuilder_ = null; + props_ = other.props_; + bitField0_ = (bitField0_ & ~0x00000004); + propsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getPropsFieldBuilder() : null; + } else { + propsBuilder_.addAllMessages(other.props_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.alibaba.otter.canal.protocol.CanalEntry.RowData parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalEntry.RowData) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List beforeColumns_ = + java.util.Collections.emptyList(); + private void ensureBeforeColumnsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + beforeColumns_ = new java.util.ArrayList(beforeColumns_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Column, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder, com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder> beforeColumnsBuilder_; + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ + public java.util.List getBeforeColumnsList() { + if (beforeColumnsBuilder_ == null) { + return java.util.Collections.unmodifiableList(beforeColumns_); + } else { + return beforeColumnsBuilder_.getMessageList(); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ + public int getBeforeColumnsCount() { + if (beforeColumnsBuilder_ == null) { + return beforeColumns_.size(); + } else { + return beforeColumnsBuilder_.getCount(); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Column getBeforeColumns(int index) { + if (beforeColumnsBuilder_ == null) { + return beforeColumns_.get(index); + } else { + return beforeColumnsBuilder_.getMessage(index); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ + public Builder setBeforeColumns( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Column value) { + if (beforeColumnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBeforeColumnsIsMutable(); + beforeColumns_.set(index, value); + onChanged(); + } else { + beforeColumnsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ + public Builder setBeforeColumns( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { + if (beforeColumnsBuilder_ == null) { + ensureBeforeColumnsIsMutable(); + beforeColumns_.set(index, builderForValue.build()); + onChanged(); + } else { + beforeColumnsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ + public Builder addBeforeColumns(com.alibaba.otter.canal.protocol.CanalEntry.Column value) { + if (beforeColumnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBeforeColumnsIsMutable(); + beforeColumns_.add(value); + onChanged(); + } else { + beforeColumnsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ + public Builder addBeforeColumns( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Column value) { + if (beforeColumnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBeforeColumnsIsMutable(); + beforeColumns_.add(index, value); + onChanged(); + } else { + beforeColumnsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ + public Builder addBeforeColumns( + com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { + if (beforeColumnsBuilder_ == null) { + ensureBeforeColumnsIsMutable(); + beforeColumns_.add(builderForValue.build()); + onChanged(); + } else { + beforeColumnsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ + public Builder addBeforeColumns( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { + if (beforeColumnsBuilder_ == null) { + ensureBeforeColumnsIsMutable(); + beforeColumns_.add(index, builderForValue.build()); + onChanged(); + } else { + beforeColumnsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ + public Builder addAllBeforeColumns( + java.lang.Iterable values) { + if (beforeColumnsBuilder_ == null) { + ensureBeforeColumnsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, beforeColumns_); + onChanged(); + } else { + beforeColumnsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ + public Builder clearBeforeColumns() { + if (beforeColumnsBuilder_ == null) { + beforeColumns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + beforeColumnsBuilder_.clear(); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ + public Builder removeBeforeColumns(int index) { + if (beforeColumnsBuilder_ == null) { + ensureBeforeColumnsIsMutable(); + beforeColumns_.remove(index); + onChanged(); + } else { + beforeColumnsBuilder_.remove(index); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder getBeforeColumnsBuilder( + int index) { + return getBeforeColumnsFieldBuilder().getBuilder(index); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getBeforeColumnsOrBuilder( + int index) { + if (beforeColumnsBuilder_ == null) { + return beforeColumns_.get(index); } else { + return beforeColumnsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ + public java.util.List + getBeforeColumnsOrBuilderList() { + if (beforeColumnsBuilder_ != null) { + return beforeColumnsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(beforeColumns_); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder addBeforeColumnsBuilder() { + return getBeforeColumnsFieldBuilder().addBuilder( + com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance()); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder addBeforeColumnsBuilder( + int index) { + return getBeforeColumnsFieldBuilder().addBuilder( + index, com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance()); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+       ** 字段信息,增量数据(修改前,删除前) *
+       * 
+ */ + public java.util.List + getBeforeColumnsBuilderList() { + return getBeforeColumnsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Column, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder, com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder> + getBeforeColumnsFieldBuilder() { + if (beforeColumnsBuilder_ == null) { + beforeColumnsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Column, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder, com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder>( + beforeColumns_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + beforeColumns_ = null; + } + return beforeColumnsBuilder_; + } + + private java.util.List afterColumns_ = + java.util.Collections.emptyList(); + private void ensureAfterColumnsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + afterColumns_ = new java.util.ArrayList(afterColumns_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Column, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder, com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder> afterColumnsBuilder_; + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ + public java.util.List getAfterColumnsList() { + if (afterColumnsBuilder_ == null) { + return java.util.Collections.unmodifiableList(afterColumns_); + } else { + return afterColumnsBuilder_.getMessageList(); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ + public int getAfterColumnsCount() { + if (afterColumnsBuilder_ == null) { + return afterColumns_.size(); + } else { + return afterColumnsBuilder_.getCount(); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Column getAfterColumns(int index) { + if (afterColumnsBuilder_ == null) { + return afterColumns_.get(index); + } else { + return afterColumnsBuilder_.getMessage(index); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ + public Builder setAfterColumns( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Column value) { + if (afterColumnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAfterColumnsIsMutable(); + afterColumns_.set(index, value); + onChanged(); + } else { + afterColumnsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ + public Builder setAfterColumns( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { + if (afterColumnsBuilder_ == null) { + ensureAfterColumnsIsMutable(); + afterColumns_.set(index, builderForValue.build()); + onChanged(); + } else { + afterColumnsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ + public Builder addAfterColumns(com.alibaba.otter.canal.protocol.CanalEntry.Column value) { + if (afterColumnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAfterColumnsIsMutable(); + afterColumns_.add(value); + onChanged(); + } else { + afterColumnsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ + public Builder addAfterColumns( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Column value) { + if (afterColumnsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAfterColumnsIsMutable(); + afterColumns_.add(index, value); + onChanged(); + } else { + afterColumnsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ + public Builder addAfterColumns( + com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { + if (afterColumnsBuilder_ == null) { + ensureAfterColumnsIsMutable(); + afterColumns_.add(builderForValue.build()); + onChanged(); + } else { + afterColumnsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ + public Builder addAfterColumns( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { + if (afterColumnsBuilder_ == null) { + ensureAfterColumnsIsMutable(); + afterColumns_.add(index, builderForValue.build()); + onChanged(); + } else { + afterColumnsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ + public Builder addAllAfterColumns( + java.lang.Iterable values) { + if (afterColumnsBuilder_ == null) { + ensureAfterColumnsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, afterColumns_); + onChanged(); + } else { + afterColumnsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ + public Builder clearAfterColumns() { + if (afterColumnsBuilder_ == null) { + afterColumns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + afterColumnsBuilder_.clear(); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ + public Builder removeAfterColumns(int index) { + if (afterColumnsBuilder_ == null) { + ensureAfterColumnsIsMutable(); + afterColumns_.remove(index); + onChanged(); + } else { + afterColumnsBuilder_.remove(index); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder getAfterColumnsBuilder( + int index) { + return getAfterColumnsFieldBuilder().getBuilder(index); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getAfterColumnsOrBuilder( + int index) { + if (afterColumnsBuilder_ == null) { + return afterColumns_.get(index); } else { + return afterColumnsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ + public java.util.List + getAfterColumnsOrBuilderList() { + if (afterColumnsBuilder_ != null) { + return afterColumnsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(afterColumns_); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder addAfterColumnsBuilder() { + return getAfterColumnsFieldBuilder().addBuilder( + com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance()); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder addAfterColumnsBuilder( + int index) { + return getAfterColumnsFieldBuilder().addBuilder( + index, com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance()); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+       ** 字段信息,增量数据(修改后,新增后)  *
+       * 
+ */ + public java.util.List + getAfterColumnsBuilderList() { + return getAfterColumnsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Column, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder, com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder> + getAfterColumnsFieldBuilder() { + if (afterColumnsBuilder_ == null) { + afterColumnsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Column, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder, com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder>( + afterColumns_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + afterColumns_ = null; + } + return afterColumnsBuilder_; + } + + private java.util.List props_ = + java.util.Collections.emptyList(); + private void ensurePropsIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + props_ = new java.util.ArrayList(props_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> propsBuilder_; + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public java.util.List getPropsList() { + if (propsBuilder_ == null) { + return java.util.Collections.unmodifiableList(props_); + } else { + return propsBuilder_.getMessageList(); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public int getPropsCount() { + if (propsBuilder_ == null) { + return props_.size(); + } else { + return propsBuilder_.getCount(); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { + if (propsBuilder_ == null) { + return props_.get(index); + } else { + return propsBuilder_.getMessage(index); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder setProps( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { + if (propsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropsIsMutable(); + props_.set(index, value); + onChanged(); + } else { + propsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder setProps( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.set(index, builderForValue.build()); + onChanged(); + } else { + propsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { + if (propsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropsIsMutable(); + props_.add(value); + onChanged(); + } else { + propsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addProps( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { + if (propsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropsIsMutable(); + props_.add(index, value); + onChanged(); + } else { + propsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addProps( + com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.add(builderForValue.build()); + onChanged(); + } else { + propsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addProps( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.add(index, builderForValue.build()); + onChanged(); + } else { + propsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addAllProps( + java.lang.Iterable values) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, props_); + onChanged(); + } else { + propsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder clearProps() { + if (propsBuilder_ == null) { + props_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + propsBuilder_.clear(); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder removeProps(int index) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.remove(index); + onChanged(); + } else { + propsBuilder_.remove(index); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder getPropsBuilder( + int index) { + return getPropsFieldBuilder().getBuilder(index); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( + int index) { + if (propsBuilder_ == null) { + return props_.get(index); } else { + return propsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public java.util.List + getPropsOrBuilderList() { + if (propsBuilder_ != null) { + return propsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(props_); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { + return getPropsFieldBuilder().addBuilder( + com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder( + int index) { + return getPropsFieldBuilder().addBuilder( + index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public java.util.List + getPropsBuilderList() { + return getPropsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> + getPropsFieldBuilder() { + if (propsBuilder_ == null) { + propsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder>( + props_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + props_ = null; + } + return propsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.RowData) } - public interface RowChangeOrBuilder extends - // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.RowChange) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int64 tableId = 1; - * - *
-         * *tableId,由数据库产生*
-         * 
- */ - boolean hasTableId(); - - /** - * optional int64 tableId = 1; - * - *
-         * *tableId,由数据库产生*
-         * 
- */ - long getTableId(); - - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; - * - *
-         * *数据变更类型*
-         * 
- */ - boolean hasEventType(); - - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; - * - *
-         * *数据变更类型*
-         * 
- */ - com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType(); - - /** - * optional bool isDdl = 10 [default = false]; - * - *
-         * * 标识是否是ddl语句  *
-         * 
- */ - boolean hasIsDdl(); - - /** - * optional bool isDdl = 10 [default = false]; - * - *
-         * * 标识是否是ddl语句  *
-         * 
- */ - boolean getIsDdl(); - - /** - * optional string sql = 11; - * - *
-         * * ddl/query的sql语句  *
-         * 
- */ - boolean hasSql(); - - /** - * optional string sql = 11; - * - *
-         * * ddl/query的sql语句  *
-         * 
- */ - java.lang.String getSql(); - - /** - * optional string sql = 11; - * - *
-         * * ddl/query的sql语句  *
-         * 
- */ - com.google.protobuf.ByteString getSqlBytes(); - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-         * * 一次数据库变更可能存在多行  *
-         * 
- */ - java.util.List getRowDatasList(); - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-         * * 一次数据库变更可能存在多行  *
-         * 
- */ - com.alibaba.otter.canal.protocol.CanalEntry.RowData getRowDatas(int index); - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-         * * 一次数据库变更可能存在多行  *
-         * 
- */ - int getRowDatasCount(); - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-         * * 一次数据库变更可能存在多行  *
-         * 
- */ - java.util.List getRowDatasOrBuilderList(); - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-         * * 一次数据库变更可能存在多行  *
-         * 
- */ - com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder getRowDatasOrBuilder(int index); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-         * *预留扩展*
-         * 
- */ - java.util.List getPropsList(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-         * *预留扩展*
-         * 
- */ - com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-         * *预留扩展*
-         * 
- */ - int getPropsCount(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-         * *预留扩展*
-         * 
- */ - java.util.List getPropsOrBuilderList(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-         * *预留扩展*
-         * 
- */ - com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder(int index); - - /** - * optional string ddlSchemaName = 14; - * - *
-         * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-         * 
- */ - boolean hasDdlSchemaName(); - - /** - * optional string ddlSchemaName = 14; - * - *
-         * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-         * 
- */ - java.lang.String getDdlSchemaName(); - - /** - * optional string ddlSchemaName = 14; - * - *
-         * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-         * 
- */ - com.google.protobuf.ByteString getDdlSchemaNameBytes(); + static { + defaultInstance = new RowData(true); + defaultInstance.initFields(); } + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.RowData) + } + + public interface RowChangeOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.RowChange) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int64 tableId = 1; + * + *
+     **tableId,由数据库产生*
+     * 
+ */ + boolean hasTableId(); + /** + * optional int64 tableId = 1; + * + *
+     **tableId,由数据库产生*
+     * 
+ */ + long getTableId(); + + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + * + *
+     **数据变更类型*
+     * 
+ */ + boolean hasEventType(); + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + * + *
+     **数据变更类型*
+     * 
+ */ + com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType(); + + /** + * optional bool isDdl = 10 [default = false]; + * + *
+     ** 标识是否是ddl语句  *
+     * 
+ */ + boolean hasIsDdl(); + /** + * optional bool isDdl = 10 [default = false]; + * + *
+     ** 标识是否是ddl语句  *
+     * 
+ */ + boolean getIsDdl(); + + /** + * optional string sql = 11; + * + *
+     ** ddl/query的sql语句  *
+     * 
+ */ + boolean hasSql(); + /** + * optional string sql = 11; + * + *
+     ** ddl/query的sql语句  *
+     * 
+ */ + java.lang.String getSql(); + /** + * optional string sql = 11; + * + *
+     ** ddl/query的sql语句  *
+     * 
+ */ + com.google.protobuf.ByteString + getSqlBytes(); + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+     ** 一次数据库变更可能存在多行  *
+     * 
+ */ + java.util.List + getRowDatasList(); + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+     ** 一次数据库变更可能存在多行  *
+     * 
+ */ + com.alibaba.otter.canal.protocol.CanalEntry.RowData getRowDatas(int index); + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+     ** 一次数据库变更可能存在多行  *
+     * 
+ */ + int getRowDatasCount(); + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+     ** 一次数据库变更可能存在多行  *
+     * 
+ */ + java.util.List + getRowDatasOrBuilderList(); + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+     ** 一次数据库变更可能存在多行  *
+     * 
+ */ + com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder getRowDatasOrBuilder( + int index); + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+     **预留扩展*
+     * 
+ */ + java.util.List + getPropsList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+     **预留扩展*
+     * 
+ */ + com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+     **预留扩展*
+     * 
+ */ + int getPropsCount(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+     **预留扩展*
+     * 
+ */ + java.util.List + getPropsOrBuilderList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+     **预留扩展*
+     * 
+ */ + com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( + int index); + + /** + * optional string ddlSchemaName = 14; + * + *
+     ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+     * 
+ */ + boolean hasDdlSchemaName(); + /** + * optional string ddlSchemaName = 14; + * + *
+     ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+     * 
+ */ + java.lang.String getDdlSchemaName(); + /** + * optional string ddlSchemaName = 14; + * + *
+     ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+     * 
+ */ + com.google.protobuf.ByteString + getDdlSchemaNameBytes(); + } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.RowChange} + * + *
+   **message row 每行变更数据的数据结构*
+   * 
+ */ + public static final class RowChange extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.RowChange) + RowChangeOrBuilder { + // Use RowChange.newBuilder() to construct. + private RowChange(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private RowChange(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final RowChange defaultInstance; + public static RowChange getDefaultInstance() { + return defaultInstance; + } + + public RowChange getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RowChange( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + tableId_ = input.readInt64(); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.alibaba.otter.canal.protocol.CanalEntry.EventType value = com.alibaba.otter.canal.protocol.CanalEntry.EventType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + eventType_ = value; + } + break; + } + case 80: { + bitField0_ |= 0x00000004; + isDdl_ = input.readBool(); + break; + } + case 90: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000008; + sql_ = bs; + break; + } + case 98: { + if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + rowDatas_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + rowDatas_.add(input.readMessage(com.alibaba.otter.canal.protocol.CanalEntry.RowData.PARSER, extensionRegistry)); + break; + } + case 106: { + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + props_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + props_.add(input.readMessage(com.alibaba.otter.canal.protocol.CanalEntry.Pair.PARSER, extensionRegistry)); + break; + } + case 114: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000010; + ddlSchemaName_ = bs; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + rowDatas_ = java.util.Collections.unmodifiableList(rowDatas_); + } + if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + props_ = java.util.Collections.unmodifiableList(props_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalEntry.RowChange.class, com.alibaba.otter.canal.protocol.CanalEntry.RowChange.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public RowChange parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RowChange(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int TABLEID_FIELD_NUMBER = 1; + private long tableId_; + /** + * optional int64 tableId = 1; + * + *
+     **tableId,由数据库产生*
+     * 
+ */ + public boolean hasTableId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int64 tableId = 1; + * + *
+     **tableId,由数据库产生*
+     * 
+ */ + public long getTableId() { + return tableId_; + } + + public static final int EVENTTYPE_FIELD_NUMBER = 2; + private com.alibaba.otter.canal.protocol.CanalEntry.EventType eventType_; + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + * + *
+     **数据变更类型*
+     * 
+ */ + public boolean hasEventType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + * + *
+     **数据变更类型*
+     * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType() { + return eventType_; + } + + public static final int ISDDL_FIELD_NUMBER = 10; + private boolean isDdl_; + /** + * optional bool isDdl = 10 [default = false]; + * + *
+     ** 标识是否是ddl语句  *
+     * 
+ */ + public boolean hasIsDdl() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bool isDdl = 10 [default = false]; + * + *
+     ** 标识是否是ddl语句  *
+     * 
+ */ + public boolean getIsDdl() { + return isDdl_; + } + + public static final int SQL_FIELD_NUMBER = 11; + private java.lang.Object sql_; + /** + * optional string sql = 11; + * + *
+     ** ddl/query的sql语句  *
+     * 
+ */ + public boolean hasSql() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional string sql = 11; + * + *
+     ** ddl/query的sql语句  *
+     * 
+ */ + public java.lang.String getSql() { + java.lang.Object ref = sql_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + sql_ = s; + } + return s; + } + } + /** + * optional string sql = 11; + * + *
+     ** ddl/query的sql语句  *
+     * 
+ */ + public com.google.protobuf.ByteString + getSqlBytes() { + java.lang.Object ref = sql_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sql_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROWDATAS_FIELD_NUMBER = 12; + private java.util.List rowDatas_; + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+     ** 一次数据库变更可能存在多行  *
+     * 
+ */ + public java.util.List getRowDatasList() { + return rowDatas_; + } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+     ** 一次数据库变更可能存在多行  *
+     * 
+ */ + public java.util.List + getRowDatasOrBuilderList() { + return rowDatas_; + } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+     ** 一次数据库变更可能存在多行  *
+     * 
+ */ + public int getRowDatasCount() { + return rowDatas_.size(); + } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+     ** 一次数据库变更可能存在多行  *
+     * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.RowData getRowDatas(int index) { + return rowDatas_.get(index); + } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+     ** 一次数据库变更可能存在多行  *
+     * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder getRowDatasOrBuilder( + int index) { + return rowDatas_.get(index); + } + + public static final int PROPS_FIELD_NUMBER = 13; + private java.util.List props_; + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+     **预留扩展*
+     * 
+ */ + public java.util.List getPropsList() { + return props_; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+     **预留扩展*
+     * 
+ */ + public java.util.List + getPropsOrBuilderList() { + return props_; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+     **预留扩展*
+     * 
+ */ + public int getPropsCount() { + return props_.size(); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+     **预留扩展*
+     * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { + return props_.get(index); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+     **预留扩展*
+     * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( + int index) { + return props_.get(index); + } + + public static final int DDLSCHEMANAME_FIELD_NUMBER = 14; + private java.lang.Object ddlSchemaName_; + /** + * optional string ddlSchemaName = 14; + * + *
+     ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+     * 
+ */ + public boolean hasDdlSchemaName() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional string ddlSchemaName = 14; + * + *
+     ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+     * 
+ */ + public java.lang.String getDdlSchemaName() { + java.lang.Object ref = ddlSchemaName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + ddlSchemaName_ = s; + } + return s; + } + } + /** + * optional string ddlSchemaName = 14; + * + *
+     ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+     * 
+ */ + public com.google.protobuf.ByteString + getDdlSchemaNameBytes() { + java.lang.Object ref = ddlSchemaName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ddlSchemaName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + tableId_ = 0L; + eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; + isDdl_ = false; + sql_ = ""; + rowDatas_ = java.util.Collections.emptyList(); + props_ = java.util.Collections.emptyList(); + ddlSchemaName_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt64(1, tableId_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, eventType_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBool(10, isDdl_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(11, getSqlBytes()); + } + for (int i = 0; i < rowDatas_.size(); i++) { + output.writeMessage(12, rowDatas_.get(i)); + } + for (int i = 0; i < props_.size(); i++) { + output.writeMessage(13, props_.get(i)); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBytes(14, getDdlSchemaNameBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, tableId_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, eventType_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(10, isDdl_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(11, getSqlBytes()); + } + for (int i = 0; i < rowDatas_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, rowDatas_.get(i)); + } + for (int i = 0; i < props_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, props_.get(i)); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(14, getDdlSchemaNameBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.RowChange prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } /** * Protobuf type {@code com.alibaba.otter.canal.protocol.RowChange} * *
-     * *message row 每行变更数据的数据结构*
+     **message row 每行变更数据的数据结构*
      * 
*/ - public static final class RowChange extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.RowChange) - RowChangeOrBuilder { - - // Use RowChange.newBuilder() to construct. - private RowChange(com.google.protobuf.GeneratedMessage.Builder builder){ - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - - private RowChange(boolean noInit){ - this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - - private static final RowChange defaultInstance; - - public static RowChange getDefaultInstance() { - return defaultInstance; - } - - public RowChange getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private RowChange(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException{ - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - tableId_ = input.readInt64(); - break; - } - case 16: { - int rawValue = input.readEnum(); - com.alibaba.otter.canal.protocol.CanalEntry.EventType value = com.alibaba.otter.canal.protocol.CanalEntry.EventType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(2, rawValue); - } else { - bitField0_ |= 0x00000002; - eventType_ = value; - } - break; - } - case 80: { - bitField0_ |= 0x00000004; - isDdl_ = input.readBool(); - break; - } - case 90: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000008; - sql_ = bs; - break; - } - case 98: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - rowDatas_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - rowDatas_.add(input.readMessage(com.alibaba.otter.canal.protocol.CanalEntry.RowData.PARSER, - extensionRegistry)); - break; - } - case 106: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - props_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - props_.add(input.readMessage(com.alibaba.otter.canal.protocol.CanalEntry.Pair.PARSER, - extensionRegistry)); - break; - } - case 114: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000010; - ddlSchemaName_ = bs; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - rowDatas_ = java.util.Collections.unmodifiableList(rowDatas_); - } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - props_ = java.util.Collections.unmodifiableList(props_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_fieldAccessorTable.ensureFieldAccessorsInitialized(com.alibaba.otter.canal.protocol.CanalEntry.RowChange.class, - com.alibaba.otter.canal.protocol.CanalEntry.RowChange.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - - public RowChange parsePartialFrom(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RowChange(input, - extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int TABLEID_FIELD_NUMBER = 1; - private long tableId_; - - /** - * optional int64 tableId = 1; - * - *
-         * *tableId,由数据库产生*
-         * 
- */ - public boolean hasTableId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - - /** - * optional int64 tableId = 1; - * - *
-         * *tableId,由数据库产生*
-         * 
- */ - public long getTableId() { - return tableId_; - } - - public static final int EVENTTYPE_FIELD_NUMBER = 2; - private com.alibaba.otter.canal.protocol.CanalEntry.EventType eventType_; - - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; - * - *
-         * *数据变更类型*
-         * 
- */ - public boolean hasEventType() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; - * - *
-         * *数据变更类型*
-         * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType() { - return eventType_; - } - - public static final int ISDDL_FIELD_NUMBER = 10; - private boolean isDdl_; - - /** - * optional bool isDdl = 10 [default = false]; - * - *
-         * * 标识是否是ddl语句  *
-         * 
- */ - public boolean hasIsDdl() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - - /** - * optional bool isDdl = 10 [default = false]; - * - *
-         * * 标识是否是ddl语句  *
-         * 
- */ - public boolean getIsDdl() { - return isDdl_; - } - - public static final int SQL_FIELD_NUMBER = 11; - private java.lang.Object sql_; - - /** - * optional string sql = 11; - * - *
-         * * ddl/query的sql语句  *
-         * 
- */ - public boolean hasSql() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - - /** - * optional string sql = 11; - * - *
-         * * ddl/query的sql语句  *
-         * 
- */ - public java.lang.String getSql() { - java.lang.Object ref = sql_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - sql_ = s; - } - return s; - } - } - - /** - * optional string sql = 11; - * - *
-         * * ddl/query的sql语句  *
-         * 
- */ - public com.google.protobuf.ByteString getSqlBytes() { - java.lang.Object ref = sql_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - sql_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ROWDATAS_FIELD_NUMBER = 12; - private java.util.List rowDatas_; - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-         * * 一次数据库变更可能存在多行  *
-         * 
- */ - public java.util.List getRowDatasList() { - return rowDatas_; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-         * * 一次数据库变更可能存在多行  *
-         * 
- */ - public java.util.List getRowDatasOrBuilderList() { - return rowDatas_; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-         * * 一次数据库变更可能存在多行  *
-         * 
- */ - public int getRowDatasCount() { - return rowDatas_.size(); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-         * * 一次数据库变更可能存在多行  *
-         * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.RowData getRowDatas(int index) { - return rowDatas_.get(index); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-         * * 一次数据库变更可能存在多行  *
-         * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder getRowDatasOrBuilder(int index) { - return rowDatas_.get(index); - } - - public static final int PROPS_FIELD_NUMBER = 13; - private java.util.List props_; - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-         * *预留扩展*
-         * 
- */ - public java.util.List getPropsList() { - return props_; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-         * *预留扩展*
-         * 
- */ - public java.util.List getPropsOrBuilderList() { - return props_; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-         * *预留扩展*
-         * 
- */ - public int getPropsCount() { - return props_.size(); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-         * *预留扩展*
-         * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { - return props_.get(index); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-         * *预留扩展*
-         * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder(int index) { - return props_.get(index); - } - - public static final int DDLSCHEMANAME_FIELD_NUMBER = 14; - private java.lang.Object ddlSchemaName_; - - /** - * optional string ddlSchemaName = 14; - * - *
-         * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-         * 
- */ - public boolean hasDdlSchemaName() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - - /** - * optional string ddlSchemaName = 14; - * - *
-         * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-         * 
- */ - public java.lang.String getDdlSchemaName() { - java.lang.Object ref = ddlSchemaName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - ddlSchemaName_ = s; - } - return s; - } - } - - /** - * optional string ddlSchemaName = 14; - * - *
-         * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-         * 
- */ - public com.google.protobuf.ByteString getDdlSchemaNameBytes() { - java.lang.Object ref = ddlSchemaName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - ddlSchemaName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private void initFields() { - tableId_ = 0L; - eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; - isDdl_ = false; - sql_ = ""; - rowDatas_ = java.util.Collections.emptyList(); - props_ = java.util.Collections.emptyList(); - ddlSchemaName_ = ""; - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt64(1, tableId_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeEnum(2, eventType_.getNumber()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBool(10, isDdl_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBytes(11, getSqlBytes()); - } - for (int i = 0; i < rowDatas_.size(); i++) { - output.writeMessage(12, rowDatas_.get(i)); - } - for (int i = 0; i < props_.size(); i++) { - output.writeMessage(13, props_.get(i)); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBytes(14, getDdlSchemaNameBytes()); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, tableId_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, eventType_.getNumber()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, isDdl_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(11, getSqlBytes()); - } - for (int i = 0; i < rowDatas_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, rowDatas_.get(i)); - } - for (int i = 0; i < props_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, props_.get(i)); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(14, getDdlSchemaNameBytes()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - - @java.lang.Override - protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom(com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom(byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom(java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseDelimitedFrom(java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.RowChange parseFrom(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { - return Builder.create(); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.RowChange prototype) { - return newBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return newBuilder(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.RowChange} - * - *
-         * *message row 每行变更数据的数据结构*
-         * 
- */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.RowChange) com.alibaba.otter.canal.protocol.CanalEntry.RowChangeOrBuilder { - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_fieldAccessorTable.ensureFieldAccessorsInitialized(com.alibaba.otter.canal.protocol.CanalEntry.RowChange.class, - com.alibaba.otter.canal.protocol.CanalEntry.RowChange.Builder.class); - } - - // Construct using - // com.alibaba.otter.canal.protocol.CanalEntry.RowChange.newBuilder() - private Builder(){ - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent){ - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getRowDatasFieldBuilder(); - getPropsFieldBuilder(); - } - } - - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - tableId_ = 0L; - bitField0_ = (bitField0_ & ~0x00000001); - eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; - bitField0_ = (bitField0_ & ~0x00000002); - isDdl_ = false; - bitField0_ = (bitField0_ & ~0x00000004); - sql_ = ""; - bitField0_ = (bitField0_ & ~0x00000008); - if (rowDatasBuilder_ == null) { - rowDatas_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - } else { - rowDatasBuilder_.clear(); - } - if (propsBuilder_ == null) { - props_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - propsBuilder_.clear(); - } - ddlSchemaName_ = ""; - bitField0_ = (bitField0_ & ~0x00000040); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor; - } - - public com.alibaba.otter.canal.protocol.CanalEntry.RowChange getDefaultInstanceForType() { - return com.alibaba.otter.canal.protocol.CanalEntry.RowChange.getDefaultInstance(); - } - - public com.alibaba.otter.canal.protocol.CanalEntry.RowChange build() { - com.alibaba.otter.canal.protocol.CanalEntry.RowChange result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.alibaba.otter.canal.protocol.CanalEntry.RowChange buildPartial() { - com.alibaba.otter.canal.protocol.CanalEntry.RowChange result = new com.alibaba.otter.canal.protocol.CanalEntry.RowChange(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.tableId_ = tableId_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.eventType_ = eventType_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.isDdl_ = isDdl_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.sql_ = sql_; - if (rowDatasBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { - rowDatas_ = java.util.Collections.unmodifiableList(rowDatas_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.rowDatas_ = rowDatas_; - } else { - result.rowDatas_ = rowDatasBuilder_.build(); - } - if (propsBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { - props_ = java.util.Collections.unmodifiableList(props_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.props_ = props_; - } else { - result.props_ = propsBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000010; - } - result.ddlSchemaName_ = ddlSchemaName_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.RowChange) { - return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.RowChange) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalEntry.RowChange other) { - if (other == com.alibaba.otter.canal.protocol.CanalEntry.RowChange.getDefaultInstance()) return this; - if (other.hasTableId()) { - setTableId(other.getTableId()); - } - if (other.hasEventType()) { - setEventType(other.getEventType()); - } - if (other.hasIsDdl()) { - setIsDdl(other.getIsDdl()); - } - if (other.hasSql()) { - bitField0_ |= 0x00000008; - sql_ = other.sql_; - onChanged(); - } - if (rowDatasBuilder_ == null) { - if (!other.rowDatas_.isEmpty()) { - if (rowDatas_.isEmpty()) { - rowDatas_ = other.rowDatas_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureRowDatasIsMutable(); - rowDatas_.addAll(other.rowDatas_); - } - onChanged(); - } - } else { - if (!other.rowDatas_.isEmpty()) { - if (rowDatasBuilder_.isEmpty()) { - rowDatasBuilder_.dispose(); - rowDatasBuilder_ = null; - rowDatas_ = other.rowDatas_; - bitField0_ = (bitField0_ & ~0x00000010); - rowDatasBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getRowDatasFieldBuilder() : null; - } else { - rowDatasBuilder_.addAllMessages(other.rowDatas_); - } - } - } - if (propsBuilder_ == null) { - if (!other.props_.isEmpty()) { - if (props_.isEmpty()) { - props_ = other.props_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensurePropsIsMutable(); - props_.addAll(other.props_); - } - onChanged(); - } - } else { - if (!other.props_.isEmpty()) { - if (propsBuilder_.isEmpty()) { - propsBuilder_.dispose(); - propsBuilder_ = null; - props_ = other.props_; - bitField0_ = (bitField0_ & ~0x00000020); - propsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getPropsFieldBuilder() : null; - } else { - propsBuilder_.addAllMessages(other.props_); - } - } - } - if (other.hasDdlSchemaName()) { - bitField0_ |= 0x00000040; - ddlSchemaName_ = other.ddlSchemaName_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.alibaba.otter.canal.protocol.CanalEntry.RowChange parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.CanalEntry.RowChange) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private long tableId_; - - /** - * optional int64 tableId = 1; - * - *
-             * *tableId,由数据库产生*
-             * 
- */ - public boolean hasTableId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - - /** - * optional int64 tableId = 1; - * - *
-             * *tableId,由数据库产生*
-             * 
- */ - public long getTableId() { - return tableId_; - } - - /** - * optional int64 tableId = 1; - * - *
-             * *tableId,由数据库产生*
-             * 
- */ - public Builder setTableId(long value) { - bitField0_ |= 0x00000001; - tableId_ = value; - onChanged(); - return this; - } - - /** - * optional int64 tableId = 1; - * - *
-             * *tableId,由数据库产生*
-             * 
- */ - public Builder clearTableId() { - bitField0_ = (bitField0_ & ~0x00000001); - tableId_ = 0L; - onChanged(); - return this; - } - - private com.alibaba.otter.canal.protocol.CanalEntry.EventType eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; - - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; - * - *
-             * *数据变更类型*
-             * 
- */ - public boolean hasEventType() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; - * - *
-             * *数据变更类型*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType() { - return eventType_; - } - - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; - * - *
-             * *数据变更类型*
-             * 
- */ - public Builder setEventType(com.alibaba.otter.canal.protocol.CanalEntry.EventType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - eventType_ = value; - onChanged(); - return this; - } - - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; - * - *
-             * *数据变更类型*
-             * 
- */ - public Builder clearEventType() { - bitField0_ = (bitField0_ & ~0x00000002); - eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; - onChanged(); - return this; - } - - private boolean isDdl_; - - /** - * optional bool isDdl = 10 [default = false]; - * - *
-             * * 标识是否是ddl语句  *
-             * 
- */ - public boolean hasIsDdl() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - - /** - * optional bool isDdl = 10 [default = false]; - * - *
-             * * 标识是否是ddl语句  *
-             * 
- */ - public boolean getIsDdl() { - return isDdl_; - } - - /** - * optional bool isDdl = 10 [default = false]; - * - *
-             * * 标识是否是ddl语句  *
-             * 
- */ - public Builder setIsDdl(boolean value) { - bitField0_ |= 0x00000004; - isDdl_ = value; - onChanged(); - return this; - } - - /** - * optional bool isDdl = 10 [default = false]; - * - *
-             * * 标识是否是ddl语句  *
-             * 
- */ - public Builder clearIsDdl() { - bitField0_ = (bitField0_ & ~0x00000004); - isDdl_ = false; - onChanged(); - return this; - } - - private java.lang.Object sql_ = ""; - - /** - * optional string sql = 11; - * - *
-             * * ddl/query的sql语句  *
-             * 
- */ - public boolean hasSql() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - - /** - * optional string sql = 11; - * - *
-             * * ddl/query的sql语句  *
-             * 
- */ - public java.lang.String getSql() { - java.lang.Object ref = sql_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - sql_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * optional string sql = 11; - * - *
-             * * ddl/query的sql语句  *
-             * 
- */ - public com.google.protobuf.ByteString getSqlBytes() { - java.lang.Object ref = sql_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - sql_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * optional string sql = 11; - * - *
-             * * ddl/query的sql语句  *
-             * 
- */ - public Builder setSql(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - sql_ = value; - onChanged(); - return this; - } - - /** - * optional string sql = 11; - * - *
-             * * ddl/query的sql语句  *
-             * 
- */ - public Builder clearSql() { - bitField0_ = (bitField0_ & ~0x00000008); - sql_ = getDefaultInstance().getSql(); - onChanged(); - return this; - } - - /** - * optional string sql = 11; - * - *
-             * * ddl/query的sql语句  *
-             * 
- */ - public Builder setSqlBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - sql_ = value; - onChanged(); - return this; - } - - private java.util.List rowDatas_ = java.util.Collections.emptyList(); - - private void ensureRowDatasIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { - rowDatas_ = new java.util.ArrayList(rowDatas_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilder rowDatasBuilder_; - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-             * * 一次数据库变更可能存在多行  *
-             * 
- */ - public java.util.List getRowDatasList() { - if (rowDatasBuilder_ == null) { - return java.util.Collections.unmodifiableList(rowDatas_); - } else { - return rowDatasBuilder_.getMessageList(); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-             * * 一次数据库变更可能存在多行  *
-             * 
- */ - public int getRowDatasCount() { - if (rowDatasBuilder_ == null) { - return rowDatas_.size(); - } else { - return rowDatasBuilder_.getCount(); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-             * * 一次数据库变更可能存在多行  *
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.RowData getRowDatas(int index) { - if (rowDatasBuilder_ == null) { - return rowDatas_.get(index); - } else { - return rowDatasBuilder_.getMessage(index); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-             * * 一次数据库变更可能存在多行  *
-             * 
- */ - public Builder setRowDatas(int index, com.alibaba.otter.canal.protocol.CanalEntry.RowData value) { - if (rowDatasBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRowDatasIsMutable(); - rowDatas_.set(index, value); - onChanged(); - } else { - rowDatasBuilder_.setMessage(index, value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-             * * 一次数据库变更可能存在多行  *
-             * 
- */ - public Builder setRowDatas(int index, - com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder builderForValue) { - if (rowDatasBuilder_ == null) { - ensureRowDatasIsMutable(); - rowDatas_.set(index, builderForValue.build()); - onChanged(); - } else { - rowDatasBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-             * * 一次数据库变更可能存在多行  *
-             * 
- */ - public Builder addRowDatas(com.alibaba.otter.canal.protocol.CanalEntry.RowData value) { - if (rowDatasBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRowDatasIsMutable(); - rowDatas_.add(value); - onChanged(); - } else { - rowDatasBuilder_.addMessage(value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-             * * 一次数据库变更可能存在多行  *
-             * 
- */ - public Builder addRowDatas(int index, com.alibaba.otter.canal.protocol.CanalEntry.RowData value) { - if (rowDatasBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRowDatasIsMutable(); - rowDatas_.add(index, value); - onChanged(); - } else { - rowDatasBuilder_.addMessage(index, value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-             * * 一次数据库变更可能存在多行  *
-             * 
- */ - public Builder addRowDatas(com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder builderForValue) { - if (rowDatasBuilder_ == null) { - ensureRowDatasIsMutable(); - rowDatas_.add(builderForValue.build()); - onChanged(); - } else { - rowDatasBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-             * * 一次数据库变更可能存在多行  *
-             * 
- */ - public Builder addRowDatas(int index, - com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder builderForValue) { - if (rowDatasBuilder_ == null) { - ensureRowDatasIsMutable(); - rowDatas_.add(index, builderForValue.build()); - onChanged(); - } else { - rowDatasBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-             * * 一次数据库变更可能存在多行  *
-             * 
- */ - public Builder addAllRowDatas(java.lang.Iterable values) { - if (rowDatasBuilder_ == null) { - ensureRowDatasIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rowDatas_); - onChanged(); - } else { - rowDatasBuilder_.addAllMessages(values); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-             * * 一次数据库变更可能存在多行  *
-             * 
- */ - public Builder clearRowDatas() { - if (rowDatasBuilder_ == null) { - rowDatas_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - rowDatasBuilder_.clear(); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-             * * 一次数据库变更可能存在多行  *
-             * 
- */ - public Builder removeRowDatas(int index) { - if (rowDatasBuilder_ == null) { - ensureRowDatasIsMutable(); - rowDatas_.remove(index); - onChanged(); - } else { - rowDatasBuilder_.remove(index); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-             * * 一次数据库变更可能存在多行  *
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder getRowDatasBuilder(int index) { - return getRowDatasFieldBuilder().getBuilder(index); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-             * * 一次数据库变更可能存在多行  *
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder getRowDatasOrBuilder(int index) { - if (rowDatasBuilder_ == null) { - return rowDatas_.get(index); - } else { - return rowDatasBuilder_.getMessageOrBuilder(index); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-             * * 一次数据库变更可能存在多行  *
-             * 
- */ - public java.util.List getRowDatasOrBuilderList() { - if (rowDatasBuilder_ != null) { - return rowDatasBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(rowDatas_); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-             * * 一次数据库变更可能存在多行  *
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder addRowDatasBuilder() { - return getRowDatasFieldBuilder().addBuilder(com.alibaba.otter.canal.protocol.CanalEntry.RowData.getDefaultInstance()); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-             * * 一次数据库变更可能存在多行  *
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder addRowDatasBuilder(int index) { - return getRowDatasFieldBuilder().addBuilder(index, - com.alibaba.otter.canal.protocol.CanalEntry.RowData.getDefaultInstance()); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-             * * 一次数据库变更可能存在多行  *
-             * 
- */ - public java.util.List getRowDatasBuilderList() { - return getRowDatasFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder getRowDatasFieldBuilder() { - if (rowDatasBuilder_ == null) { - rowDatasBuilder_ = new com.google.protobuf.RepeatedFieldBuilder(rowDatas_, - ((bitField0_ & 0x00000010) == 0x00000010), - getParentForChildren(), - isClean()); - rowDatas_ = null; - } - return rowDatasBuilder_; - } - - private java.util.List props_ = java.util.Collections.emptyList(); - - private void ensurePropsIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - props_ = new java.util.ArrayList(props_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilder propsBuilder_; - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-             * *预留扩展*
-             * 
- */ - public java.util.List getPropsList() { - if (propsBuilder_ == null) { - return java.util.Collections.unmodifiableList(props_); - } else { - return propsBuilder_.getMessageList(); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-             * *预留扩展*
-             * 
- */ - public int getPropsCount() { - if (propsBuilder_ == null) { - return props_.size(); - } else { - return propsBuilder_.getCount(); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { - if (propsBuilder_ == null) { - return props_.get(index); - } else { - return propsBuilder_.getMessage(index); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder setProps(int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { - if (propsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropsIsMutable(); - props_.set(index, value); - onChanged(); - } else { - propsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder setProps(int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - props_.set(index, builderForValue.build()); - onChanged(); - } else { - propsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { - if (propsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropsIsMutable(); - props_.add(value); - onChanged(); - } else { - propsBuilder_.addMessage(value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addProps(int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { - if (propsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropsIsMutable(); - props_.add(index, value); - onChanged(); - } else { - propsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - props_.add(builderForValue.build()); - onChanged(); - } else { - propsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addProps(int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - props_.add(index, builderForValue.build()); - onChanged(); - } else { - propsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addAllProps(java.lang.Iterable values) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, props_); - onChanged(); - } else { - propsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder clearProps() { - if (propsBuilder_ == null) { - props_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - propsBuilder_.clear(); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder removeProps(int index) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - props_.remove(index); - onChanged(); - } else { - propsBuilder_.remove(index); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder getPropsBuilder(int index) { - return getPropsFieldBuilder().getBuilder(index); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder(int index) { - if (propsBuilder_ == null) { - return props_.get(index); - } else { - return propsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-             * *预留扩展*
-             * 
- */ - public java.util.List getPropsOrBuilderList() { - if (propsBuilder_ != null) { - return propsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(props_); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { - return getPropsFieldBuilder().addBuilder(com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder(int index) { - return getPropsFieldBuilder().addBuilder(index, - com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-             * *预留扩展*
-             * 
- */ - public java.util.List getPropsBuilderList() { - return getPropsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder getPropsFieldBuilder() { - if (propsBuilder_ == null) { - propsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder(props_, - ((bitField0_ & 0x00000020) == 0x00000020), - getParentForChildren(), - isClean()); - props_ = null; - } - return propsBuilder_; - } - - private java.lang.Object ddlSchemaName_ = ""; - - /** - * optional string ddlSchemaName = 14; - * - *
-             * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-             * 
- */ - public boolean hasDdlSchemaName() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - - /** - * optional string ddlSchemaName = 14; - * - *
-             * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-             * 
- */ - public java.lang.String getDdlSchemaName() { - java.lang.Object ref = ddlSchemaName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - ddlSchemaName_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * optional string ddlSchemaName = 14; - * - *
-             * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-             * 
- */ - public com.google.protobuf.ByteString getDdlSchemaNameBytes() { - java.lang.Object ref = ddlSchemaName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - ddlSchemaName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * optional string ddlSchemaName = 14; - * - *
-             * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-             * 
- */ - public Builder setDdlSchemaName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000040; - ddlSchemaName_ = value; - onChanged(); - return this; - } - - /** - * optional string ddlSchemaName = 14; - * - *
-             * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-             * 
- */ - public Builder clearDdlSchemaName() { - bitField0_ = (bitField0_ & ~0x00000040); - ddlSchemaName_ = getDefaultInstance().getDdlSchemaName(); - onChanged(); - return this; - } - - /** - * optional string ddlSchemaName = 14; - * - *
-             * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-             * 
- */ - public Builder setDdlSchemaNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000040; - ddlSchemaName_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.RowChange) + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalEntry.RowChange.class, com.alibaba.otter.canal.protocol.CanalEntry.RowChange.Builder.class); + } + + // Construct using com.alibaba.otter.canal.protocol.CanalEntry.RowChange.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getRowDatasFieldBuilder(); + getPropsFieldBuilder(); } + } + private static Builder create() { + return new Builder(); + } - static { - defaultInstance = new RowChange(true); - defaultInstance.initFields(); + public Builder clear() { + super.clear(); + tableId_ = 0L; + bitField0_ = (bitField0_ & ~0x00000001); + eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; + bitField0_ = (bitField0_ & ~0x00000002); + isDdl_ = false; + bitField0_ = (bitField0_ & ~0x00000004); + sql_ = ""; + bitField0_ = (bitField0_ & ~0x00000008); + if (rowDatasBuilder_ == null) { + rowDatas_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + rowDatasBuilder_.clear(); } + if (propsBuilder_ == null) { + props_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + propsBuilder_.clear(); + } + ddlSchemaName_ = ""; + bitField0_ = (bitField0_ & ~0x00000040); + return this; + } - // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.RowChange) + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor; + } + + public com.alibaba.otter.canal.protocol.CanalEntry.RowChange getDefaultInstanceForType() { + return com.alibaba.otter.canal.protocol.CanalEntry.RowChange.getDefaultInstance(); + } + + public com.alibaba.otter.canal.protocol.CanalEntry.RowChange build() { + com.alibaba.otter.canal.protocol.CanalEntry.RowChange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.alibaba.otter.canal.protocol.CanalEntry.RowChange buildPartial() { + com.alibaba.otter.canal.protocol.CanalEntry.RowChange result = new com.alibaba.otter.canal.protocol.CanalEntry.RowChange(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableId_ = tableId_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.eventType_ = eventType_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.isDdl_ = isDdl_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.sql_ = sql_; + if (rowDatasBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { + rowDatas_ = java.util.Collections.unmodifiableList(rowDatas_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.rowDatas_ = rowDatas_; + } else { + result.rowDatas_ = rowDatasBuilder_.build(); + } + if (propsBuilder_ == null) { + if (((bitField0_ & 0x00000020) == 0x00000020)) { + props_ = java.util.Collections.unmodifiableList(props_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.props_ = props_; + } else { + result.props_ = propsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000010; + } + result.ddlSchemaName_ = ddlSchemaName_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.RowChange) { + return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.RowChange)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalEntry.RowChange other) { + if (other == com.alibaba.otter.canal.protocol.CanalEntry.RowChange.getDefaultInstance()) return this; + if (other.hasTableId()) { + setTableId(other.getTableId()); + } + if (other.hasEventType()) { + setEventType(other.getEventType()); + } + if (other.hasIsDdl()) { + setIsDdl(other.getIsDdl()); + } + if (other.hasSql()) { + bitField0_ |= 0x00000008; + sql_ = other.sql_; + onChanged(); + } + if (rowDatasBuilder_ == null) { + if (!other.rowDatas_.isEmpty()) { + if (rowDatas_.isEmpty()) { + rowDatas_ = other.rowDatas_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureRowDatasIsMutable(); + rowDatas_.addAll(other.rowDatas_); + } + onChanged(); + } + } else { + if (!other.rowDatas_.isEmpty()) { + if (rowDatasBuilder_.isEmpty()) { + rowDatasBuilder_.dispose(); + rowDatasBuilder_ = null; + rowDatas_ = other.rowDatas_; + bitField0_ = (bitField0_ & ~0x00000010); + rowDatasBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRowDatasFieldBuilder() : null; + } else { + rowDatasBuilder_.addAllMessages(other.rowDatas_); + } + } + } + if (propsBuilder_ == null) { + if (!other.props_.isEmpty()) { + if (props_.isEmpty()) { + props_ = other.props_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensurePropsIsMutable(); + props_.addAll(other.props_); + } + onChanged(); + } + } else { + if (!other.props_.isEmpty()) { + if (propsBuilder_.isEmpty()) { + propsBuilder_.dispose(); + propsBuilder_ = null; + props_ = other.props_; + bitField0_ = (bitField0_ & ~0x00000020); + propsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getPropsFieldBuilder() : null; + } else { + propsBuilder_.addAllMessages(other.props_); + } + } + } + if (other.hasDdlSchemaName()) { + bitField0_ |= 0x00000040; + ddlSchemaName_ = other.ddlSchemaName_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.alibaba.otter.canal.protocol.CanalEntry.RowChange parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalEntry.RowChange) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private long tableId_ ; + /** + * optional int64 tableId = 1; + * + *
+       **tableId,由数据库产生*
+       * 
+ */ + public boolean hasTableId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int64 tableId = 1; + * + *
+       **tableId,由数据库产生*
+       * 
+ */ + public long getTableId() { + return tableId_; + } + /** + * optional int64 tableId = 1; + * + *
+       **tableId,由数据库产生*
+       * 
+ */ + public Builder setTableId(long value) { + bitField0_ |= 0x00000001; + tableId_ = value; + onChanged(); + return this; + } + /** + * optional int64 tableId = 1; + * + *
+       **tableId,由数据库产生*
+       * 
+ */ + public Builder clearTableId() { + bitField0_ = (bitField0_ & ~0x00000001); + tableId_ = 0L; + onChanged(); + return this; + } + + private com.alibaba.otter.canal.protocol.CanalEntry.EventType eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + * + *
+       **数据变更类型*
+       * 
+ */ + public boolean hasEventType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + * + *
+       **数据变更类型*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType() { + return eventType_; + } + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + * + *
+       **数据变更类型*
+       * 
+ */ + public Builder setEventType(com.alibaba.otter.canal.protocol.CanalEntry.EventType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + eventType_ = value; + onChanged(); + return this; + } + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + * + *
+       **数据变更类型*
+       * 
+ */ + public Builder clearEventType() { + bitField0_ = (bitField0_ & ~0x00000002); + eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; + onChanged(); + return this; + } + + private boolean isDdl_ ; + /** + * optional bool isDdl = 10 [default = false]; + * + *
+       ** 标识是否是ddl语句  *
+       * 
+ */ + public boolean hasIsDdl() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bool isDdl = 10 [default = false]; + * + *
+       ** 标识是否是ddl语句  *
+       * 
+ */ + public boolean getIsDdl() { + return isDdl_; + } + /** + * optional bool isDdl = 10 [default = false]; + * + *
+       ** 标识是否是ddl语句  *
+       * 
+ */ + public Builder setIsDdl(boolean value) { + bitField0_ |= 0x00000004; + isDdl_ = value; + onChanged(); + return this; + } + /** + * optional bool isDdl = 10 [default = false]; + * + *
+       ** 标识是否是ddl语句  *
+       * 
+ */ + public Builder clearIsDdl() { + bitField0_ = (bitField0_ & ~0x00000004); + isDdl_ = false; + onChanged(); + return this; + } + + private java.lang.Object sql_ = ""; + /** + * optional string sql = 11; + * + *
+       ** ddl/query的sql语句  *
+       * 
+ */ + public boolean hasSql() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional string sql = 11; + * + *
+       ** ddl/query的sql语句  *
+       * 
+ */ + public java.lang.String getSql() { + java.lang.Object ref = sql_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + sql_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string sql = 11; + * + *
+       ** ddl/query的sql语句  *
+       * 
+ */ + public com.google.protobuf.ByteString + getSqlBytes() { + java.lang.Object ref = sql_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sql_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string sql = 11; + * + *
+       ** ddl/query的sql语句  *
+       * 
+ */ + public Builder setSql( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + sql_ = value; + onChanged(); + return this; + } + /** + * optional string sql = 11; + * + *
+       ** ddl/query的sql语句  *
+       * 
+ */ + public Builder clearSql() { + bitField0_ = (bitField0_ & ~0x00000008); + sql_ = getDefaultInstance().getSql(); + onChanged(); + return this; + } + /** + * optional string sql = 11; + * + *
+       ** ddl/query的sql语句  *
+       * 
+ */ + public Builder setSqlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + sql_ = value; + onChanged(); + return this; + } + + private java.util.List rowDatas_ = + java.util.Collections.emptyList(); + private void ensureRowDatasIsMutable() { + if (!((bitField0_ & 0x00000010) == 0x00000010)) { + rowDatas_ = new java.util.ArrayList(rowDatas_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.RowData, com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder, com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder> rowDatasBuilder_; + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ + public java.util.List getRowDatasList() { + if (rowDatasBuilder_ == null) { + return java.util.Collections.unmodifiableList(rowDatas_); + } else { + return rowDatasBuilder_.getMessageList(); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ + public int getRowDatasCount() { + if (rowDatasBuilder_ == null) { + return rowDatas_.size(); + } else { + return rowDatasBuilder_.getCount(); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.RowData getRowDatas(int index) { + if (rowDatasBuilder_ == null) { + return rowDatas_.get(index); + } else { + return rowDatasBuilder_.getMessage(index); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ + public Builder setRowDatas( + int index, com.alibaba.otter.canal.protocol.CanalEntry.RowData value) { + if (rowDatasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowDatasIsMutable(); + rowDatas_.set(index, value); + onChanged(); + } else { + rowDatasBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ + public Builder setRowDatas( + int index, com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder builderForValue) { + if (rowDatasBuilder_ == null) { + ensureRowDatasIsMutable(); + rowDatas_.set(index, builderForValue.build()); + onChanged(); + } else { + rowDatasBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ + public Builder addRowDatas(com.alibaba.otter.canal.protocol.CanalEntry.RowData value) { + if (rowDatasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowDatasIsMutable(); + rowDatas_.add(value); + onChanged(); + } else { + rowDatasBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ + public Builder addRowDatas( + int index, com.alibaba.otter.canal.protocol.CanalEntry.RowData value) { + if (rowDatasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowDatasIsMutable(); + rowDatas_.add(index, value); + onChanged(); + } else { + rowDatasBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ + public Builder addRowDatas( + com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder builderForValue) { + if (rowDatasBuilder_ == null) { + ensureRowDatasIsMutable(); + rowDatas_.add(builderForValue.build()); + onChanged(); + } else { + rowDatasBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ + public Builder addRowDatas( + int index, com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder builderForValue) { + if (rowDatasBuilder_ == null) { + ensureRowDatasIsMutable(); + rowDatas_.add(index, builderForValue.build()); + onChanged(); + } else { + rowDatasBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ + public Builder addAllRowDatas( + java.lang.Iterable values) { + if (rowDatasBuilder_ == null) { + ensureRowDatasIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, rowDatas_); + onChanged(); + } else { + rowDatasBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ + public Builder clearRowDatas() { + if (rowDatasBuilder_ == null) { + rowDatas_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + rowDatasBuilder_.clear(); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ + public Builder removeRowDatas(int index) { + if (rowDatasBuilder_ == null) { + ensureRowDatasIsMutable(); + rowDatas_.remove(index); + onChanged(); + } else { + rowDatasBuilder_.remove(index); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder getRowDatasBuilder( + int index) { + return getRowDatasFieldBuilder().getBuilder(index); + } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder getRowDatasOrBuilder( + int index) { + if (rowDatasBuilder_ == null) { + return rowDatas_.get(index); } else { + return rowDatasBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ + public java.util.List + getRowDatasOrBuilderList() { + if (rowDatasBuilder_ != null) { + return rowDatasBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rowDatas_); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder addRowDatasBuilder() { + return getRowDatasFieldBuilder().addBuilder( + com.alibaba.otter.canal.protocol.CanalEntry.RowData.getDefaultInstance()); + } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder addRowDatasBuilder( + int index) { + return getRowDatasFieldBuilder().addBuilder( + index, com.alibaba.otter.canal.protocol.CanalEntry.RowData.getDefaultInstance()); + } + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+       ** 一次数据库变更可能存在多行  *
+       * 
+ */ + public java.util.List + getRowDatasBuilderList() { + return getRowDatasFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.RowData, com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder, com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder> + getRowDatasFieldBuilder() { + if (rowDatasBuilder_ == null) { + rowDatasBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.RowData, com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder, com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder>( + rowDatas_, + ((bitField0_ & 0x00000010) == 0x00000010), + getParentForChildren(), + isClean()); + rowDatas_ = null; + } + return rowDatasBuilder_; + } + + private java.util.List props_ = + java.util.Collections.emptyList(); + private void ensurePropsIsMutable() { + if (!((bitField0_ & 0x00000020) == 0x00000020)) { + props_ = new java.util.ArrayList(props_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> propsBuilder_; + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ + public java.util.List getPropsList() { + if (propsBuilder_ == null) { + return java.util.Collections.unmodifiableList(props_); + } else { + return propsBuilder_.getMessageList(); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ + public int getPropsCount() { + if (propsBuilder_ == null) { + return props_.size(); + } else { + return propsBuilder_.getCount(); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { + if (propsBuilder_ == null) { + return props_.get(index); + } else { + return propsBuilder_.getMessage(index); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder setProps( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { + if (propsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropsIsMutable(); + props_.set(index, value); + onChanged(); + } else { + propsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder setProps( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.set(index, builderForValue.build()); + onChanged(); + } else { + propsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { + if (propsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropsIsMutable(); + props_.add(value); + onChanged(); + } else { + propsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addProps( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { + if (propsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropsIsMutable(); + props_.add(index, value); + onChanged(); + } else { + propsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addProps( + com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.add(builderForValue.build()); + onChanged(); + } else { + propsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addProps( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.add(index, builderForValue.build()); + onChanged(); + } else { + propsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addAllProps( + java.lang.Iterable values) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, props_); + onChanged(); + } else { + propsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder clearProps() { + if (propsBuilder_ == null) { + props_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + propsBuilder_.clear(); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder removeProps(int index) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.remove(index); + onChanged(); + } else { + propsBuilder_.remove(index); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder getPropsBuilder( + int index) { + return getPropsFieldBuilder().getBuilder(index); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( + int index) { + if (propsBuilder_ == null) { + return props_.get(index); } else { + return propsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ + public java.util.List + getPropsOrBuilderList() { + if (propsBuilder_ != null) { + return propsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(props_); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { + return getPropsFieldBuilder().addBuilder( + com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder( + int index) { + return getPropsFieldBuilder().addBuilder( + index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+       **预留扩展*
+       * 
+ */ + public java.util.List + getPropsBuilderList() { + return getPropsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> + getPropsFieldBuilder() { + if (propsBuilder_ == null) { + propsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder>( + props_, + ((bitField0_ & 0x00000020) == 0x00000020), + getParentForChildren(), + isClean()); + props_ = null; + } + return propsBuilder_; + } + + private java.lang.Object ddlSchemaName_ = ""; + /** + * optional string ddlSchemaName = 14; + * + *
+       ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+       * 
+ */ + public boolean hasDdlSchemaName() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional string ddlSchemaName = 14; + * + *
+       ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+       * 
+ */ + public java.lang.String getDdlSchemaName() { + java.lang.Object ref = ddlSchemaName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + ddlSchemaName_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string ddlSchemaName = 14; + * + *
+       ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+       * 
+ */ + public com.google.protobuf.ByteString + getDdlSchemaNameBytes() { + java.lang.Object ref = ddlSchemaName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ddlSchemaName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string ddlSchemaName = 14; + * + *
+       ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+       * 
+ */ + public Builder setDdlSchemaName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + ddlSchemaName_ = value; + onChanged(); + return this; + } + /** + * optional string ddlSchemaName = 14; + * + *
+       ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+       * 
+ */ + public Builder clearDdlSchemaName() { + bitField0_ = (bitField0_ & ~0x00000040); + ddlSchemaName_ = getDefaultInstance().getDdlSchemaName(); + onChanged(); + return this; + } + /** + * optional string ddlSchemaName = 14; + * + *
+       ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+       * 
+ */ + public Builder setDdlSchemaNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + ddlSchemaName_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.RowChange) } - public interface TransactionBeginOrBuilder extends - // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.TransactionBegin) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int64 executeTime = 1; - * - *
-         * *已废弃,请使用header里的executeTime*
-         * 
- */ - boolean hasExecuteTime(); - - /** - * optional int64 executeTime = 1; - * - *
-         * *已废弃,请使用header里的executeTime*
-         * 
- */ - long getExecuteTime(); - - /** - * optional string transactionId = 2; - * - *
-         * *已废弃,Begin里不提供事务id*
-         * 
- */ - boolean hasTransactionId(); - - /** - * optional string transactionId = 2; - * - *
-         * *已废弃,Begin里不提供事务id*
-         * 
- */ - java.lang.String getTransactionId(); - - /** - * optional string transactionId = 2; - * - *
-         * *已废弃,Begin里不提供事务id*
-         * 
- */ - com.google.protobuf.ByteString getTransactionIdBytes(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - java.util.List getPropsList(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - int getPropsCount(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - java.util.List getPropsOrBuilderList(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder(int index); - - /** - * optional int64 threadId = 4; - * - *
-         * *执行的thread Id*
-         * 
- */ - boolean hasThreadId(); - - /** - * optional int64 threadId = 4; - * - *
-         * *执行的thread Id*
-         * 
- */ - long getThreadId(); + static { + defaultInstance = new RowChange(true); + defaultInstance.initFields(); } + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.RowChange) + } + + public interface TransactionBeginOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.TransactionBegin) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int64 executeTime = 1; + * + *
+     **已废弃,请使用header里的executeTime*
+     * 
+ */ + boolean hasExecuteTime(); + /** + * optional int64 executeTime = 1; + * + *
+     **已废弃,请使用header里的executeTime*
+     * 
+ */ + long getExecuteTime(); + + /** + * optional string transactionId = 2; + * + *
+     **已废弃,Begin里不提供事务id*
+     * 
+ */ + boolean hasTransactionId(); + /** + * optional string transactionId = 2; + * + *
+     **已废弃,Begin里不提供事务id*
+     * 
+ */ + java.lang.String getTransactionId(); + /** + * optional string transactionId = 2; + * + *
+     **已废弃,Begin里不提供事务id*
+     * 
+ */ + com.google.protobuf.ByteString + getTransactionIdBytes(); + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + java.util.List + getPropsList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + int getPropsCount(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + java.util.List + getPropsOrBuilderList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( + int index); + + /** + * optional int64 threadId = 4; + * + *
+     **执行的thread Id*
+     * 
+ */ + boolean hasThreadId(); + /** + * optional int64 threadId = 4; + * + *
+     **执行的thread Id*
+     * 
+ */ + long getThreadId(); + } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.TransactionBegin} + * + *
+   **开始事务的一些信息*
+   * 
+ */ + public static final class TransactionBegin extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.TransactionBegin) + TransactionBeginOrBuilder { + // Use TransactionBegin.newBuilder() to construct. + private TransactionBegin(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private TransactionBegin(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final TransactionBegin defaultInstance; + public static TransactionBegin getDefaultInstance() { + return defaultInstance; + } + + public TransactionBegin getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TransactionBegin( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + executeTime_ = input.readInt64(); + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + transactionId_ = bs; + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + props_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + props_.add(input.readMessage(com.alibaba.otter.canal.protocol.CanalEntry.Pair.PARSER, extensionRegistry)); + break; + } + case 32: { + bitField0_ |= 0x00000004; + threadId_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + props_ = java.util.Collections.unmodifiableList(props_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.class, com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public TransactionBegin parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransactionBegin(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int EXECUTETIME_FIELD_NUMBER = 1; + private long executeTime_; + /** + * optional int64 executeTime = 1; + * + *
+     **已废弃,请使用header里的executeTime*
+     * 
+ */ + public boolean hasExecuteTime() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int64 executeTime = 1; + * + *
+     **已废弃,请使用header里的executeTime*
+     * 
+ */ + public long getExecuteTime() { + return executeTime_; + } + + public static final int TRANSACTIONID_FIELD_NUMBER = 2; + private java.lang.Object transactionId_; + /** + * optional string transactionId = 2; + * + *
+     **已废弃,Begin里不提供事务id*
+     * 
+ */ + public boolean hasTransactionId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string transactionId = 2; + * + *
+     **已废弃,Begin里不提供事务id*
+     * 
+ */ + public java.lang.String getTransactionId() { + java.lang.Object ref = transactionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + transactionId_ = s; + } + return s; + } + } + /** + * optional string transactionId = 2; + * + *
+     **已废弃,Begin里不提供事务id*
+     * 
+ */ + public com.google.protobuf.ByteString + getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROPS_FIELD_NUMBER = 3; + private java.util.List props_; + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + public java.util.List getPropsList() { + return props_; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + public java.util.List + getPropsOrBuilderList() { + return props_; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + public int getPropsCount() { + return props_.size(); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { + return props_.get(index); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( + int index) { + return props_.get(index); + } + + public static final int THREADID_FIELD_NUMBER = 4; + private long threadId_; + /** + * optional int64 threadId = 4; + * + *
+     **执行的thread Id*
+     * 
+ */ + public boolean hasThreadId() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional int64 threadId = 4; + * + *
+     **执行的thread Id*
+     * 
+ */ + public long getThreadId() { + return threadId_; + } + + private void initFields() { + executeTime_ = 0L; + transactionId_ = ""; + props_ = java.util.Collections.emptyList(); + threadId_ = 0L; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt64(1, executeTime_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getTransactionIdBytes()); + } + for (int i = 0; i < props_.size(); i++) { + output.writeMessage(3, props_.get(i)); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt64(4, threadId_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, executeTime_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getTransactionIdBytes()); + } + for (int i = 0; i < props_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, props_.get(i)); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, threadId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } /** * Protobuf type {@code com.alibaba.otter.canal.protocol.TransactionBegin} * *
-     * *开始事务的一些信息*
+     **开始事务的一些信息*
      * 
*/ - public static final class TransactionBegin extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.TransactionBegin) - TransactionBeginOrBuilder { - - // Use TransactionBegin.newBuilder() to construct. - private TransactionBegin(com.google.protobuf.GeneratedMessage.Builder builder){ - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - - private TransactionBegin(boolean noInit){ - this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - - private static final TransactionBegin defaultInstance; - - public static TransactionBegin getDefaultInstance() { - return defaultInstance; - } - - public TransactionBegin getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TransactionBegin(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException{ - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - executeTime_ = input.readInt64(); - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - transactionId_ = bs; - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - props_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - props_.add(input.readMessage(com.alibaba.otter.canal.protocol.CanalEntry.Pair.PARSER, - extensionRegistry)); - break; - } - case 32: { - bitField0_ |= 0x00000004; - threadId_ = input.readInt64(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - props_ = java.util.Collections.unmodifiableList(props_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_fieldAccessorTable.ensureFieldAccessorsInitialized(com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.class, - com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - - public TransactionBegin parsePartialFrom(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TransactionBegin(input, - extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int EXECUTETIME_FIELD_NUMBER = 1; - private long executeTime_; - - /** - * optional int64 executeTime = 1; - * - *
-         * *已废弃,请使用header里的executeTime*
-         * 
- */ - public boolean hasExecuteTime() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - - /** - * optional int64 executeTime = 1; - * - *
-         * *已废弃,请使用header里的executeTime*
-         * 
- */ - public long getExecuteTime() { - return executeTime_; - } - - public static final int TRANSACTIONID_FIELD_NUMBER = 2; - private java.lang.Object transactionId_; - - /** - * optional string transactionId = 2; - * - *
-         * *已废弃,Begin里不提供事务id*
-         * 
- */ - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - - /** - * optional string transactionId = 2; - * - *
-         * *已废弃,Begin里不提供事务id*
-         * 
- */ - public java.lang.String getTransactionId() { - java.lang.Object ref = transactionId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - transactionId_ = s; - } - return s; - } - } - - /** - * optional string transactionId = 2; - * - *
-         * *已废弃,Begin里不提供事务id*
-         * 
- */ - public com.google.protobuf.ByteString getTransactionIdBytes() { - java.lang.Object ref = transactionId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - transactionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROPS_FIELD_NUMBER = 3; - private java.util.List props_; - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - public java.util.List getPropsList() { - return props_; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - public java.util.List getPropsOrBuilderList() { - return props_; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - public int getPropsCount() { - return props_.size(); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { - return props_.get(index); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder(int index) { - return props_.get(index); - } - - public static final int THREADID_FIELD_NUMBER = 4; - private long threadId_; - - /** - * optional int64 threadId = 4; - * - *
-         * *执行的thread Id*
-         * 
- */ - public boolean hasThreadId() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - - /** - * optional int64 threadId = 4; - * - *
-         * *执行的thread Id*
-         * 
- */ - public long getThreadId() { - return threadId_; - } - - private void initFields() { - executeTime_ = 0L; - transactionId_ = ""; - props_ = java.util.Collections.emptyList(); - threadId_ = 0L; - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt64(1, executeTime_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getTransactionIdBytes()); - } - for (int i = 0; i < props_.size(); i++) { - output.writeMessage(3, props_.get(i)); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt64(4, threadId_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, executeTime_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, getTransactionIdBytes()); - } - for (int i = 0; i < props_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, props_.get(i)); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, threadId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - - @java.lang.Override - protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom(com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom(byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom(java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseDelimitedFrom(java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parseFrom(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { - return Builder.create(); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin prototype) { - return newBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return newBuilder(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * Protobuf type - * {@code com.alibaba.otter.canal.protocol.TransactionBegin} - * - *
-         * *开始事务的一些信息*
-         * 
- */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.TransactionBegin) com.alibaba.otter.canal.protocol.CanalEntry.TransactionBeginOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor; + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor; - } + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.class, com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.Builder.class); + } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_fieldAccessorTable.ensureFieldAccessorsInitialized(com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.class, - com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.Builder.class); - } + // Construct using com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - // Construct using - // com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.newBuilder() - private Builder(){ - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent){ - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getPropsFieldBuilder(); - } - } - - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - executeTime_ = 0L; - bitField0_ = (bitField0_ & ~0x00000001); - transactionId_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - if (propsBuilder_ == null) { - props_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - propsBuilder_.clear(); - } - threadId_ = 0L; - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor; - } - - public com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin getDefaultInstanceForType() { - return com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.getDefaultInstance(); - } - - public com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin build() { - com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin buildPartial() { - com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin result = new com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.executeTime_ = executeTime_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.transactionId_ = transactionId_; - if (propsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { - props_ = java.util.Collections.unmodifiableList(props_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.props_ = props_; - } else { - result.props_ = propsBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000004; - } - result.threadId_ = threadId_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin) { - return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin other) { - if (other == com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.getDefaultInstance()) return this; - if (other.hasExecuteTime()) { - setExecuteTime(other.getExecuteTime()); - } - if (other.hasTransactionId()) { - bitField0_ |= 0x00000002; - transactionId_ = other.transactionId_; - onChanged(); - } - if (propsBuilder_ == null) { - if (!other.props_.isEmpty()) { - if (props_.isEmpty()) { - props_ = other.props_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensurePropsIsMutable(); - props_.addAll(other.props_); - } - onChanged(); - } - } else { - if (!other.props_.isEmpty()) { - if (propsBuilder_.isEmpty()) { - propsBuilder_.dispose(); - propsBuilder_ = null; - props_ = other.props_; - bitField0_ = (bitField0_ & ~0x00000004); - propsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getPropsFieldBuilder() : null; - } else { - propsBuilder_.addAllMessages(other.props_); - } - } - } - if (other.hasThreadId()) { - setThreadId(other.getThreadId()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private long executeTime_; - - /** - * optional int64 executeTime = 1; - * - *
-             * *已废弃,请使用header里的executeTime*
-             * 
- */ - public boolean hasExecuteTime() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - - /** - * optional int64 executeTime = 1; - * - *
-             * *已废弃,请使用header里的executeTime*
-             * 
- */ - public long getExecuteTime() { - return executeTime_; - } - - /** - * optional int64 executeTime = 1; - * - *
-             * *已废弃,请使用header里的executeTime*
-             * 
- */ - public Builder setExecuteTime(long value) { - bitField0_ |= 0x00000001; - executeTime_ = value; - onChanged(); - return this; - } - - /** - * optional int64 executeTime = 1; - * - *
-             * *已废弃,请使用header里的executeTime*
-             * 
- */ - public Builder clearExecuteTime() { - bitField0_ = (bitField0_ & ~0x00000001); - executeTime_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object transactionId_ = ""; - - /** - * optional string transactionId = 2; - * - *
-             * *已废弃,Begin里不提供事务id*
-             * 
- */ - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - - /** - * optional string transactionId = 2; - * - *
-             * *已废弃,Begin里不提供事务id*
-             * 
- */ - public java.lang.String getTransactionId() { - java.lang.Object ref = transactionId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - transactionId_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * optional string transactionId = 2; - * - *
-             * *已废弃,Begin里不提供事务id*
-             * 
- */ - public com.google.protobuf.ByteString getTransactionIdBytes() { - java.lang.Object ref = transactionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - transactionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * optional string transactionId = 2; - * - *
-             * *已废弃,Begin里不提供事务id*
-             * 
- */ - public Builder setTransactionId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - transactionId_ = value; - onChanged(); - return this; - } - - /** - * optional string transactionId = 2; - * - *
-             * *已废弃,Begin里不提供事务id*
-             * 
- */ - public Builder clearTransactionId() { - bitField0_ = (bitField0_ & ~0x00000002); - transactionId_ = getDefaultInstance().getTransactionId(); - onChanged(); - return this; - } - - /** - * optional string transactionId = 2; - * - *
-             * *已废弃,Begin里不提供事务id*
-             * 
- */ - public Builder setTransactionIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - transactionId_ = value; - onChanged(); - return this; - } - - private java.util.List props_ = java.util.Collections.emptyList(); - - private void ensurePropsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - props_ = new java.util.ArrayList(props_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder propsBuilder_; - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public java.util.List getPropsList() { - if (propsBuilder_ == null) { - return java.util.Collections.unmodifiableList(props_); - } else { - return propsBuilder_.getMessageList(); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public int getPropsCount() { - if (propsBuilder_ == null) { - return props_.size(); - } else { - return propsBuilder_.getCount(); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { - if (propsBuilder_ == null) { - return props_.get(index); - } else { - return propsBuilder_.getMessage(index); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder setProps(int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { - if (propsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropsIsMutable(); - props_.set(index, value); - onChanged(); - } else { - propsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder setProps(int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - props_.set(index, builderForValue.build()); - onChanged(); - } else { - propsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { - if (propsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropsIsMutable(); - props_.add(value); - onChanged(); - } else { - propsBuilder_.addMessage(value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addProps(int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { - if (propsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropsIsMutable(); - props_.add(index, value); - onChanged(); - } else { - propsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - props_.add(builderForValue.build()); - onChanged(); - } else { - propsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addProps(int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - props_.add(index, builderForValue.build()); - onChanged(); - } else { - propsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addAllProps(java.lang.Iterable values) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, props_); - onChanged(); - } else { - propsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder clearProps() { - if (propsBuilder_ == null) { - props_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - propsBuilder_.clear(); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder removeProps(int index) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - props_.remove(index); - onChanged(); - } else { - propsBuilder_.remove(index); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder getPropsBuilder(int index) { - return getPropsFieldBuilder().getBuilder(index); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder(int index) { - if (propsBuilder_ == null) { - return props_.get(index); - } else { - return propsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public java.util.List getPropsOrBuilderList() { - if (propsBuilder_ != null) { - return propsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(props_); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { - return getPropsFieldBuilder().addBuilder(com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder(int index) { - return getPropsFieldBuilder().addBuilder(index, - com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public java.util.List getPropsBuilderList() { - return getPropsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder getPropsFieldBuilder() { - if (propsBuilder_ == null) { - propsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder(props_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); - props_ = null; - } - return propsBuilder_; - } - - private long threadId_; - - /** - * optional int64 threadId = 4; - * - *
-             * *执行的thread Id*
-             * 
- */ - public boolean hasThreadId() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - - /** - * optional int64 threadId = 4; - * - *
-             * *执行的thread Id*
-             * 
- */ - public long getThreadId() { - return threadId_; - } - - /** - * optional int64 threadId = 4; - * - *
-             * *执行的thread Id*
-             * 
- */ - public Builder setThreadId(long value) { - bitField0_ |= 0x00000008; - threadId_ = value; - onChanged(); - return this; - } - - /** - * optional int64 threadId = 4; - * - *
-             * *执行的thread Id*
-             * 
- */ - public Builder clearThreadId() { - bitField0_ = (bitField0_ & ~0x00000008); - threadId_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.TransactionBegin) + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getPropsFieldBuilder(); } + } + private static Builder create() { + return new Builder(); + } - static { - defaultInstance = new TransactionBegin(true); - defaultInstance.initFields(); + public Builder clear() { + super.clear(); + executeTime_ = 0L; + bitField0_ = (bitField0_ & ~0x00000001); + transactionId_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + if (propsBuilder_ == null) { + props_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + propsBuilder_.clear(); } + threadId_ = 0L; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } - // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.TransactionBegin) + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor; + } + + public com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin getDefaultInstanceForType() { + return com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.getDefaultInstance(); + } + + public com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin build() { + com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin buildPartial() { + com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin result = new com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.executeTime_ = executeTime_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.transactionId_ = transactionId_; + if (propsBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + props_ = java.util.Collections.unmodifiableList(props_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.props_ = props_; + } else { + result.props_ = propsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000004; + } + result.threadId_ = threadId_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin) { + return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin other) { + if (other == com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin.getDefaultInstance()) return this; + if (other.hasExecuteTime()) { + setExecuteTime(other.getExecuteTime()); + } + if (other.hasTransactionId()) { + bitField0_ |= 0x00000002; + transactionId_ = other.transactionId_; + onChanged(); + } + if (propsBuilder_ == null) { + if (!other.props_.isEmpty()) { + if (props_.isEmpty()) { + props_ = other.props_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensurePropsIsMutable(); + props_.addAll(other.props_); + } + onChanged(); + } + } else { + if (!other.props_.isEmpty()) { + if (propsBuilder_.isEmpty()) { + propsBuilder_.dispose(); + propsBuilder_ = null; + props_ = other.props_; + bitField0_ = (bitField0_ & ~0x00000004); + propsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getPropsFieldBuilder() : null; + } else { + propsBuilder_.addAllMessages(other.props_); + } + } + } + if (other.hasThreadId()) { + setThreadId(other.getThreadId()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private long executeTime_ ; + /** + * optional int64 executeTime = 1; + * + *
+       **已废弃,请使用header里的executeTime*
+       * 
+ */ + public boolean hasExecuteTime() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int64 executeTime = 1; + * + *
+       **已废弃,请使用header里的executeTime*
+       * 
+ */ + public long getExecuteTime() { + return executeTime_; + } + /** + * optional int64 executeTime = 1; + * + *
+       **已废弃,请使用header里的executeTime*
+       * 
+ */ + public Builder setExecuteTime(long value) { + bitField0_ |= 0x00000001; + executeTime_ = value; + onChanged(); + return this; + } + /** + * optional int64 executeTime = 1; + * + *
+       **已废弃,请使用header里的executeTime*
+       * 
+ */ + public Builder clearExecuteTime() { + bitField0_ = (bitField0_ & ~0x00000001); + executeTime_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object transactionId_ = ""; + /** + * optional string transactionId = 2; + * + *
+       **已废弃,Begin里不提供事务id*
+       * 
+ */ + public boolean hasTransactionId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string transactionId = 2; + * + *
+       **已废弃,Begin里不提供事务id*
+       * 
+ */ + public java.lang.String getTransactionId() { + java.lang.Object ref = transactionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + transactionId_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string transactionId = 2; + * + *
+       **已废弃,Begin里不提供事务id*
+       * 
+ */ + public com.google.protobuf.ByteString + getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string transactionId = 2; + * + *
+       **已废弃,Begin里不提供事务id*
+       * 
+ */ + public Builder setTransactionId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + transactionId_ = value; + onChanged(); + return this; + } + /** + * optional string transactionId = 2; + * + *
+       **已废弃,Begin里不提供事务id*
+       * 
+ */ + public Builder clearTransactionId() { + bitField0_ = (bitField0_ & ~0x00000002); + transactionId_ = getDefaultInstance().getTransactionId(); + onChanged(); + return this; + } + /** + * optional string transactionId = 2; + * + *
+       **已废弃,Begin里不提供事务id*
+       * 
+ */ + public Builder setTransactionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + transactionId_ = value; + onChanged(); + return this; + } + + private java.util.List props_ = + java.util.Collections.emptyList(); + private void ensurePropsIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + props_ = new java.util.ArrayList(props_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> propsBuilder_; + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public java.util.List getPropsList() { + if (propsBuilder_ == null) { + return java.util.Collections.unmodifiableList(props_); + } else { + return propsBuilder_.getMessageList(); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public int getPropsCount() { + if (propsBuilder_ == null) { + return props_.size(); + } else { + return propsBuilder_.getCount(); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { + if (propsBuilder_ == null) { + return props_.get(index); + } else { + return propsBuilder_.getMessage(index); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder setProps( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { + if (propsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropsIsMutable(); + props_.set(index, value); + onChanged(); + } else { + propsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder setProps( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.set(index, builderForValue.build()); + onChanged(); + } else { + propsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { + if (propsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropsIsMutable(); + props_.add(value); + onChanged(); + } else { + propsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addProps( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { + if (propsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropsIsMutable(); + props_.add(index, value); + onChanged(); + } else { + propsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addProps( + com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.add(builderForValue.build()); + onChanged(); + } else { + propsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addProps( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.add(index, builderForValue.build()); + onChanged(); + } else { + propsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addAllProps( + java.lang.Iterable values) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, props_); + onChanged(); + } else { + propsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder clearProps() { + if (propsBuilder_ == null) { + props_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + propsBuilder_.clear(); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder removeProps(int index) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.remove(index); + onChanged(); + } else { + propsBuilder_.remove(index); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder getPropsBuilder( + int index) { + return getPropsFieldBuilder().getBuilder(index); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( + int index) { + if (propsBuilder_ == null) { + return props_.get(index); } else { + return propsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public java.util.List + getPropsOrBuilderList() { + if (propsBuilder_ != null) { + return propsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(props_); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { + return getPropsFieldBuilder().addBuilder( + com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder( + int index) { + return getPropsFieldBuilder().addBuilder( + index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public java.util.List + getPropsBuilderList() { + return getPropsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> + getPropsFieldBuilder() { + if (propsBuilder_ == null) { + propsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder>( + props_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + props_ = null; + } + return propsBuilder_; + } + + private long threadId_ ; + /** + * optional int64 threadId = 4; + * + *
+       **执行的thread Id*
+       * 
+ */ + public boolean hasThreadId() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int64 threadId = 4; + * + *
+       **执行的thread Id*
+       * 
+ */ + public long getThreadId() { + return threadId_; + } + /** + * optional int64 threadId = 4; + * + *
+       **执行的thread Id*
+       * 
+ */ + public Builder setThreadId(long value) { + bitField0_ |= 0x00000008; + threadId_ = value; + onChanged(); + return this; + } + /** + * optional int64 threadId = 4; + * + *
+       **执行的thread Id*
+       * 
+ */ + public Builder clearThreadId() { + bitField0_ = (bitField0_ & ~0x00000008); + threadId_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.TransactionBegin) } - public interface TransactionEndOrBuilder extends - // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.TransactionEnd) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int64 executeTime = 1; - * - *
-         * *已废弃,请使用header里的executeTime*
-         * 
- */ - boolean hasExecuteTime(); - - /** - * optional int64 executeTime = 1; - * - *
-         * *已废弃,请使用header里的executeTime*
-         * 
- */ - long getExecuteTime(); - - /** - * optional string transactionId = 2; - * - *
-         * *事务号*
-         * 
- */ - boolean hasTransactionId(); - - /** - * optional string transactionId = 2; - * - *
-         * *事务号*
-         * 
- */ - java.lang.String getTransactionId(); - - /** - * optional string transactionId = 2; - * - *
-         * *事务号*
-         * 
- */ - com.google.protobuf.ByteString getTransactionIdBytes(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - java.util.List getPropsList(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - int getPropsCount(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - java.util.List getPropsOrBuilderList(); - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder(int index); + static { + defaultInstance = new TransactionBegin(true); + defaultInstance.initFields(); } + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.TransactionBegin) + } + + public interface TransactionEndOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.TransactionEnd) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int64 executeTime = 1; + * + *
+     **已废弃,请使用header里的executeTime*
+     * 
+ */ + boolean hasExecuteTime(); + /** + * optional int64 executeTime = 1; + * + *
+     **已废弃,请使用header里的executeTime*
+     * 
+ */ + long getExecuteTime(); + + /** + * optional string transactionId = 2; + * + *
+     **事务号*
+     * 
+ */ + boolean hasTransactionId(); + /** + * optional string transactionId = 2; + * + *
+     **事务号*
+     * 
+ */ + java.lang.String getTransactionId(); + /** + * optional string transactionId = 2; + * + *
+     **事务号*
+     * 
+ */ + com.google.protobuf.ByteString + getTransactionIdBytes(); + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + java.util.List + getPropsList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + int getPropsCount(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + java.util.List + getPropsOrBuilderList(); + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( + int index); + } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.TransactionEnd} + * + *
+   **结束事务的一些信息*
+   * 
+ */ + public static final class TransactionEnd extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.TransactionEnd) + TransactionEndOrBuilder { + // Use TransactionEnd.newBuilder() to construct. + private TransactionEnd(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private TransactionEnd(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final TransactionEnd defaultInstance; + public static TransactionEnd getDefaultInstance() { + return defaultInstance; + } + + public TransactionEnd getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TransactionEnd( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + executeTime_ = input.readInt64(); + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + transactionId_ = bs; + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + props_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + props_.add(input.readMessage(com.alibaba.otter.canal.protocol.CanalEntry.Pair.PARSER, extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + props_ = java.util.Collections.unmodifiableList(props_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.class, com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public TransactionEnd parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransactionEnd(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int EXECUTETIME_FIELD_NUMBER = 1; + private long executeTime_; + /** + * optional int64 executeTime = 1; + * + *
+     **已废弃,请使用header里的executeTime*
+     * 
+ */ + public boolean hasExecuteTime() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int64 executeTime = 1; + * + *
+     **已废弃,请使用header里的executeTime*
+     * 
+ */ + public long getExecuteTime() { + return executeTime_; + } + + public static final int TRANSACTIONID_FIELD_NUMBER = 2; + private java.lang.Object transactionId_; + /** + * optional string transactionId = 2; + * + *
+     **事务号*
+     * 
+ */ + public boolean hasTransactionId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string transactionId = 2; + * + *
+     **事务号*
+     * 
+ */ + public java.lang.String getTransactionId() { + java.lang.Object ref = transactionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + transactionId_ = s; + } + return s; + } + } + /** + * optional string transactionId = 2; + * + *
+     **事务号*
+     * 
+ */ + public com.google.protobuf.ByteString + getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROPS_FIELD_NUMBER = 3; + private java.util.List props_; + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + public java.util.List getPropsList() { + return props_; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + public java.util.List + getPropsOrBuilderList() { + return props_; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + public int getPropsCount() { + return props_.size(); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { + return props_.get(index); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+     **预留扩展*
+     * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( + int index) { + return props_.get(index); + } + + private void initFields() { + executeTime_ = 0L; + transactionId_ = ""; + props_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt64(1, executeTime_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getTransactionIdBytes()); + } + for (int i = 0; i < props_.size(); i++) { + output.writeMessage(3, props_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, executeTime_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getTransactionIdBytes()); + } + for (int i = 0; i < props_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, props_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } /** * Protobuf type {@code com.alibaba.otter.canal.protocol.TransactionEnd} * *
-     * *结束事务的一些信息*
+     **结束事务的一些信息*
      * 
*/ - public static final class TransactionEnd extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.TransactionEnd) - TransactionEndOrBuilder { - - // Use TransactionEnd.newBuilder() to construct. - private TransactionEnd(com.google.protobuf.GeneratedMessage.Builder builder){ - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - - private TransactionEnd(boolean noInit){ - this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - - private static final TransactionEnd defaultInstance; - - public static TransactionEnd getDefaultInstance() { - return defaultInstance; - } - - public TransactionEnd getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TransactionEnd(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException{ - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - executeTime_ = input.readInt64(); - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - transactionId_ = bs; - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - props_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - props_.add(input.readMessage(com.alibaba.otter.canal.protocol.CanalEntry.Pair.PARSER, - extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - props_ = java.util.Collections.unmodifiableList(props_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_fieldAccessorTable.ensureFieldAccessorsInitialized(com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.class, - com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - - public TransactionEnd parsePartialFrom(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TransactionEnd(input, - extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int EXECUTETIME_FIELD_NUMBER = 1; - private long executeTime_; - - /** - * optional int64 executeTime = 1; - * - *
-         * *已废弃,请使用header里的executeTime*
-         * 
- */ - public boolean hasExecuteTime() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - - /** - * optional int64 executeTime = 1; - * - *
-         * *已废弃,请使用header里的executeTime*
-         * 
- */ - public long getExecuteTime() { - return executeTime_; - } - - public static final int TRANSACTIONID_FIELD_NUMBER = 2; - private java.lang.Object transactionId_; - - /** - * optional string transactionId = 2; - * - *
-         * *事务号*
-         * 
- */ - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - - /** - * optional string transactionId = 2; - * - *
-         * *事务号*
-         * 
- */ - public java.lang.String getTransactionId() { - java.lang.Object ref = transactionId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - transactionId_ = s; - } - return s; - } - } - - /** - * optional string transactionId = 2; - * - *
-         * *事务号*
-         * 
- */ - public com.google.protobuf.ByteString getTransactionIdBytes() { - java.lang.Object ref = transactionId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - transactionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROPS_FIELD_NUMBER = 3; - private java.util.List props_; - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - public java.util.List getPropsList() { - return props_; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - public java.util.List getPropsOrBuilderList() { - return props_; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - public int getPropsCount() { - return props_.size(); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { - return props_.get(index); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-         * *预留扩展*
-         * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder(int index) { - return props_.get(index); - } - - private void initFields() { - executeTime_ = 0L; - transactionId_ = ""; - props_ = java.util.Collections.emptyList(); - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt64(1, executeTime_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getTransactionIdBytes()); - } - for (int i = 0; i < props_.size(); i++) { - output.writeMessage(3, props_.get(i)); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, executeTime_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, getTransactionIdBytes()); - } - for (int i = 0; i < props_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, props_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - - @java.lang.Override - protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom(com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom(byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom(java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseDelimitedFrom(java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parseFrom(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { - return Builder.create(); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd prototype) { - return newBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return newBuilder(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.TransactionEnd} - * - *
-         * *结束事务的一些信息*
-         * 
- */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.TransactionEnd) com.alibaba.otter.canal.protocol.CanalEntry.TransactionEndOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor; + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor; - } + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.class, com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.Builder.class); + } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_fieldAccessorTable.ensureFieldAccessorsInitialized(com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.class, - com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.Builder.class); - } + // Construct using com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - // Construct using - // com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.newBuilder() - private Builder(){ - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent){ - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getPropsFieldBuilder(); - } - } - - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - executeTime_ = 0L; - bitField0_ = (bitField0_ & ~0x00000001); - transactionId_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - if (propsBuilder_ == null) { - props_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - propsBuilder_.clear(); - } - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor; - } - - public com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd getDefaultInstanceForType() { - return com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.getDefaultInstance(); - } - - public com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd build() { - com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd buildPartial() { - com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd result = new com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.executeTime_ = executeTime_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.transactionId_ = transactionId_; - if (propsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { - props_ = java.util.Collections.unmodifiableList(props_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.props_ = props_; - } else { - result.props_ = propsBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd) { - return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd other) { - if (other == com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.getDefaultInstance()) return this; - if (other.hasExecuteTime()) { - setExecuteTime(other.getExecuteTime()); - } - if (other.hasTransactionId()) { - bitField0_ |= 0x00000002; - transactionId_ = other.transactionId_; - onChanged(); - } - if (propsBuilder_ == null) { - if (!other.props_.isEmpty()) { - if (props_.isEmpty()) { - props_ = other.props_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensurePropsIsMutable(); - props_.addAll(other.props_); - } - onChanged(); - } - } else { - if (!other.props_.isEmpty()) { - if (propsBuilder_.isEmpty()) { - propsBuilder_.dispose(); - propsBuilder_ = null; - props_ = other.props_; - bitField0_ = (bitField0_ & ~0x00000004); - propsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getPropsFieldBuilder() : null; - } else { - propsBuilder_.addAllMessages(other.props_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private long executeTime_; - - /** - * optional int64 executeTime = 1; - * - *
-             * *已废弃,请使用header里的executeTime*
-             * 
- */ - public boolean hasExecuteTime() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - - /** - * optional int64 executeTime = 1; - * - *
-             * *已废弃,请使用header里的executeTime*
-             * 
- */ - public long getExecuteTime() { - return executeTime_; - } - - /** - * optional int64 executeTime = 1; - * - *
-             * *已废弃,请使用header里的executeTime*
-             * 
- */ - public Builder setExecuteTime(long value) { - bitField0_ |= 0x00000001; - executeTime_ = value; - onChanged(); - return this; - } - - /** - * optional int64 executeTime = 1; - * - *
-             * *已废弃,请使用header里的executeTime*
-             * 
- */ - public Builder clearExecuteTime() { - bitField0_ = (bitField0_ & ~0x00000001); - executeTime_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object transactionId_ = ""; - - /** - * optional string transactionId = 2; - * - *
-             * *事务号*
-             * 
- */ - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - - /** - * optional string transactionId = 2; - * - *
-             * *事务号*
-             * 
- */ - public java.lang.String getTransactionId() { - java.lang.Object ref = transactionId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - transactionId_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * optional string transactionId = 2; - * - *
-             * *事务号*
-             * 
- */ - public com.google.protobuf.ByteString getTransactionIdBytes() { - java.lang.Object ref = transactionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - transactionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * optional string transactionId = 2; - * - *
-             * *事务号*
-             * 
- */ - public Builder setTransactionId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - transactionId_ = value; - onChanged(); - return this; - } - - /** - * optional string transactionId = 2; - * - *
-             * *事务号*
-             * 
- */ - public Builder clearTransactionId() { - bitField0_ = (bitField0_ & ~0x00000002); - transactionId_ = getDefaultInstance().getTransactionId(); - onChanged(); - return this; - } - - /** - * optional string transactionId = 2; - * - *
-             * *事务号*
-             * 
- */ - public Builder setTransactionIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - transactionId_ = value; - onChanged(); - return this; - } - - private java.util.List props_ = java.util.Collections.emptyList(); - - private void ensurePropsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - props_ = new java.util.ArrayList(props_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder propsBuilder_; - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public java.util.List getPropsList() { - if (propsBuilder_ == null) { - return java.util.Collections.unmodifiableList(props_); - } else { - return propsBuilder_.getMessageList(); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public int getPropsCount() { - if (propsBuilder_ == null) { - return props_.size(); - } else { - return propsBuilder_.getCount(); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { - if (propsBuilder_ == null) { - return props_.get(index); - } else { - return propsBuilder_.getMessage(index); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder setProps(int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { - if (propsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropsIsMutable(); - props_.set(index, value); - onChanged(); - } else { - propsBuilder_.setMessage(index, value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder setProps(int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - props_.set(index, builderForValue.build()); - onChanged(); - } else { - propsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { - if (propsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropsIsMutable(); - props_.add(value); - onChanged(); - } else { - propsBuilder_.addMessage(value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addProps(int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { - if (propsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePropsIsMutable(); - props_.add(index, value); - onChanged(); - } else { - propsBuilder_.addMessage(index, value); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - props_.add(builderForValue.build()); - onChanged(); - } else { - propsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addProps(int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - props_.add(index, builderForValue.build()); - onChanged(); - } else { - propsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder addAllProps(java.lang.Iterable values) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, props_); - onChanged(); - } else { - propsBuilder_.addAllMessages(values); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder clearProps() { - if (propsBuilder_ == null) { - props_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - propsBuilder_.clear(); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public Builder removeProps(int index) { - if (propsBuilder_ == null) { - ensurePropsIsMutable(); - props_.remove(index); - onChanged(); - } else { - propsBuilder_.remove(index); - } - return this; - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder getPropsBuilder(int index) { - return getPropsFieldBuilder().getBuilder(index); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder(int index) { - if (propsBuilder_ == null) { - return props_.get(index); - } else { - return propsBuilder_.getMessageOrBuilder(index); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public java.util.List getPropsOrBuilderList() { - if (propsBuilder_ != null) { - return propsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(props_); - } - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { - return getPropsFieldBuilder().addBuilder(com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder(int index) { - return getPropsFieldBuilder().addBuilder(index, - com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); - } - - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-             * *预留扩展*
-             * 
- */ - public java.util.List getPropsBuilderList() { - return getPropsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder getPropsFieldBuilder() { - if (propsBuilder_ == null) { - propsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder(props_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); - props_ = null; - } - return propsBuilder_; - } - - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.TransactionEnd) + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getPropsFieldBuilder(); } + } + private static Builder create() { + return new Builder(); + } - static { - defaultInstance = new TransactionEnd(true); - defaultInstance.initFields(); + public Builder clear() { + super.clear(); + executeTime_ = 0L; + bitField0_ = (bitField0_ & ~0x00000001); + transactionId_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + if (propsBuilder_ == null) { + props_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + propsBuilder_.clear(); } + return this; + } - // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.TransactionEnd) + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor; + } + + public com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd getDefaultInstanceForType() { + return com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.getDefaultInstance(); + } + + public com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd build() { + com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd buildPartial() { + com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd result = new com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.executeTime_ = executeTime_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.transactionId_ = transactionId_; + if (propsBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + props_ = java.util.Collections.unmodifiableList(props_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.props_ = props_; + } else { + result.props_ = propsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd) { + return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd other) { + if (other == com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd.getDefaultInstance()) return this; + if (other.hasExecuteTime()) { + setExecuteTime(other.getExecuteTime()); + } + if (other.hasTransactionId()) { + bitField0_ |= 0x00000002; + transactionId_ = other.transactionId_; + onChanged(); + } + if (propsBuilder_ == null) { + if (!other.props_.isEmpty()) { + if (props_.isEmpty()) { + props_ = other.props_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensurePropsIsMutable(); + props_.addAll(other.props_); + } + onChanged(); + } + } else { + if (!other.props_.isEmpty()) { + if (propsBuilder_.isEmpty()) { + propsBuilder_.dispose(); + propsBuilder_ = null; + props_ = other.props_; + bitField0_ = (bitField0_ & ~0x00000004); + propsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getPropsFieldBuilder() : null; + } else { + propsBuilder_.addAllMessages(other.props_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalEntry.TransactionEnd) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private long executeTime_ ; + /** + * optional int64 executeTime = 1; + * + *
+       **已废弃,请使用header里的executeTime*
+       * 
+ */ + public boolean hasExecuteTime() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int64 executeTime = 1; + * + *
+       **已废弃,请使用header里的executeTime*
+       * 
+ */ + public long getExecuteTime() { + return executeTime_; + } + /** + * optional int64 executeTime = 1; + * + *
+       **已废弃,请使用header里的executeTime*
+       * 
+ */ + public Builder setExecuteTime(long value) { + bitField0_ |= 0x00000001; + executeTime_ = value; + onChanged(); + return this; + } + /** + * optional int64 executeTime = 1; + * + *
+       **已废弃,请使用header里的executeTime*
+       * 
+ */ + public Builder clearExecuteTime() { + bitField0_ = (bitField0_ & ~0x00000001); + executeTime_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object transactionId_ = ""; + /** + * optional string transactionId = 2; + * + *
+       **事务号*
+       * 
+ */ + public boolean hasTransactionId() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string transactionId = 2; + * + *
+       **事务号*
+       * 
+ */ + public java.lang.String getTransactionId() { + java.lang.Object ref = transactionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + transactionId_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string transactionId = 2; + * + *
+       **事务号*
+       * 
+ */ + public com.google.protobuf.ByteString + getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string transactionId = 2; + * + *
+       **事务号*
+       * 
+ */ + public Builder setTransactionId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + transactionId_ = value; + onChanged(); + return this; + } + /** + * optional string transactionId = 2; + * + *
+       **事务号*
+       * 
+ */ + public Builder clearTransactionId() { + bitField0_ = (bitField0_ & ~0x00000002); + transactionId_ = getDefaultInstance().getTransactionId(); + onChanged(); + return this; + } + /** + * optional string transactionId = 2; + * + *
+       **事务号*
+       * 
+ */ + public Builder setTransactionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + transactionId_ = value; + onChanged(); + return this; + } + + private java.util.List props_ = + java.util.Collections.emptyList(); + private void ensurePropsIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + props_ = new java.util.ArrayList(props_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> propsBuilder_; + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public java.util.List getPropsList() { + if (propsBuilder_ == null) { + return java.util.Collections.unmodifiableList(props_); + } else { + return propsBuilder_.getMessageList(); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public int getPropsCount() { + if (propsBuilder_ == null) { + return props_.size(); + } else { + return propsBuilder_.getCount(); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { + if (propsBuilder_ == null) { + return props_.get(index); + } else { + return propsBuilder_.getMessage(index); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder setProps( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { + if (propsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropsIsMutable(); + props_.set(index, value); + onChanged(); + } else { + propsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder setProps( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.set(index, builderForValue.build()); + onChanged(); + } else { + propsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { + if (propsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropsIsMutable(); + props_.add(value); + onChanged(); + } else { + propsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addProps( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { + if (propsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePropsIsMutable(); + props_.add(index, value); + onChanged(); + } else { + propsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addProps( + com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.add(builderForValue.build()); + onChanged(); + } else { + propsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addProps( + int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.add(index, builderForValue.build()); + onChanged(); + } else { + propsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder addAllProps( + java.lang.Iterable values) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, props_); + onChanged(); + } else { + propsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder clearProps() { + if (propsBuilder_ == null) { + props_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + propsBuilder_.clear(); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public Builder removeProps(int index) { + if (propsBuilder_ == null) { + ensurePropsIsMutable(); + props_.remove(index); + onChanged(); + } else { + propsBuilder_.remove(index); + } + return this; + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder getPropsBuilder( + int index) { + return getPropsFieldBuilder().getBuilder(index); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( + int index) { + if (propsBuilder_ == null) { + return props_.get(index); } else { + return propsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public java.util.List + getPropsOrBuilderList() { + if (propsBuilder_ != null) { + return propsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(props_); + } + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { + return getPropsFieldBuilder().addBuilder( + com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder( + int index) { + return getPropsFieldBuilder().addBuilder( + index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); + } + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+       **预留扩展*
+       * 
+ */ + public java.util.List + getPropsBuilderList() { + return getPropsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> + getPropsFieldBuilder() { + if (propsBuilder_ == null) { + propsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder>( + props_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + props_ = null; + } + return propsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.TransactionEnd) } - public interface PairOrBuilder extends - // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Pair) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string key = 1; - */ - boolean hasKey(); - - /** - * optional string key = 1; - */ - java.lang.String getKey(); - - /** - * optional string key = 1; - */ - com.google.protobuf.ByteString getKeyBytes(); - - /** - * optional string value = 2; - */ - boolean hasValue(); - - /** - * optional string value = 2; - */ - java.lang.String getValue(); - - /** - * optional string value = 2; - */ - com.google.protobuf.ByteString getValueBytes(); + static { + defaultInstance = new TransactionEnd(true); + defaultInstance.initFields(); } + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.TransactionEnd) + } + + public interface PairOrBuilder extends + // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Pair) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string key = 1; + */ + boolean hasKey(); + /** + * optional string key = 1; + */ + java.lang.String getKey(); + /** + * optional string key = 1; + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + * optional string value = 2; + */ + boolean hasValue(); + /** + * optional string value = 2; + */ + java.lang.String getValue(); + /** + * optional string value = 2; + */ + com.google.protobuf.ByteString + getValueBytes(); + } + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Pair} + * + *
+   **预留扩展*
+   * 
+ */ + public static final class Pair extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Pair) + PairOrBuilder { + // Use Pair.newBuilder() to construct. + private Pair(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private Pair(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final Pair defaultInstance; + public static Pair getDefaultInstance() { + return defaultInstance; + } + + public Pair getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Pair( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000001; + key_ = bs; + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + value_ = bs; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Pair_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalEntry.Pair.class, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Pair parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Pair(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int KEY_FIELD_NUMBER = 1; + private java.lang.Object key_; + /** + * optional string key = 1; + */ + public boolean hasKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string key = 1; + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + key_ = s; + } + return s; + } + } + /** + * optional string key = 1; + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private java.lang.Object value_; + /** + * optional string value = 2; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string value = 2; + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + value_ = s; + } + return s; + } + } + /** + * optional string value = 2; + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + key_ = ""; + value_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getKeyBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getValueBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getKeyBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getValueBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.Pair prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } /** * Protobuf type {@code com.alibaba.otter.canal.protocol.Pair} * *
-     * *预留扩展*
+     **预留扩展*
      * 
*/ - public static final class Pair extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Pair) - PairOrBuilder { - - // Use Pair.newBuilder() to construct. - private Pair(com.google.protobuf.GeneratedMessage.Builder builder){ - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - - private Pair(boolean noInit){ - this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); - } - - private static final Pair defaultInstance; - - public static Pair getDefaultInstance() { - return defaultInstance; - } - - public Pair getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Pair(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException{ - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - key_ = bs; - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - value_ = bs; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Pair_fieldAccessorTable.ensureFieldAccessorsInitialized(com.alibaba.otter.canal.protocol.CanalEntry.Pair.class, - com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { - - public Pair parsePartialFrom(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Pair(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int KEY_FIELD_NUMBER = 1; - private java.lang.Object key_; - - /** - * optional string key = 1; - */ - public boolean hasKey() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - - /** - * optional string key = 1; - */ - public java.lang.String getKey() { - java.lang.Object ref = key_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - key_ = s; - } - return s; - } - } - - /** - * optional string key = 1; - */ - public com.google.protobuf.ByteString getKeyBytes() { - java.lang.Object ref = key_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - key_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VALUE_FIELD_NUMBER = 2; - private java.lang.Object value_; - - /** - * optional string value = 2; - */ - public boolean hasValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - - /** - * optional string value = 2; - */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - value_ = s; - } - return s; - } - } - - /** - * optional string value = 2; - */ - public com.google.protobuf.ByteString getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private void initFields() { - key_ = ""; - value_ = ""; - } - - private byte memoizedIsInitialized = -1; - - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getKeyBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getValueBytes()); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, getKeyBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, getValueBytes()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - - @java.lang.Override - protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom(com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom(byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom(java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseDelimitedFrom(java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom(com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - - public static com.alibaba.otter.canal.protocol.CanalEntry.Pair parseFrom(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { - return Builder.create(); - } - - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder(com.alibaba.otter.canal.protocol.CanalEntry.Pair prototype) { - return newBuilder().mergeFrom(prototype); - } - - public Builder toBuilder() { - return newBuilder(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.Pair} - * - *
-         * *预留扩展*
-         * 
- */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Pair) com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor; + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor; - } + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Pair_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.alibaba.otter.canal.protocol.CanalEntry.Pair.class, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder.class); + } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Pair_fieldAccessorTable.ensureFieldAccessorsInitialized(com.alibaba.otter.canal.protocol.CanalEntry.Pair.class, - com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder.class); - } + // Construct using com.alibaba.otter.canal.protocol.CanalEntry.Pair.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - // Construct using - // com.alibaba.otter.canal.protocol.CanalEntry.Pair.newBuilder() - private Builder(){ - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent){ - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - key_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - value_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor; - } - - public com.alibaba.otter.canal.protocol.CanalEntry.Pair getDefaultInstanceForType() { - return com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance(); - } - - public com.alibaba.otter.canal.protocol.CanalEntry.Pair build() { - com.alibaba.otter.canal.protocol.CanalEntry.Pair result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.alibaba.otter.canal.protocol.CanalEntry.Pair buildPartial() { - com.alibaba.otter.canal.protocol.CanalEntry.Pair result = new com.alibaba.otter.canal.protocol.CanalEntry.Pair(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.key_ = key_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.value_ = value_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.Pair) { - return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.Pair) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalEntry.Pair other) { - if (other == com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()) return this; - if (other.hasKey()) { - bitField0_ |= 0x00000001; - key_ = other.key_; - onChanged(); - } - if (other.hasValue()) { - bitField0_ |= 0x00000002; - value_ = other.value_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom(com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.alibaba.otter.canal.protocol.CanalEntry.Pair parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.alibaba.otter.canal.protocol.CanalEntry.Pair) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object key_ = ""; - - /** - * optional string key = 1; - */ - public boolean hasKey() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - - /** - * optional string key = 1; - */ - public java.lang.String getKey() { - java.lang.Object ref = key_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - key_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * optional string key = 1; - */ - public com.google.protobuf.ByteString getKeyBytes() { - java.lang.Object ref = key_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - key_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * optional string key = 1; - */ - public Builder setKey(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - key_ = value; - onChanged(); - return this; - } - - /** - * optional string key = 1; - */ - public Builder clearKey() { - bitField0_ = (bitField0_ & ~0x00000001); - key_ = getDefaultInstance().getKey(); - onChanged(); - return this; - } - - /** - * optional string key = 1; - */ - public Builder setKeyBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - key_ = value; - onChanged(); - return this; - } - - private java.lang.Object value_ = ""; - - /** - * optional string value = 2; - */ - public boolean hasValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - - /** - * optional string value = 2; - */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - value_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * optional string value = 2; - */ - public com.google.protobuf.ByteString getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * optional string value = 2; - */ - public Builder setValue(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - value_ = value; - onChanged(); - return this; - } - - /** - * optional string value = 2; - */ - public Builder clearValue() { - bitField0_ = (bitField0_ & ~0x00000002); - value_ = getDefaultInstance().getValue(); - onChanged(); - return this; - } - - /** - * optional string value = 2; - */ - public Builder setValueBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - value_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Pair) + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } + } + private static Builder create() { + return new Builder(); + } - static { - defaultInstance = new Pair(true); - defaultInstance.initFields(); + public Builder clear() { + super.clear(); + key_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + value_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alibaba.otter.canal.protocol.CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor; + } + + public com.alibaba.otter.canal.protocol.CanalEntry.Pair getDefaultInstanceForType() { + return com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance(); + } + + public com.alibaba.otter.canal.protocol.CanalEntry.Pair build() { + com.alibaba.otter.canal.protocol.CanalEntry.Pair result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } + return result; + } - // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Pair) + public com.alibaba.otter.canal.protocol.CanalEntry.Pair buildPartial() { + com.alibaba.otter.canal.protocol.CanalEntry.Pair result = new com.alibaba.otter.canal.protocol.CanalEntry.Pair(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.key_ = key_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.value_ = value_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alibaba.otter.canal.protocol.CanalEntry.Pair) { + return mergeFrom((com.alibaba.otter.canal.protocol.CanalEntry.Pair)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alibaba.otter.canal.protocol.CanalEntry.Pair other) { + if (other == com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()) return this; + if (other.hasKey()) { + bitField0_ |= 0x00000001; + key_ = other.key_; + onChanged(); + } + if (other.hasValue()) { + bitField0_ |= 0x00000002; + value_ = other.value_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.alibaba.otter.canal.protocol.CanalEntry.Pair parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.alibaba.otter.canal.protocol.CanalEntry.Pair) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object key_ = ""; + /** + * optional string key = 1; + */ + public boolean hasKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string key = 1; + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + key_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string key = 1; + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string key = 1; + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + key_ = value; + onChanged(); + return this; + } + /** + * optional string key = 1; + */ + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000001); + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + * optional string key = 1; + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + key_ = value; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + * optional string value = 2; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string value = 2; + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + value_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string value = 2; + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string value = 2; + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + /** + * optional string value = 2; + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + * optional string value = 2; + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Pair) } - private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor; - private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_Entry_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_Header_descriptor; - private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_Header_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_Column_descriptor; - private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_Column_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor; - private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_RowData_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor; - private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_RowChange_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor; - private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor; - private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor; - private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alibaba_otter_canal_protocol_Pair_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { - java.lang.String[] descriptorData = { - "\n\023EntryProtocol.proto\022 com.alibaba.otter" - + ".canal.protocol\"\236\001\n\005Entry\0228\n\006header\030\001 \001(" - + "\0132(.com.alibaba.otter.canal.protocol.Hea" - + "der\022G\n\tentryType\030\002 \001(\0162+.com.alibaba.ott" - + "er.canal.protocol.EntryType:\007ROWDATA\022\022\n\n" - + "storeValue\030\003 \001(\014\"\203\003\n\006Header\022\022\n\007version\030\001" - + " \001(\005:\0011\022\023\n\013logfileName\030\002 \001(\t\022\025\n\rlogfileO" - + "ffset\030\003 \001(\003\022\020\n\010serverId\030\004 \001(\003\022\024\n\014servere" - + "nCode\030\005 \001(\t\022\023\n\013executeTime\030\006 \001(\003\022A\n\nsour" - + "ceType\030\007 \001(\0162&.com.alibaba.otter.canal.p", - "rotocol.Type:\005MYSQL\022\022\n\nschemaName\030\010 \001(\t\022" - + "\021\n\ttableName\030\t \001(\t\022\023\n\013eventLength\030\n \001(\003\022" - + "F\n\teventType\030\013 \001(\0162+.com.alibaba.otter.c" - + "anal.protocol.EventType:\006UPDATE\0225\n\005props" - + "\030\014 \003(\0132&.com.alibaba.otter.canal.protoco" - + "l.Pair\"\326\001\n\006Column\022\r\n\005index\030\001 \001(\005\022\017\n\007sqlT" - + "ype\030\002 \001(\005\022\014\n\004name\030\003 \001(\t\022\r\n\005isKey\030\004 \001(\010\022\017" - + "\n\007updated\030\005 \001(\010\022\025\n\006isNull\030\006 \001(\010:\005false\0225" - + "\n\005props\030\007 \003(\0132&.com.alibaba.otter.canal." - + "protocol.Pair\022\r\n\005value\030\010 \001(\t\022\016\n\006length\030\t", - " \001(\005\022\021\n\tmysqlType\030\n \001(\t\"\301\001\n\007RowData\022?\n\rb" - + "eforeColumns\030\001 \003(\0132(.com.alibaba.otter.c" - + "anal.protocol.Column\022>\n\014afterColumns\030\002 \003" - + "(\0132(.com.alibaba.otter.canal.protocol.Co" - + "lumn\0225\n\005props\030\003 \003(\0132&.com.alibaba.otter." - + "canal.protocol.Pair\"\222\002\n\tRowChange\022\017\n\007tab" - + "leId\030\001 \001(\003\022F\n\teventType\030\002 \001(\0162+.com.alib" - + "aba.otter.canal.protocol.EventType:\006UPDA" - + "TE\022\024\n\005isDdl\030\n \001(\010:\005false\022\013\n\003sql\030\013 \001(\t\022;\n" - + "\010rowDatas\030\014 \003(\0132).com.alibaba.otter.cana", - "l.protocol.RowData\0225\n\005props\030\r \003(\0132&.com." - + "alibaba.otter.canal.protocol.Pair\022\025\n\rddl" - + "SchemaName\030\016 \001(\t\"\207\001\n\020TransactionBegin\022\023\n" - + "\013executeTime\030\001 \001(\003\022\025\n\rtransactionId\030\002 \001(" - + "\t\0225\n\005props\030\003 \003(\0132&.com.alibaba.otter.can" - + "al.protocol.Pair\022\020\n\010threadId\030\004 \001(\003\"s\n\016Tr" - + "ansactionEnd\022\023\n\013executeTime\030\001 \001(\003\022\025\n\rtra" - + "nsactionId\030\002 \001(\t\0225\n\005props\030\003 \003(\0132&.com.al" - + "ibaba.otter.canal.protocol.Pair\"\"\n\004Pair\022" - + "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t*Q\n\tEntryType", - "\022\024\n\020TRANSACTIONBEGIN\020\001\022\013\n\007ROWDATA\020\002\022\022\n\016T" - + "RANSACTIONEND\020\003\022\r\n\tHEARTBEAT\020\004*\216\001\n\tEvent" - + "Type\022\n\n\006INSERT\020\001\022\n\n\006UPDATE\020\002\022\n\n\006DELETE\020\003" - + "\022\n\n\006CREATE\020\004\022\t\n\005ALTER\020\005\022\t\n\005ERASE\020\006\022\t\n\005QU" - + "ERY\020\007\022\014\n\010TRUNCATE\020\010\022\n\n\006RENAME\020\t\022\n\n\006CINDE" - + "X\020\n\022\n\n\006DINDEX\020\013*(\n\004Type\022\n\n\006ORACLE\020\001\022\t\n\005M" - + "YSQL\020\002\022\t\n\005PGSQL\020\003B0\n com.alibaba.otter.c" - + "anal.protocolB\nCanalEntryH\001" }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - - public com.google.protobuf.ExtensionRegistry assignDescriptors(com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] {}, - assigner); - internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor = getDescriptor().getMessageTypes().get(0); - internal_static_com_alibaba_otter_canal_protocol_Entry_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable(internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor, - new java.lang.String[] { "Header", "EntryType", "StoreValue", }); - internal_static_com_alibaba_otter_canal_protocol_Header_descriptor = getDescriptor().getMessageTypes().get(1); - internal_static_com_alibaba_otter_canal_protocol_Header_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable(internal_static_com_alibaba_otter_canal_protocol_Header_descriptor, - new java.lang.String[] { "Version", "LogfileName", "LogfileOffset", "ServerId", "ServerenCode", - "ExecuteTime", "SourceType", "SchemaName", "TableName", "EventLength", "EventType", "Props", }); - internal_static_com_alibaba_otter_canal_protocol_Column_descriptor = getDescriptor().getMessageTypes().get(2); - internal_static_com_alibaba_otter_canal_protocol_Column_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable(internal_static_com_alibaba_otter_canal_protocol_Column_descriptor, - new java.lang.String[] { "Index", "SqlType", "Name", "IsKey", "Updated", "IsNull", "Props", "Value", - "Length", "MysqlType", }); - internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor = getDescriptor().getMessageTypes().get(3); - internal_static_com_alibaba_otter_canal_protocol_RowData_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable(internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor, - new java.lang.String[] { "BeforeColumns", "AfterColumns", "Props", }); - internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor = getDescriptor().getMessageTypes() - .get(4); - internal_static_com_alibaba_otter_canal_protocol_RowChange_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable(internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor, - new java.lang.String[] { "TableId", "EventType", "IsDdl", "Sql", "RowDatas", "Props", "DdlSchemaName", }); - internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor = getDescriptor().getMessageTypes() - .get(5); - internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable(internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor, - new java.lang.String[] { "ExecuteTime", "TransactionId", "Props", "ThreadId", }); - internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor = getDescriptor().getMessageTypes() - .get(6); - internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable(internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor, - new java.lang.String[] { "ExecuteTime", "TransactionId", "Props", }); - internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor = getDescriptor().getMessageTypes().get(7); - internal_static_com_alibaba_otter_canal_protocol_Pair_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable(internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor, - new java.lang.String[] { "Key", "Value", }); + defaultInstance = new Pair(true); + defaultInstance.initFields(); } - // @@protoc_insertion_point(outer_class_scope) + // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Pair) + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alibaba_otter_canal_protocol_Entry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_alibaba_otter_canal_protocol_Header_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alibaba_otter_canal_protocol_Header_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_alibaba_otter_canal_protocol_Column_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alibaba_otter_canal_protocol_Column_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alibaba_otter_canal_protocol_RowData_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alibaba_otter_canal_protocol_RowChange_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alibaba_otter_canal_protocol_Pair_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\023EntryProtocol.proto\022 com.alibaba.otter" + + ".canal.protocol\"\236\001\n\005Entry\0228\n\006header\030\001 \001(" + + "\0132(.com.alibaba.otter.canal.protocol.Hea" + + "der\022G\n\tentryType\030\002 \001(\0162+.com.alibaba.ott" + + "er.canal.protocol.EntryType:\007ROWDATA\022\022\n\n" + + "storeValue\030\003 \001(\014\"\221\003\n\006Header\022\022\n\007version\030\001" + + " \001(\005:\0011\022\023\n\013logfileName\030\002 \001(\t\022\025\n\rlogfileO" + + "ffset\030\003 \001(\003\022\020\n\010serverId\030\004 \001(\003\022\024\n\014servere" + + "nCode\030\005 \001(\t\022\023\n\013executeTime\030\006 \001(\003\022A\n\nsour" + + "ceType\030\007 \001(\0162&.com.alibaba.otter.canal.p", + "rotocol.Type:\005MYSQL\022\022\n\nschemaName\030\010 \001(\t\022" + + "\021\n\ttableName\030\t \001(\t\022\023\n\013eventLength\030\n \001(\003\022" + + "F\n\teventType\030\013 \001(\0162+.com.alibaba.otter.c" + + "anal.protocol.EventType:\006UPDATE\0225\n\005props" + + "\030\014 \003(\0132&.com.alibaba.otter.canal.protoco" + + "l.Pair\022\014\n\004gtid\030\r \001(\t\"\326\001\n\006Column\022\r\n\005index" + + "\030\001 \001(\005\022\017\n\007sqlType\030\002 \001(\005\022\014\n\004name\030\003 \001(\t\022\r\n" + + "\005isKey\030\004 \001(\010\022\017\n\007updated\030\005 \001(\010\022\025\n\006isNull\030" + + "\006 \001(\010:\005false\0225\n\005props\030\007 \003(\0132&.com.alibab" + + "a.otter.canal.protocol.Pair\022\r\n\005value\030\010 \001", + "(\t\022\016\n\006length\030\t \001(\005\022\021\n\tmysqlType\030\n \001(\t\"\301\001" + + "\n\007RowData\022?\n\rbeforeColumns\030\001 \003(\0132(.com.a" + + "libaba.otter.canal.protocol.Column\022>\n\014af" + + "terColumns\030\002 \003(\0132(.com.alibaba.otter.can" + + "al.protocol.Column\0225\n\005props\030\003 \003(\0132&.com." + + "alibaba.otter.canal.protocol.Pair\"\222\002\n\tRo" + + "wChange\022\017\n\007tableId\030\001 \001(\003\022F\n\teventType\030\002 " + + "\001(\0162+.com.alibaba.otter.canal.protocol.E" + + "ventType:\006UPDATE\022\024\n\005isDdl\030\n \001(\010:\005false\022\013" + + "\n\003sql\030\013 \001(\t\022;\n\010rowDatas\030\014 \003(\0132).com.alib", + "aba.otter.canal.protocol.RowData\0225\n\005prop" + + "s\030\r \003(\0132&.com.alibaba.otter.canal.protoc" + + "ol.Pair\022\025\n\rddlSchemaName\030\016 \001(\t\"\207\001\n\020Trans" + + "actionBegin\022\023\n\013executeTime\030\001 \001(\003\022\025\n\rtran" + + "sactionId\030\002 \001(\t\0225\n\005props\030\003 \003(\0132&.com.ali" + + "baba.otter.canal.protocol.Pair\022\020\n\010thread" + + "Id\030\004 \001(\003\"s\n\016TransactionEnd\022\023\n\013executeTim" + + "e\030\001 \001(\003\022\025\n\rtransactionId\030\002 \001(\t\0225\n\005props\030" + + "\003 \003(\0132&.com.alibaba.otter.canal.protocol" + + ".Pair\"\"\n\004Pair\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(", + "\t*^\n\tEntryType\022\024\n\020TRANSACTIONBEGIN\020\001\022\013\n\007" + + "ROWDATA\020\002\022\022\n\016TRANSACTIONEND\020\003\022\r\n\tHEARTBE" + + "AT\020\004\022\013\n\007GTIDLOG\020\005*\230\001\n\tEventType\022\n\n\006INSER" + + "T\020\001\022\n\n\006UPDATE\020\002\022\n\n\006DELETE\020\003\022\n\n\006CREATE\020\004\022" + + "\t\n\005ALTER\020\005\022\t\n\005ERASE\020\006\022\t\n\005QUERY\020\007\022\014\n\010TRUN" + + "CATE\020\010\022\n\n\006RENAME\020\t\022\n\n\006CINDEX\020\n\022\n\n\006DINDEX" + + "\020\013\022\010\n\004GTID\020\014*(\n\004Type\022\n\n\006ORACLE\020\001\022\t\n\005MYSQ" + + "L\020\002\022\t\n\005PGSQL\020\003B0\n com.alibaba.otter.cana" + + "l.protocolB\nCanalEntryH\001" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_com_alibaba_otter_canal_protocol_Entry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor, + new java.lang.String[] { "Header", "EntryType", "StoreValue", }); + internal_static_com_alibaba_otter_canal_protocol_Header_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_com_alibaba_otter_canal_protocol_Header_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alibaba_otter_canal_protocol_Header_descriptor, + new java.lang.String[] { "Version", "LogfileName", "LogfileOffset", "ServerId", "ServerenCode", "ExecuteTime", "SourceType", "SchemaName", "TableName", "EventLength", "EventType", "Props", "Gtid", }); + internal_static_com_alibaba_otter_canal_protocol_Column_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_com_alibaba_otter_canal_protocol_Column_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alibaba_otter_canal_protocol_Column_descriptor, + new java.lang.String[] { "Index", "SqlType", "Name", "IsKey", "Updated", "IsNull", "Props", "Value", "Length", "MysqlType", }); + internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_com_alibaba_otter_canal_protocol_RowData_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor, + new java.lang.String[] { "BeforeColumns", "AfterColumns", "Props", }); + internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_com_alibaba_otter_canal_protocol_RowChange_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor, + new java.lang.String[] { "TableId", "EventType", "IsDdl", "Sql", "RowDatas", "Props", "DdlSchemaName", }); + internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alibaba_otter_canal_protocol_TransactionBegin_descriptor, + new java.lang.String[] { "ExecuteTime", "TransactionId", "Props", "ThreadId", }); + internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alibaba_otter_canal_protocol_TransactionEnd_descriptor, + new java.lang.String[] { "ExecuteTime", "TransactionId", "Props", }); + internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_com_alibaba_otter_canal_protocol_Pair_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alibaba_otter_canal_protocol_Pair_descriptor, + new java.lang.String[] { "Key", "Value", }); + } + + // @@protoc_insertion_point(outer_class_scope) } diff --git a/protocol/src/main/java/com/alibaba/otter/canal/protocol/EntryProtocol.proto b/protocol/src/main/java/com/alibaba/otter/canal/protocol/EntryProtocol.proto index 4553556b..15ee319a 100644 --- a/protocol/src/main/java/com/alibaba/otter/canal/protocol/EntryProtocol.proto +++ b/protocol/src/main/java/com/alibaba/otter/canal/protocol/EntryProtocol.proto @@ -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; } /**数据库类型**/ diff --git a/protocol/src/main/java/com/alibaba/otter/canal/protocol/position/EntryPosition.java b/protocol/src/main/java/com/alibaba/otter/canal/protocol/position/EntryPosition.java index 1f8ec38d..a830e636 100644 --- a/protocol/src/main/java/com/alibaba/otter/canal/protocol/position/EntryPosition.java +++ b/protocol/src/main/java/com/alibaba/otter/canal/protocol/position/EntryPosition.java @@ -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; diff --git a/store/src/main/java/com/alibaba/otter/canal/store/helper/CanalEventUtils.java b/store/src/main/java/com/alibaba/otter/canal/store/helper/CanalEventUtils.java index 4d4e8f35..ac858446 100644 --- a/store/src/main/java/com/alibaba/otter/canal/store/helper/CanalEventUtils.java +++ b/store/src/main/java/com/alibaba/otter/canal/store/helper/CanalEventUtils.java @@ -54,6 +54,9 @@ public class CanalEventUtils { // add serverId at 2016-06-28 position.setServerId(event.getEntry().getHeader().getServerId()); + // add gtid + position.setGtid(event.getEntry().getHeader().getGtid()); + LogPosition logPosition = new LogPosition(); logPosition.setPostion(position); logPosition.setIdentity(event.getLogIdentity()); From 70e6bdde02288cccbebdb51c0bc52898c6c8ee1a Mon Sep 17 00:00:00 2001 From: spccold Date: Sat, 5 May 2018 11:35:41 +0800 Subject: [PATCH 02/14] close zkclientx if necessary when stop canal --- .../com/alibaba/otter/canal/deployer/CanalController.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deployer/src/main/java/com/alibaba/otter/canal/deployer/CanalController.java b/deployer/src/main/java/com/alibaba/otter/canal/deployer/CanalController.java index 9bf42bf1..08c0744d 100644 --- a/deployer/src/main/java/com/alibaba/otter/canal/deployer/CanalController.java +++ b/deployer/src/main/java/com/alibaba/otter/canal/deployer/CanalController.java @@ -454,6 +454,10 @@ public class CanalController { // 释放canal的工作节点 releaseCid(ZookeeperPathUtils.getCanalClusterNode(ip + ":" + port)); logger.info("## stop the canal server[{}:{}]", ip, port); + + if (zkclientx != null) { + zkclientx.close(); + } } private void initCid(String path) { From 7eb6fb3e8a263dee9fc93ce004900e665485914f Mon Sep 17 00:00:00 2001 From: spccold Date: Sun, 6 May 2018 21:50:34 +0800 Subject: [PATCH 03/14] fix CanalInstanceWithManager#doInitEventParser bug --- .../otter/canal/instance/manager/CanalInstanceWithManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instance/manager/src/main/java/com/alibaba/otter/canal/instance/manager/CanalInstanceWithManager.java b/instance/manager/src/main/java/com/alibaba/otter/canal/instance/manager/CanalInstanceWithManager.java index 53196169..bca5ba13 100644 --- a/instance/manager/src/main/java/com/alibaba/otter/canal/instance/manager/CanalInstanceWithManager.java +++ b/instance/manager/src/main/java/com/alibaba/otter/canal/instance/manager/CanalInstanceWithManager.java @@ -263,7 +263,7 @@ public class CanalInstanceWithManager extends AbstractCanalInstance { mysqlEventParser.setMasterPosition(masterPosition); if (parameters.getPositions().size() > 1) { - EntryPosition standbyPosition = JsonUtils.unmarshalFromString(parameters.getPositions().get(0), + EntryPosition standbyPosition = JsonUtils.unmarshalFromString(parameters.getPositions().get(1), EntryPosition.class); mysqlEventParser.setStandbyPosition(standbyPosition); } From c8f1d54fa18f724e25f62e2c2feddd3eeb78b76c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=83=E9=94=8B?= Date: Mon, 7 May 2018 10:18:25 +0800 Subject: [PATCH 04/14] fixed issue #619, improve code --- .../alibaba/otter/canal/example/AbstractCanalClientTest.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/example/src/main/java/com/alibaba/otter/canal/example/AbstractCanalClientTest.java b/example/src/main/java/com/alibaba/otter/canal/example/AbstractCanalClientTest.java index 68827b8d..264e1b1e 100644 --- a/example/src/main/java/com/alibaba/otter/canal/example/AbstractCanalClientTest.java +++ b/example/src/main/java/com/alibaba/otter/canal/example/AbstractCanalClientTest.java @@ -4,7 +4,6 @@ import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; -import com.alibaba.otter.canal.client.impl.ClusterCanalConnector; import org.apache.commons.lang.SystemUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -13,6 +12,7 @@ import org.springframework.util.Assert; import org.springframework.util.CollectionUtils; import com.alibaba.otter.canal.client.CanalConnector; +import com.alibaba.otter.canal.client.impl.ClusterCanalConnector; import com.alibaba.otter.canal.protocol.CanalEntry.Column; import com.alibaba.otter.canal.protocol.CanalEntry.Entry; import com.alibaba.otter.canal.protocol.CanalEntry.EntryType; @@ -84,8 +84,8 @@ public class AbstractCanalClientTest { }); thread.setUncaughtExceptionHandler(handler); - thread.start(); running = true; + thread.start(); } protected void stop() { @@ -112,7 +112,6 @@ public class AbstractCanalClientTest { protected void process() { int batchSize = 5 * 1024; - while (!running); //waiting until running == true while (running) { try { MDC.put("destination", destination); From 4141049bb90ce6dc1ce05a58c95f2d974fdd5865 Mon Sep 17 00:00:00 2001 From: rewerma Date: Mon, 7 May 2018 15:13:24 +0800 Subject: [PATCH 05/14] =?UTF-8?q?=E5=9C=A8CanalConnector=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=8A=A0=E5=85=A5stopRunning=E6=96=B9=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E7=94=A8=E4=BA=8E=E4=BC=98=E9=9B=85=E5=81=9C=E6=AD=A2client?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../otter/canal/client/CanalConnector.java | 5 ++++ .../client/impl/ClusterCanalConnector.java | 4 ++++ .../client/impl/SimpleCanalConnector.java | 24 ++++++++++++++++++- pom.xml | 2 +- 4 files changed, 33 insertions(+), 2 deletions(-) diff --git a/client/src/main/java/com/alibaba/otter/canal/client/CanalConnector.java b/client/src/main/java/com/alibaba/otter/canal/client/CanalConnector.java index fb0db67f..85177d98 100644 --- a/client/src/main/java/com/alibaba/otter/canal/client/CanalConnector.java +++ b/client/src/main/java/com/alibaba/otter/canal/client/CanalConnector.java @@ -150,4 +150,9 @@ public interface CanalConnector { */ void rollback() throws CanalClientException; + /** + * 中断的阻塞,用于优雅停止client + * @throws CanalClientException + */ + void stopRunning() throws CanalClientException; } diff --git a/client/src/main/java/com/alibaba/otter/canal/client/impl/ClusterCanalConnector.java b/client/src/main/java/com/alibaba/otter/canal/client/impl/ClusterCanalConnector.java index c339af78..8446e948 100644 --- a/client/src/main/java/com/alibaba/otter/canal/client/impl/ClusterCanalConnector.java +++ b/client/src/main/java/com/alibaba/otter/canal/client/impl/ClusterCanalConnector.java @@ -328,4 +328,8 @@ public class ClusterCanalConnector implements CanalConnector { return currentConnector; } + public void stopRunning() { + currentConnector.stopRunning(); + } + } diff --git a/client/src/main/java/com/alibaba/otter/canal/client/impl/SimpleCanalConnector.java b/client/src/main/java/com/alibaba/otter/canal/client/impl/SimpleCanalConnector.java index 3b25e5d2..a6eabed1 100644 --- a/client/src/main/java/com/alibaba/otter/canal/client/impl/SimpleCanalConnector.java +++ b/client/src/main/java/com/alibaba/otter/canal/client/impl/SimpleCanalConnector.java @@ -44,7 +44,7 @@ import com.google.protobuf.ByteString; /** * 基于{@linkplain CanalServerWithNetty}定义的网络协议接口,对于canal数据进行get/rollback/ack等操作 - * + * * @author jianghang 2012-10-24 下午05:37:20 * @version 1.0.0 */ @@ -75,6 +75,8 @@ public class SimpleCanalConnector implements CanalConnector { private Object readDataLock = new Object(); private Object writeDataLock = new Object(); + private boolean running = false; + public SimpleCanalConnector(SocketAddress address, String username, String password, String destination){ this(address, username, password, destination, 60000); } @@ -99,6 +101,9 @@ public class SimpleCanalConnector implements CanalConnector { } } else { waitClientRunning(); + if (!running) { + return; + } doConnect(); if (filter != null) { // 如果存在条件,说明是自动切换,基于上一次的条件订阅一次 subscribe(filter); @@ -208,6 +213,9 @@ public class SimpleCanalConnector implements CanalConnector { public void subscribe(String filter) throws CanalClientException { waitClientRunning(); + if (!running) { + return; + } try { writeWithHeader(Packet.newBuilder() .setType(PacketType.SUBSCRIPTION) @@ -234,6 +242,9 @@ public class SimpleCanalConnector implements CanalConnector { public void unsubscribe() throws CanalClientException { waitClientRunning(); + if (!running) { + return; + } try { writeWithHeader(Packet.newBuilder() .setType(PacketType.UNSUBSCRIPTION) @@ -445,6 +456,8 @@ public class SimpleCanalConnector implements CanalConnector { throw new CanalClientException("should connect first"); } + running = true; + mutex.get();// 阻塞等待 } } catch (InterruptedException e) { @@ -502,4 +515,13 @@ public class SimpleCanalConnector implements CanalConnector { this.filter = filter; } + public void stopRunning() { + if (running) { + running = false; //设置为非running状态 + if (!mutex.state()) { + mutex.set(true); //中断阻塞 + } + } + } + } diff --git a/pom.xml b/pom.xml index 8c93c9ee..e9c2623b 100644 --- a/pom.xml +++ b/pom.xml @@ -254,7 +254,7 @@ com.alibaba.fastsql fastsql - 2.0.0_preview_228 + 2.0.0_preview_186 com.alibaba From 3c913d1e2209a0ab73b9568f2fae29aa92e80b8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=83=E9=94=8B?= Date: Mon, 7 May 2018 18:33:37 +0800 Subject: [PATCH 06/14] fixed issue #126, support gtid --- .../dbsync/binlog/event/GtidLogEvent.java | 6 +- .../resources/example/instance.properties | 5 +- .../resources/spring/default-instance.xml | 5 ++ .../main/resources/spring/group-instance.xml | 4 ++ .../main/resources/spring/memory-instance.xml | 5 ++ .../example/AbstractCanalClientTest.java | 21 ++++--- .../canal/meta/FileMixedMetaManager.java | 9 +-- .../parse/inbound/AbstractEventParser.java | 13 +---- .../mysql/AbstractMysqlEventParser.java | 30 +++++----- .../parse/inbound/mysql/MysqlEventParser.java | 10 ++-- .../inbound/mysql/dbsync/LogEventConvert.java | 34 ++++++++++-- .../mysql/dbsync/LogEventConvertGTID.java | 55 ------------------- .../parse/inbound/mysql/MysqlDumpTest.java | 4 +- 13 files changed, 90 insertions(+), 111 deletions(-) delete mode 100644 parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/dbsync/LogEventConvertGTID.java diff --git a/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/GtidLogEvent.java b/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/GtidLogEvent.java index 411b6a78..064f60bf 100644 --- a/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/GtidLogEvent.java +++ b/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/GtidLogEvent.java @@ -1,11 +1,11 @@ package com.taobao.tddl.dbsync.binlog.event; -import com.taobao.tddl.dbsync.binlog.LogBuffer; -import com.taobao.tddl.dbsync.binlog.LogEvent; - import java.nio.ByteBuffer; import java.util.UUID; +import com.taobao.tddl.dbsync.binlog.LogBuffer; +import com.taobao.tddl.dbsync.binlog.LogEvent; + /** * @author jianghang 2013-4-8 上午12:36:29 * @version 1.0.3 diff --git a/deployer/src/main/resources/example/instance.properties b/deployer/src/main/resources/example/instance.properties index 32f4f78f..a3703b86 100644 --- a/deployer/src/main/resources/example/instance.properties +++ b/deployer/src/main/resources/example/instance.properties @@ -1,15 +1,16 @@ ################################################# ## mysql serverId canal.instance.mysql.slaveId=0 + # position info canal.instance.master.address=127.0.0.1:3306 +# enable gtid use true/false +canal.instance.gtidon=false canal.instance.master.journal.name= canal.instance.master.position= canal.instance.master.timestamp= canal.instance.master.gtid= -canal.instance.gtidon=true - # table meta tsdb info canal.instance.tsdb.enable=true canal.instance.tsdb.dir=${canal.file.data.dir:../conf}/${canal.instance.destination:} diff --git a/deployer/src/main/resources/spring/default-instance.xml b/deployer/src/main/resources/spring/default-instance.xml index 8a26c34a..93cb39af 100644 --- a/deployer/src/main/resources/spring/default-instance.xml +++ b/deployer/src/main/resources/spring/default-instance.xml @@ -166,6 +166,7 @@ + @@ -173,6 +174,7 @@ + @@ -187,5 +189,8 @@ + + + diff --git a/deployer/src/main/resources/spring/group-instance.xml b/deployer/src/main/resources/spring/group-instance.xml index 5ac91794..e8c0dd0f 100644 --- a/deployer/src/main/resources/spring/group-instance.xml +++ b/deployer/src/main/resources/spring/group-instance.xml @@ -148,6 +148,7 @@ + @@ -155,6 +156,7 @@ + @@ -239,6 +241,7 @@ + @@ -246,6 +249,7 @@ + diff --git a/deployer/src/main/resources/spring/memory-instance.xml b/deployer/src/main/resources/spring/memory-instance.xml index 7f1eff3f..ef8e4880 100644 --- a/deployer/src/main/resources/spring/memory-instance.xml +++ b/deployer/src/main/resources/spring/memory-instance.xml @@ -139,6 +139,7 @@ + @@ -146,6 +147,7 @@ + @@ -160,5 +162,8 @@ + + + diff --git a/example/src/main/java/com/alibaba/otter/canal/example/AbstractCanalClientTest.java b/example/src/main/java/com/alibaba/otter/canal/example/AbstractCanalClientTest.java index 264e1b1e..3c2cda96 100644 --- a/example/src/main/java/com/alibaba/otter/canal/example/AbstractCanalClientTest.java +++ b/example/src/main/java/com/alibaba/otter/canal/example/AbstractCanalClientTest.java @@ -4,6 +4,7 @@ import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; +import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.SystemUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -58,10 +59,12 @@ public class AbstractCanalClientTest { context_format += "****************************************************" + SEP; row_format = SEP - + "----------------> binlog[{}:{}] , name[{},{}] , eventType : {} , executeTime : {}({}) , delay : {} ms" + + "----------------> binlog[{}:{}] , name[{},{}] , eventType : {} , executeTime : {}({}) , gtid : ({}) , delay : {} ms" + SEP; - transaction_format = SEP + "================> binlog[{}:{}] , executeTime : {}({}) , delay : {}ms" + SEP; + transaction_format = SEP + + "================> binlog[{}:{}] , executeTime : {}({}) , gtid : ({}) , delay : {}ms" + + SEP; } @@ -166,8 +169,12 @@ public class AbstractCanalClientTest { long time = entry.getHeader().getExecuteTime(); Date date = new Date(time); SimpleDateFormat format = new SimpleDateFormat(DATE_FORMAT); - return entry.getHeader().getLogfileName() + ":" + entry.getHeader().getLogfileOffset() + ":" - + entry.getHeader().getExecuteTime() + "(" + format.format(date) + ")"; + String position = entry.getHeader().getLogfileName() + ":" + entry.getHeader().getLogfileOffset() + ":" + + entry.getHeader().getExecuteTime() + "(" + format.format(date) + ")"; + if (StringUtils.isNotEmpty(entry.getHeader().getGtid())) { + position += " gtid(" + entry.getHeader().getGtid() + ")"; + } + return position; } protected void printEntry(List entrys) { @@ -190,7 +197,7 @@ public class AbstractCanalClientTest { new Object[] { entry.getHeader().getLogfileName(), String.valueOf(entry.getHeader().getLogfileOffset()), String.valueOf(entry.getHeader().getExecuteTime()), simpleDateFormat.format(date), - String.valueOf(delayTime) }); + entry.getHeader().getGtid(), String.valueOf(delayTime) }); logger.info(" BEGIN ----> Thread id: {}", begin.getThreadId()); } else if (entry.getEntryType() == EntryType.TRANSACTIONEND) { TransactionEnd end = null; @@ -206,7 +213,7 @@ public class AbstractCanalClientTest { new Object[] { entry.getHeader().getLogfileName(), String.valueOf(entry.getHeader().getLogfileOffset()), String.valueOf(entry.getHeader().getExecuteTime()), simpleDateFormat.format(date), - String.valueOf(delayTime) }); + entry.getHeader().getGtid(), String.valueOf(delayTime) }); } continue; @@ -227,7 +234,7 @@ public class AbstractCanalClientTest { String.valueOf(entry.getHeader().getLogfileOffset()), entry.getHeader().getSchemaName(), entry.getHeader().getTableName(), eventType, String.valueOf(entry.getHeader().getExecuteTime()), simpleDateFormat.format(date), - String.valueOf(delayTime) }); + entry.getHeader().getGtid(), String.valueOf(delayTime) }); if (eventType == EventType.QUERY || rowChage.getIsDdl()) { logger.info(" sql ----> " + rowChage.getSql() + SEP); diff --git a/meta/src/main/java/com/alibaba/otter/canal/meta/FileMixedMetaManager.java b/meta/src/main/java/com/alibaba/otter/canal/meta/FileMixedMetaManager.java index 383fb351..49543939 100644 --- a/meta/src/main/java/com/alibaba/otter/canal/meta/FileMixedMetaManager.java +++ b/meta/src/main/java/com/alibaba/otter/canal/meta/FileMixedMetaManager.java @@ -109,10 +109,11 @@ public class FileMixedMetaManager extends MemoryMetaManager implements CanalMeta // 定时将内存中的最新值刷到file中,多次变更只刷一次 if (logger.isInfoEnabled()) { LogPosition cursor = (LogPosition) getCursor(clientIdentity); - logger.info("clientId:{} cursor:[{},{},{}] address[{}]", - new Object[] { clientIdentity.getClientId(), cursor.getPostion().getJournalName(), - cursor.getPostion().getPosition(), cursor.getPostion().getTimestamp(), - cursor.getIdentity().getSourceAddress().toString() }); + logger.info("clientId:{} cursor:[{},{},{},{},{}] address[{}]", new Object[] { + clientIdentity.getClientId(), cursor.getPostion().getJournalName(), + cursor.getPostion().getPosition(), cursor.getPostion().getTimestamp(), + cursor.getPostion().getServerId(), cursor.getPostion().getGtid(), + cursor.getIdentity().getSourceAddress().toString() }); } flushDataToFile(clientIdentity.getDestination()); updateCursorTasks.remove(clientIdentity); diff --git a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/AbstractEventParser.java b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/AbstractEventParser.java index c486c463..d047c6be 100644 --- a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/AbstractEventParser.java +++ b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/AbstractEventParser.java @@ -8,8 +8,6 @@ import java.util.TimerTask; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; -import com.alibaba.otter.canal.parse.driver.mysql.packets.MysqlGTIDSet; -import com.google.protobuf.InvalidProtocolBufferException; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.exception.ExceptionUtils; import org.apache.commons.lang.math.RandomUtils; @@ -21,6 +19,7 @@ import com.alibaba.otter.canal.common.AbstractCanalLifeCycle; import com.alibaba.otter.canal.common.alarm.CanalAlarmHandler; import com.alibaba.otter.canal.filter.CanalEventFilter; import com.alibaba.otter.canal.parse.CanalEventParser; +import com.alibaba.otter.canal.parse.driver.mysql.packets.MysqlGTIDSet; import com.alibaba.otter.canal.parse.exception.CanalParseException; import com.alibaba.otter.canal.parse.exception.TableIdNotFoundException; import com.alibaba.otter.canal.parse.inbound.EventTransactionBuffer.TransactionFlushCallback; @@ -90,7 +89,6 @@ public abstract class AbstractEventParser extends AbstractCanalLifeCycle protected Throwable exception = null; protected boolean isGTIDMode = false; // 是否是GTID模式 - protected String GTIDSetStr = null; protected abstract BinlogParser buildParser(); @@ -550,13 +548,4 @@ public abstract class AbstractEventParser extends AbstractCanalLifeCycle public void setIsGTIDMode(boolean isGTIDMode) { this.isGTIDMode = isGTIDMode; } - - public String getGTIDSetStr() { - return GTIDSetStr; - } - - public void setGTIDSetStr(String GTIDSetStr) { - this.GTIDSetStr = GTIDSetStr; - } - } diff --git a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/AbstractMysqlEventParser.java b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/AbstractMysqlEventParser.java index 8d0c5288..3b0e605d 100644 --- a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/AbstractMysqlEventParser.java +++ b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/AbstractMysqlEventParser.java @@ -1,15 +1,13 @@ package com.alibaba.otter.canal.parse.inbound.mysql; -import java.io.IOException; import java.nio.charset.Charset; -import com.alibaba.otter.canal.parse.driver.mysql.packets.MysqlGTIDSet; -import com.alibaba.otter.canal.parse.inbound.mysql.dbsync.LogEventConvertGTID; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.alibaba.otter.canal.filter.CanalEventFilter; import com.alibaba.otter.canal.filter.aviater.AviaterRegexFilter; +import com.alibaba.otter.canal.parse.driver.mysql.packets.MysqlGTIDSet; import com.alibaba.otter.canal.parse.exception.CanalParseException; import com.alibaba.otter.canal.parse.inbound.AbstractEventParser; import com.alibaba.otter.canal.parse.inbound.BinlogParser; @@ -37,20 +35,7 @@ public abstract class AbstractMysqlEventParser extends AbstractEventParser { protected boolean useDruidDdlFilter = true; protected BinlogParser buildParser() { - LogEventConvert convert; - - if (isGTIDMode()) { - EntryPosition position; - try { - position = findStartPosition(null); - } catch (IOException e) { - throw new RuntimeException("findStartPosition failed.", e); - } - convert = new LogEventConvertGTID(MysqlGTIDSet.parse(position.getGtid())); - } else { - convert = new LogEventConvert(); - } - + LogEventConvert convert = new LogEventConvert(); if (eventFilter != null && eventFilter instanceof AviaterRegexFilter) { convert.setNameFilter((AviaterRegexFilter) eventFilter); } @@ -84,7 +69,18 @@ public abstract class AbstractMysqlEventParser extends AbstractEventParser { * @return */ protected boolean processTableMeta(EntryPosition position) { + if (isGTIDMode()) { + if (binlogParser instanceof LogEventConvert) { + // 记录gtid + ((LogEventConvert) binlogParser).setGtidSet(MysqlGTIDSet.parse(position.getGtid())); + } + } + if (tableMetaTSDB != null) { + if (position.getTimestamp() == null || position.getTimestamp() <= 0) { + throw new CanalParseException("use gtid and TableMeta TSDB should be config timestamp > 0"); + } + return tableMetaTSDB.rollback(position); } diff --git a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlEventParser.java b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlEventParser.java index 6b0c7a66..2efab0ee 100644 --- a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlEventParser.java +++ b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlEventParser.java @@ -10,10 +10,6 @@ import java.util.Map; import java.util.TimerTask; import java.util.concurrent.atomic.AtomicLong; -import com.alibaba.otter.canal.filter.aviater.AviaterRegexFilter; -import com.alibaba.otter.canal.parse.driver.mysql.packets.MysqlGTIDSet; -import com.alibaba.otter.canal.parse.inbound.BinlogParser; -import com.alibaba.otter.canal.parse.inbound.mysql.dbsync.LogEventConvertGTID; import org.apache.commons.lang.StringUtils; import org.springframework.util.CollectionUtils; @@ -354,8 +350,12 @@ public class MysqlEventParser extends AbstractMysqlEventParser implements CanalE if (logPosition != null) { return logPosition.getPostion(); } - return masterPosition; + + if (StringUtils.isNotEmpty(masterPosition.getGtid())) { + return masterPosition; + } } + EntryPosition startPosition = findStartPositionInternal(connection); if (needTransactionPosition.get()) { logger.warn("prepare to find last position : {}", startPosition.toString()); diff --git a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/dbsync/LogEventConvert.java b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/dbsync/LogEventConvert.java index dc243fd3..87ec3b59 100644 --- a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/dbsync/LogEventConvert.java +++ b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/dbsync/LogEventConvert.java @@ -17,6 +17,7 @@ import org.slf4j.LoggerFactory; import com.alibaba.otter.canal.common.AbstractCanalLifeCycle; import com.alibaba.otter.canal.filter.aviater.AviaterRegexFilter; +import com.alibaba.otter.canal.parse.driver.mysql.packets.GTIDSet; import com.alibaba.otter.canal.parse.exception.CanalParseException; import com.alibaba.otter.canal.parse.exception.TableIdNotFoundException; import com.alibaba.otter.canal.parse.inbound.BinlogParser; @@ -40,6 +41,7 @@ import com.alibaba.otter.canal.protocol.position.EntryPosition; import com.google.protobuf.ByteString; import com.taobao.tddl.dbsync.binlog.LogEvent; import com.taobao.tddl.dbsync.binlog.event.DeleteRowsLogEvent; +import com.taobao.tddl.dbsync.binlog.event.GtidLogEvent; import com.taobao.tddl.dbsync.binlog.event.IntvarLogEvent; import com.taobao.tddl.dbsync.binlog.event.LogHeader; import com.taobao.tddl.dbsync.binlog.event.QueryLogEvent; @@ -56,7 +58,6 @@ import com.taobao.tddl.dbsync.binlog.event.UserVarLogEvent; import com.taobao.tddl.dbsync.binlog.event.WriteRowsLogEvent; import com.taobao.tddl.dbsync.binlog.event.XidLogEvent; import com.taobao.tddl.dbsync.binlog.event.mariadb.AnnotateRowsEvent; -import com.taobao.tddl.dbsync.binlog.event.GtidLogEvent; /** * 基于{@linkplain LogEvent}转化为Entry对象的处理 @@ -93,6 +94,17 @@ public class LogEventConvert extends AbstractCanalLifeCycle implements BinlogPar private boolean filterRows = false; private boolean useDruidDdlFilter = true; + // latest gtid + private GTIDSet gtidSet; + + public LogEventConvert(GTIDSet gtidSet){ + this.gtidSet = gtidSet; + } + + public LogEventConvert(){ + + } + @Override public Entry parse(LogEvent logEvent, boolean isSeek) throws CanalParseException { if (logEvent == null || logEvent instanceof UnknownLogEvent) { @@ -148,10 +160,15 @@ public class LogEventConvert extends AbstractCanalLifeCycle implements BinlogPar private Entry parseGTIDLogEvent(GtidLogEvent logEvent) { LogHeader logHeader = logEvent.getHeader(); - Header header = createHeader("", logHeader, "", "", EventType.GTID); + String value = logEvent.getSid().toString() + ":" + logEvent.getGno(); Pair.Builder builder = Pair.newBuilder(); builder.setKey("gtid"); - builder.setValue(String.format("%s:%d", logEvent.getSid(), logEvent.getGno())); + builder.setValue(value); + if (gtidSet != null) { + gtidSet.update(value); + } + + Header header = createHeader("", logHeader, "", "", EventType.GTID); return createEntry(header, EntryType.GTIDLOG, builder.build().toByteString()); } @@ -737,6 +754,11 @@ public class LogEventConvert extends AbstractCanalLifeCycle implements BinlogPar headerBuilder.setTableName(tableName); } headerBuilder.setEventLength(logHeader.getEventLen()); + // enable gtid position + if (gtidSet != null) { + String gtid = gtidSet.toString(); + headerBuilder.setGtid(gtid); + } return headerBuilder.build(); } @@ -785,7 +807,7 @@ public class LogEventConvert extends AbstractCanalLifeCycle implements BinlogPar return "LONGTEXT".equalsIgnoreCase(columnType) || "MEDIUMTEXT".equalsIgnoreCase(columnType) || "TEXT".equalsIgnoreCase(columnType) || "TINYTEXT".equalsIgnoreCase(columnType); } - + private boolean isAliSQLHeartBeat(String schema, String table) { return "test".equalsIgnoreCase(schema) && "heartbeat".equalsIgnoreCase(table); } @@ -857,4 +879,8 @@ public class LogEventConvert extends AbstractCanalLifeCycle implements BinlogPar this.filterRows = filterRows; } + public void setGtidSet(GTIDSet gtidSet) { + this.gtidSet = gtidSet; + } + } diff --git a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/dbsync/LogEventConvertGTID.java b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/dbsync/LogEventConvertGTID.java deleted file mode 100644 index 337e6f48..00000000 --- a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/dbsync/LogEventConvertGTID.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.alibaba.otter.canal.parse.inbound.mysql.dbsync; - -import com.alibaba.otter.canal.parse.driver.mysql.packets.GTIDSet; -import com.alibaba.otter.canal.parse.exception.CanalParseException; -import com.alibaba.otter.canal.parse.inbound.BinlogParser; -import com.alibaba.otter.canal.protocol.CanalEntry; -import com.google.protobuf.InvalidProtocolBufferException; -import com.taobao.tddl.dbsync.binlog.LogEvent; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Created by hiwjd on 2018/5/2. - * hiwjd0@gmail.com - */ -public class LogEventConvertGTID extends LogEventConvert implements BinlogParser { - - public static final Logger logger = LoggerFactory.getLogger(LogEventConvertGTID.class); - - // latest gtid - private GTIDSet gtidSet; - - public LogEventConvertGTID(GTIDSet gtidSet) { - this.gtidSet = gtidSet; - } - - @Override - public CanalEntry.Entry parse(LogEvent event, boolean isSeek) throws CanalParseException { - CanalEntry.Entry entry = super.parse(event, isSeek); - if (entry == null) { - return null; - } - - if (entry.getEntryType() == CanalEntry.EntryType.GTIDLOG) { - try { - CanalEntry.Pair pair = CanalEntry.Pair.parseFrom(entry.getStoreValue()); - gtidSet.update(pair.getValue()); - - } catch (InvalidProtocolBufferException e) { - logger.error("retrive gtid failed.", e); - throw new CanalParseException("retrive gtid failed.", e); - } - - return null; - } - - if (gtidSet != null) { - String gtid = gtidSet.toString(); - CanalEntry.Header header = entry.getHeader().toBuilder().setGtid(gtid).build(); - entry = entry.toBuilder().setHeader(header).build(); - } - - return entry; - } -} diff --git a/parse/src/test/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlDumpTest.java b/parse/src/test/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlDumpTest.java index a0754635..5ef3278a 100644 --- a/parse/src/test/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlDumpTest.java +++ b/parse/src/test/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlDumpTest.java @@ -27,8 +27,7 @@ public class MysqlDumpTest { @Test public void testSimple() { final MysqlEventParser controller = new MysqlEventParser(); - final EntryPosition startPosition = new EntryPosition("mysql-bin.000001", 104606L); - + final EntryPosition startPosition = new EntryPosition("mysql-bin.000010", 154L); controller.setConnectionCharset(Charset.forName("UTF-8")); controller.setSlaveId(3344L); controller.setDetectingEnable(false); @@ -39,6 +38,7 @@ public class MysqlDumpTest { controller.setTsdbSpringXml("classpath:tsdb/h2-tsdb.xml"); controller.setEventFilter(new AviaterRegexFilter("test\\..*")); controller.setEventBlackFilter(new AviaterRegexFilter("canal_tsdb\\..*")); + controller.setIsGTIDMode(true); controller.setEventSink(new AbstractCanalEventSinkTest>() { public boolean sink(List entrys, InetSocketAddress remoteAddress, String destination) From 57c2cc4c4e81a4014feda7d4a33b7d771d1049e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=83=E9=94=8B?= Date: Mon, 7 May 2018 21:25:29 +0800 Subject: [PATCH 07/14] fixed issue #626 , support mysql xa parse --- .../taobao/tddl/dbsync/binlog/LogDecoder.java | 35 +++++++++- .../taobao/tddl/dbsync/binlog/LogEvent.java | 46 +++++++++---- .../event/FormatDescriptionLogEvent.java | 11 ++++ .../event/TransactionContextLogEvent.java | 16 +++++ .../dbsync/binlog/event/ViewChangeEvent.java | 16 +++++ .../binlog/event/XaPrepareLogEvent.java | 65 +++++++++++++++++++ .../mariadb/StartEncryptionLogEvent.java | 19 ++++++ .../parse/inbound/mysql/MysqlDumpTest.java | 3 +- 8 files changed, 196 insertions(+), 15 deletions(-) create mode 100644 dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/TransactionContextLogEvent.java create mode 100644 dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/ViewChangeEvent.java create mode 100644 dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/XaPrepareLogEvent.java create mode 100644 dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/mariadb/StartEncryptionLogEvent.java diff --git a/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogDecoder.java b/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogDecoder.java index 34cb70c5..e1cb5555 100644 --- a/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogDecoder.java +++ b/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogDecoder.java @@ -30,15 +30,19 @@ import com.taobao.tddl.dbsync.binlog.event.RowsQueryLogEvent; import com.taobao.tddl.dbsync.binlog.event.StartLogEventV3; import com.taobao.tddl.dbsync.binlog.event.StopLogEvent; import com.taobao.tddl.dbsync.binlog.event.TableMapLogEvent; +import com.taobao.tddl.dbsync.binlog.event.TransactionContextLogEvent; import com.taobao.tddl.dbsync.binlog.event.UnknownLogEvent; import com.taobao.tddl.dbsync.binlog.event.UpdateRowsLogEvent; import com.taobao.tddl.dbsync.binlog.event.UserVarLogEvent; +import com.taobao.tddl.dbsync.binlog.event.ViewChangeEvent; import com.taobao.tddl.dbsync.binlog.event.WriteRowsLogEvent; +import com.taobao.tddl.dbsync.binlog.event.XaPrepareLogEvent; import com.taobao.tddl.dbsync.binlog.event.XidLogEvent; import com.taobao.tddl.dbsync.binlog.event.mariadb.AnnotateRowsEvent; import com.taobao.tddl.dbsync.binlog.event.mariadb.BinlogCheckPointLogEvent; import com.taobao.tddl.dbsync.binlog.event.mariadb.MariaGtidListLogEvent; import com.taobao.tddl.dbsync.binlog.event.mariadb.MariaGtidLogEvent; +import com.taobao.tddl.dbsync.binlog.event.mariadb.StartEncryptionLogEvent; /** * Implements a binary-log decoder. @@ -366,6 +370,24 @@ public final class LogDecoder { logPosition.position = header.getLogPos(); return event; } + case LogEvent.TRANSACTION_CONTEXT_EVENT: { + TransactionContextLogEvent event = new TransactionContextLogEvent(header, buffer, descriptionEvent); + /* updating position in context */ + logPosition.position = header.getLogPos(); + return event; + } + case LogEvent.VIEW_CHANGE_EVENT: { + ViewChangeEvent event = new ViewChangeEvent(header, buffer, descriptionEvent); + /* updating position in context */ + logPosition.position = header.getLogPos(); + return event; + } + case LogEvent.XA_PREPARE_LOG_EVENT: { + XaPrepareLogEvent event = new XaPrepareLogEvent(header, buffer, descriptionEvent); + /* updating position in context */ + logPosition.position = header.getLogPos(); + return event; + } case LogEvent.ANNOTATE_ROWS_EVENT: { AnnotateRowsEvent event = new AnnotateRowsEvent(header, buffer, descriptionEvent); /* updating position in context */ @@ -390,6 +412,12 @@ public final class LogDecoder { logPosition.position = header.getLogPos(); return event; } + case LogEvent.START_ENCRYPTION_EVENT: { + StartEncryptionLogEvent event = new StartEncryptionLogEvent(header, buffer, descriptionEvent); + /* updating position in context */ + logPosition.position = header.getLogPos(); + return event; + } default: /* * Create an object of Ignorable_log_event for unrecognized @@ -402,9 +430,10 @@ public final class LogDecoder { logPosition.position = header.getLogPos(); return event; } else { - if (logger.isWarnEnabled()) logger.warn("Skipping unrecognized binlog event " - + LogEvent.getTypeName(header.getType()) + " from: " - + context.getLogPosition()); + if (logger.isWarnEnabled()) { + logger.warn("Skipping unrecognized binlog event " + LogEvent.getTypeName(header.getType()) + + " from: " + context.getLogPosition()); + } } } diff --git a/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogEvent.java b/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogEvent.java index 806b34f7..4904bf6b 100644 --- a/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogEvent.java +++ b/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogEvent.java @@ -161,9 +161,17 @@ public abstract class LogEvent { public static final int PREVIOUS_GTIDS_LOG_EVENT = 35; + /* MySQL 5.7 events */ + public static final int TRANSACTION_CONTEXT_EVENT = 36; + + public static final int VIEW_CHANGE_EVENT = 37; + + /* Prepared XA transaction terminal event similar to Xid */ + public static final int XA_PREPARE_LOG_EVENT = 38; + // mariaDb 5.5.34 /* New MySQL/Sun events are to be added right above this comment */ - public static final int MYSQL_EVENTS_END = 36; + public static final int MYSQL_EVENTS_END = 39; public static final int MARIA_EVENTS_BEGIN = 160; /* New Maria event numbers start from here */ @@ -189,8 +197,10 @@ public abstract class LogEvent { */ public static final int GTID_LIST_EVENT = 163; + public static final int START_ENCRYPTION_EVENT = 164; + /** end marker */ - public static final int ENUM_END_EVENT = 164; + public static final int ENUM_END_EVENT = 165; /** * 1 byte length, 1 byte format Length is total length in bytes, including 2 @@ -351,6 +361,22 @@ public abstract class LogEvent { return "Anonymous_Gtid"; case PREVIOUS_GTIDS_LOG_EVENT: return "Previous_gtids"; + case TRANSACTION_CONTEXT_EVENT: + return "Transaction_context"; + case VIEW_CHANGE_EVENT: + return "View_change"; + case XA_PREPARE_LOG_EVENT: + return "XA_prepare"; + case ANNOTATE_ROWS_EVENT: + return "Annotate_rows"; + case BINLOG_CHECKPOINT_EVENT: + return "Binlog_checkpoint"; + case GTID_EVENT: + return "Gtid"; + case GTID_LIST_EVENT: + return "Gtid_list"; + case START_ENCRYPTION_EVENT: + return "Start_encryption"; default: return "Unknown"; /* impossible */ } @@ -359,7 +385,7 @@ public abstract class LogEvent { protected static final Log logger = LogFactory.getLog(LogEvent.class); protected final LogHeader header; - + /** * mysql半同步semi标识 * @@ -369,18 +395,16 @@ public abstract class LogEvent { * */ protected int semival; - - public int getSemival() { - return semival; - } + return semival; + } - public void setSemival(int semival) { - this.semival = semival; - } + public void setSemival(int semival) { + this.semival = semival; + } - protected LogEvent(LogHeader header){ + protected LogEvent(LogHeader header){ this.header = header; } diff --git a/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/FormatDescriptionLogEvent.java b/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/FormatDescriptionLogEvent.java index 267ee2a4..8492e2d7 100644 --- a/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/FormatDescriptionLogEvent.java +++ b/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/FormatDescriptionLogEvent.java @@ -59,10 +59,15 @@ public final class FormatDescriptionLogEvent extends StartLogEventV3 { public static final int HEARTBEAT_HEADER_LEN = 0; public static final int IGNORABLE_HEADER_LEN = 0; public static final int ROWS_HEADER_LEN_V2 = 10; + public static final int TRANSACTION_CONTEXT_HEADER_LEN = 18; + public static final int VIEW_CHANGE_HEADER_LEN = 52; + public static final int XA_PREPARE_HEADER_LEN = 0; + public static final int ANNOTATE_ROWS_HEADER_LEN = 0; public static final int BINLOG_CHECKPOINT_HEADER_LEN = 4; public static final int GTID_HEADER_LEN = 19; public static final int GTID_LIST_HEADER_LEN = 4; + public static final int START_ENCRYPTION_HEADER_LEN = 0; public static final int POST_HEADER_LENGTH = 11; @@ -202,11 +207,17 @@ public final class FormatDescriptionLogEvent extends StartLogEventV3 { postHeaderLen[GTID_LOG_EVENT - 1] = POST_HEADER_LENGTH; postHeaderLen[ANONYMOUS_GTID_LOG_EVENT - 1] = POST_HEADER_LENGTH; postHeaderLen[PREVIOUS_GTIDS_LOG_EVENT - 1] = IGNORABLE_HEADER_LEN; + + postHeaderLen[TRANSACTION_CONTEXT_EVENT - 1] = TRANSACTION_CONTEXT_HEADER_LEN; + postHeaderLen[VIEW_CHANGE_EVENT - 1] = VIEW_CHANGE_HEADER_LEN; + postHeaderLen[XA_PREPARE_LOG_EVENT - 1] = XA_PREPARE_HEADER_LEN; + // mariadb 10 postHeaderLen[ANNOTATE_ROWS_EVENT - 1] = ANNOTATE_ROWS_HEADER_LEN; postHeaderLen[BINLOG_CHECKPOINT_EVENT - 1] = BINLOG_CHECKPOINT_HEADER_LEN; postHeaderLen[GTID_EVENT - 1] = GTID_HEADER_LEN; postHeaderLen[GTID_LIST_EVENT - 1] = GTID_LIST_HEADER_LEN; + postHeaderLen[START_ENCRYPTION_EVENT - 1] = START_ENCRYPTION_HEADER_LEN; break; case 3: /* 4.0.x x>=2 */ diff --git a/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/TransactionContextLogEvent.java b/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/TransactionContextLogEvent.java new file mode 100644 index 00000000..3cb3f8a0 --- /dev/null +++ b/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/TransactionContextLogEvent.java @@ -0,0 +1,16 @@ +package com.taobao.tddl.dbsync.binlog.event; + +import com.taobao.tddl.dbsync.binlog.LogBuffer; +import com.taobao.tddl.dbsync.binlog.LogEvent; + +/** + * @author agapple 2018年5月7日 下午7:05:39 + * @version 1.0.26 + * @since mysql 5.7 + */ +public class TransactionContextLogEvent extends LogEvent { + + public TransactionContextLogEvent(LogHeader header, LogBuffer buffer, FormatDescriptionLogEvent descriptionEvent){ + super(header); + } +} diff --git a/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/ViewChangeEvent.java b/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/ViewChangeEvent.java new file mode 100644 index 00000000..72a805a7 --- /dev/null +++ b/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/ViewChangeEvent.java @@ -0,0 +1,16 @@ +package com.taobao.tddl.dbsync.binlog.event; + +import com.taobao.tddl.dbsync.binlog.LogBuffer; +import com.taobao.tddl.dbsync.binlog.LogEvent; + +/** + * @author agapple 2018年5月7日 下午7:05:39 + * @version 1.0.26 + * @since mysql 5.7 + */ +public class ViewChangeEvent extends LogEvent { + + public ViewChangeEvent(LogHeader header, LogBuffer buffer, FormatDescriptionLogEvent descriptionEvent){ + super(header); + } +} diff --git a/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/XaPrepareLogEvent.java b/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/XaPrepareLogEvent.java new file mode 100644 index 00000000..63d085d4 --- /dev/null +++ b/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/XaPrepareLogEvent.java @@ -0,0 +1,65 @@ +package com.taobao.tddl.dbsync.binlog.event; + +import com.taobao.tddl.dbsync.binlog.LogBuffer; +import com.taobao.tddl.dbsync.binlog.LogEvent; + +/** + * @author agapple 2018年5月7日 下午7:05:39 + * @version 1.0.26 + * @since mysql 5.7 + */ +public class XaPrepareLogEvent extends LogEvent { + + private boolean onePhase; + private int formatId; + private int gtridLength; + private int bqualLength; + private byte[] data; + + public XaPrepareLogEvent(LogHeader header, LogBuffer buffer, FormatDescriptionLogEvent descriptionEvent){ + super(header); + + final int commonHeaderLen = descriptionEvent.getCommonHeaderLen(); + final int postHeaderLen = descriptionEvent.getPostHeaderLen()[header.getType() - 1]; + + int offset = commonHeaderLen + postHeaderLen; + buffer.position(offset); + + onePhase = (buffer.getInt8() == 0x00 ? false : true); + + formatId = buffer.getInt32(); + gtridLength = buffer.getInt32(); + bqualLength = buffer.getInt32(); + + int MY_XIDDATASIZE = 128; + if (MY_XIDDATASIZE >= gtridLength + bqualLength && gtridLength >= 0 && gtridLength <= 64 && bqualLength >= 0 + && bqualLength <= 64) { + data = buffer.getData(gtridLength + bqualLength); + } else { + formatId = -1; + gtridLength = 0; + bqualLength = 0; + } + } + + public boolean isOnePhase() { + return onePhase; + } + + public int getFormatId() { + return formatId; + } + + public int getGtridLength() { + return gtridLength; + } + + public int getBqualLength() { + return bqualLength; + } + + public byte[] getData() { + return data; + } + +} diff --git a/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/mariadb/StartEncryptionLogEvent.java b/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/mariadb/StartEncryptionLogEvent.java new file mode 100644 index 00000000..8db5361c --- /dev/null +++ b/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/mariadb/StartEncryptionLogEvent.java @@ -0,0 +1,19 @@ +package com.taobao.tddl.dbsync.binlog.event.mariadb; + +import com.taobao.tddl.dbsync.binlog.LogBuffer; +import com.taobao.tddl.dbsync.binlog.LogEvent; +import com.taobao.tddl.dbsync.binlog.event.FormatDescriptionLogEvent; +import com.taobao.tddl.dbsync.binlog.event.LogHeader; + +/** + * mariadb的Start_encryption_log_event + * + * @author agapple 2018年5月7日 下午7:23:02 + * @version 1.0.26 + */ +public class StartEncryptionLogEvent extends LogEvent { + + public StartEncryptionLogEvent(LogHeader header, LogBuffer buffer, FormatDescriptionLogEvent descriptionEvent){ + super(header); + } +} diff --git a/parse/src/test/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlDumpTest.java b/parse/src/test/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlDumpTest.java index 5ef3278a..1cb5d5e0 100644 --- a/parse/src/test/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlDumpTest.java +++ b/parse/src/test/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlDumpTest.java @@ -27,7 +27,8 @@ public class MysqlDumpTest { @Test public void testSimple() { final MysqlEventParser controller = new MysqlEventParser(); - final EntryPosition startPosition = new EntryPosition("mysql-bin.000010", 154L); + final EntryPosition startPosition = new EntryPosition("mysql-bin.000010", 154L, 100L); + startPosition.setGtid("f1ceb61a-a5d5-11e7-bdee-107c3dbcf8a7:1-17"); controller.setConnectionCharset(Charset.forName("UTF-8")); controller.setSlaveId(3344L); controller.setDetectingEnable(false); From 7076e3124d1612f569ebf4500db482d63e51ac61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=83=E9=94=8B?= Date: Thu, 10 May 2018 19:35:17 +0800 Subject: [PATCH 08/14] fixed fastsql --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e9c2623b..8c93c9ee 100644 --- a/pom.xml +++ b/pom.xml @@ -254,7 +254,7 @@ com.alibaba.fastsql fastsql - 2.0.0_preview_186 + 2.0.0_preview_228 com.alibaba From e251de79f3d24d1b21cd0e45a061d899af556bfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=83=E9=94=8B?= Date: Thu, 10 May 2018 19:53:52 +0800 Subject: [PATCH 09/14] fixed issue #610 , utf8mb4 encode support --- .../java/com/taobao/tddl/dbsync/binlog/CharsetConversion.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/CharsetConversion.java b/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/CharsetConversion.java index a4f07ac6..41156123 100644 --- a/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/CharsetConversion.java +++ b/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/CharsetConversion.java @@ -103,8 +103,8 @@ public final class CharsetConversion { putEntry(42, "latin7", "latin7_general_cs", "ISO8859_7"); putEntry(43, "macce", "macce_bin", "MacCentralEurope"); putEntry(44, "cp1250", "cp1250_croatian_ci", "Cp1250"); - putEntry(45, "utf8mb4", "utf8mb4_general_ci", "MacCentralEurope"); - putEntry(46, "utf8mb4", "utf8mb4_bin", "MacCentralEurope"); + putEntry(45, "utf8mb4", "utf8mb4_general_ci", "UTF-8"); + putEntry(46, "utf8mb4", "utf8mb4_bin", "UTF-8"); putEntry(47, "latin1", "latin1_bin", "ISO8859_1"); putEntry(48, "latin1", "latin1_general_ci", "ISO8859_1"); putEntry(49, "latin1", "latin1_general_cs", "ISO8859_1"); From fedc07352b2c7617f65178d152553b83049a93aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=83=E9=94=8B?= Date: Tue, 5 Jun 2018 14:59:33 +0800 Subject: [PATCH 10/14] fixed issue #662 --- .../alibaba/otter/canal/client/impl/SimpleCanalConnector.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/main/java/com/alibaba/otter/canal/client/impl/SimpleCanalConnector.java b/client/src/main/java/com/alibaba/otter/canal/client/impl/SimpleCanalConnector.java index a6eabed1..0b870c17 100644 --- a/client/src/main/java/com/alibaba/otter/canal/client/impl/SimpleCanalConnector.java +++ b/client/src/main/java/com/alibaba/otter/canal/client/impl/SimpleCanalConnector.java @@ -457,8 +457,10 @@ public class SimpleCanalConnector implements CanalConnector { } running = true; - mutex.get();// 阻塞等待 + } else { + // 单机模式直接设置为running + running = true; } } catch (InterruptedException e) { Thread.currentThread().interrupt(); From a2241e25217f7ffdd8824502a47bf3b18623dc2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=83=E9=94=8B?= Date: Tue, 5 Jun 2018 15:41:03 +0800 Subject: [PATCH 11/14] fixed issue #641, support uk parse --- .../otter/canal/parse/inbound/mysql/tsdb/MemoryTableMeta.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/tsdb/MemoryTableMeta.java b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/tsdb/MemoryTableMeta.java index f5621f51..127df1c4 100644 --- a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/tsdb/MemoryTableMeta.java +++ b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/tsdb/MemoryTableMeta.java @@ -16,6 +16,7 @@ import com.alibaba.fastsql.sql.ast.SQLExpr; import com.alibaba.fastsql.sql.ast.SQLStatement; import com.alibaba.fastsql.sql.ast.expr.SQLCharExpr; import com.alibaba.fastsql.sql.ast.expr.SQLIdentifierExpr; +import com.alibaba.fastsql.sql.ast.expr.SQLMethodInvokeExpr; import com.alibaba.fastsql.sql.ast.expr.SQLNullExpr; import com.alibaba.fastsql.sql.ast.expr.SQLPropertyExpr; import com.alibaba.fastsql.sql.ast.statement.SQLColumnConstraint; @@ -243,6 +244,8 @@ public class MemoryTableMeta implements TableMetaTSDB { return DruidDdlParser.unescapeName(((SQLIdentifierExpr) sqlName).getName()); } else if (sqlName instanceof SQLCharExpr) { return ((SQLCharExpr) sqlName).getText(); + } else if (sqlName instanceof SQLMethodInvokeExpr) { + return DruidDdlParser.unescapeName(((SQLMethodInvokeExpr) sqlName).getMethodName()); } else { return sqlName.toString(); } From 5349a5c49b41dab3b4ca35d6291a4e687302e664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=83=E9=94=8B?= Date: Tue, 5 Jun 2018 16:04:07 +0800 Subject: [PATCH 12/14] fixed issue #657, fixed ConcurrentModificationException --- .../java/com/alibaba/otter/canal/meta/MemoryMetaManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/src/main/java/com/alibaba/otter/canal/meta/MemoryMetaManager.java b/meta/src/main/java/com/alibaba/otter/canal/meta/MemoryMetaManager.java index 4d6072d8..d5e040a6 100644 --- a/meta/src/main/java/com/alibaba/otter/canal/meta/MemoryMetaManager.java +++ b/meta/src/main/java/com/alibaba/otter/canal/meta/MemoryMetaManager.java @@ -83,7 +83,8 @@ public class MemoryMetaManager extends AbstractCanalLifeCycle implements CanalMe } public synchronized List listAllSubscribeInfo(String destination) throws CanalMetaManagerException { - return destinations.get(destination); + // fixed issue #657, fixed ConcurrentModificationException + return Lists.newArrayList(destinations.get(destination)); } public Position getCursor(ClientIdentity clientIdentity) throws CanalMetaManagerException { From 1f16310b7d694551f094bed49fb0576effefab3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=83=E9=94=8B?= Date: Tue, 5 Jun 2018 16:05:48 +0800 Subject: [PATCH 13/14] fixed issue #663, ddl parse --- .../com/taobao/tddl/dbsync/binlog/LogEvent.java | 16 ---------------- pom.xml | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogEvent.java b/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogEvent.java index 4904bf6b..8a5957d0 100644 --- a/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogEvent.java +++ b/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/LogEvent.java @@ -361,22 +361,6 @@ public abstract class LogEvent { return "Anonymous_Gtid"; case PREVIOUS_GTIDS_LOG_EVENT: return "Previous_gtids"; - case TRANSACTION_CONTEXT_EVENT: - return "Transaction_context"; - case VIEW_CHANGE_EVENT: - return "View_change"; - case XA_PREPARE_LOG_EVENT: - return "XA_prepare"; - case ANNOTATE_ROWS_EVENT: - return "Annotate_rows"; - case BINLOG_CHECKPOINT_EVENT: - return "Binlog_checkpoint"; - case GTID_EVENT: - return "Gtid"; - case GTID_LIST_EVENT: - return "Gtid_list"; - case START_ENCRYPTION_EVENT: - return "Start_encryption"; default: return "Unknown"; /* impossible */ } diff --git a/pom.xml b/pom.xml index 8c93c9ee..f48a488a 100644 --- a/pom.xml +++ b/pom.xml @@ -254,7 +254,7 @@ com.alibaba.fastsql fastsql - 2.0.0_preview_228 + 2.0.0_preview_366 com.alibaba From b734a32ae6d0c284718b14078a2a555596188513 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=83=E9=94=8B?= Date: Wed, 6 Jun 2018 11:39:59 +0800 Subject: [PATCH 14/14] fixed issue #626, support xa rollback/commit event --- .../example/AbstractCanalClientTest.java | 25 + .../inbound/mysql/dbsync/LogEventConvert.java | 48 +- .../parse/inbound/mysql/MysqlDumpTest.java | 30 +- .../otter/canal/protocol/CanalEntry.java | 8952 +++++++++-------- .../otter/canal/protocol/EntryProtocol.proto | 3 + 5 files changed, 4871 insertions(+), 4187 deletions(-) diff --git a/example/src/main/java/com/alibaba/otter/canal/example/AbstractCanalClientTest.java b/example/src/main/java/com/alibaba/otter/canal/example/AbstractCanalClientTest.java index 3c2cda96..6b30b98b 100644 --- a/example/src/main/java/com/alibaba/otter/canal/example/AbstractCanalClientTest.java +++ b/example/src/main/java/com/alibaba/otter/canal/example/AbstractCanalClientTest.java @@ -18,6 +18,7 @@ import com.alibaba.otter.canal.protocol.CanalEntry.Column; import com.alibaba.otter.canal.protocol.CanalEntry.Entry; import com.alibaba.otter.canal.protocol.CanalEntry.EntryType; import com.alibaba.otter.canal.protocol.CanalEntry.EventType; +import com.alibaba.otter.canal.protocol.CanalEntry.Pair; import com.alibaba.otter.canal.protocol.CanalEntry.RowChange; import com.alibaba.otter.canal.protocol.CanalEntry.RowData; import com.alibaba.otter.canal.protocol.CanalEntry.TransactionBegin; @@ -199,6 +200,7 @@ public class AbstractCanalClientTest { String.valueOf(entry.getHeader().getExecuteTime()), simpleDateFormat.format(date), entry.getHeader().getGtid(), String.valueOf(delayTime) }); logger.info(" BEGIN ----> Thread id: {}", begin.getThreadId()); + printXAInfo(begin.getPropsList()); } else if (entry.getEntryType() == EntryType.TRANSACTIONEND) { TransactionEnd end = null; try { @@ -209,6 +211,7 @@ public class AbstractCanalClientTest { // 打印事务提交信息,事务id logger.info("----------------\n"); logger.info(" END ----> transaction id: {}", end.getTransactionId()); + printXAInfo(end.getPropsList()); logger.info(transaction_format, new Object[] { entry.getHeader().getLogfileName(), String.valueOf(entry.getHeader().getLogfileOffset()), @@ -241,6 +244,7 @@ public class AbstractCanalClientTest { continue; } + printXAInfo(rowChage.getPropsList()); for (RowData rowData : rowChage.getRowDatasList()) { if (eventType == EventType.DELETE) { printColumn(rowData.getBeforeColumnsList()); @@ -267,6 +271,27 @@ public class AbstractCanalClientTest { } } + protected void printXAInfo(List pairs) { + if (pairs == null) { + return; + } + + String xaType = null; + String xaXid = null; + for (Pair pair : pairs) { + String key = pair.getKey(); + if (StringUtils.endsWithIgnoreCase(key, "XA_TYPE")) { + xaType = pair.getValue(); + } else if (StringUtils.endsWithIgnoreCase(key, "XA_XID")) { + xaXid = pair.getValue(); + } + } + + if (xaType != null && xaXid != null) { + logger.info(" ------> " + xaType + " " + xaXid); + } + } + public void setConnector(CanalConnector connector) { this.connector = connector; } diff --git a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/dbsync/LogEventConvert.java b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/dbsync/LogEventConvert.java index 87ec3b59..fe34e199 100644 --- a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/dbsync/LogEventConvert.java +++ b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/dbsync/LogEventConvert.java @@ -67,6 +67,12 @@ import com.taobao.tddl.dbsync.binlog.event.mariadb.AnnotateRowsEvent; */ public class LogEventConvert extends AbstractCanalLifeCycle implements BinlogParser { + public static final String XA_XID = "XA_XID"; + public static final String XA_TYPE = "XA_TYPE"; + public static final String XA_START = "XA START"; + public static final String XA_END = "XA END"; + public static final String XA_COMMIT = "XA COMMIT"; + public static final String XA_ROLLBACK = "XA ROLLBACK"; public static final String ISO_8859_1 = "ISO-8859-1"; public static final String UTF_8 = "UTF-8"; public static final int TINYINT_MAX_VALUE = 256; @@ -174,7 +180,43 @@ public class LogEventConvert extends AbstractCanalLifeCycle implements BinlogPar private Entry parseQueryEvent(QueryLogEvent event, boolean isSeek) { String queryString = event.getQuery(); - if (StringUtils.endsWithIgnoreCase(queryString, BEGIN)) { + if (StringUtils.startsWithIgnoreCase(queryString, XA_START)) { + // xa start use TransactionBegin + TransactionBegin.Builder beginBuilder = TransactionBegin.newBuilder(); + beginBuilder.setThreadId(event.getSessionId()); + beginBuilder.addProps(createSpecialPair(XA_TYPE, XA_START)); + beginBuilder.addProps(createSpecialPair(XA_XID, getXaXid(queryString, XA_START))); + TransactionBegin transactionBegin = beginBuilder.build(); + Header header = createHeader(binlogFileName, event.getHeader(), "", "", null); + return createEntry(header, EntryType.TRANSACTIONBEGIN, transactionBegin.toByteString()); + } else if (StringUtils.startsWithIgnoreCase(queryString, XA_END)) { + // xa start use TransactionEnd + TransactionEnd.Builder endBuilder = TransactionEnd.newBuilder(); + endBuilder.setTransactionId(String.valueOf(0L)); + endBuilder.addProps(createSpecialPair(XA_TYPE, XA_END)); + endBuilder.addProps(createSpecialPair(XA_XID, getXaXid(queryString, XA_END))); + TransactionEnd transactionEnd = endBuilder.build(); + Header header = createHeader(binlogFileName, event.getHeader(), "", "", null); + return createEntry(header, EntryType.TRANSACTIONEND, transactionEnd.toByteString()); + } else if (StringUtils.startsWithIgnoreCase(queryString, XA_COMMIT)) { + // xa commit + Header header = createHeader(binlogFileName, event.getHeader(), "", "", EventType.XACOMMIT); + RowChange.Builder rowChangeBuider = RowChange.newBuilder(); + rowChangeBuider.setSql(queryString); + rowChangeBuider.addProps(createSpecialPair(XA_TYPE, XA_COMMIT)); + rowChangeBuider.addProps(createSpecialPair(XA_XID, getXaXid(queryString, XA_COMMIT))); + rowChangeBuider.setEventType(EventType.XACOMMIT); + return createEntry(header, EntryType.ROWDATA, rowChangeBuider.build().toByteString()); + } else if (StringUtils.startsWithIgnoreCase(queryString, XA_ROLLBACK)) { + // xa rollback + Header header = createHeader(binlogFileName, event.getHeader(), "", "", EventType.XAROLLBACK); + RowChange.Builder rowChangeBuider = RowChange.newBuilder(); + rowChangeBuider.setSql(queryString); + rowChangeBuider.addProps(createSpecialPair(XA_TYPE, XA_ROLLBACK)); + rowChangeBuider.addProps(createSpecialPair(XA_XID, getXaXid(queryString, XA_ROLLBACK))); + rowChangeBuider.setEventType(EventType.XAROLLBACK); + return createEntry(header, EntryType.ROWDATA, rowChangeBuider.build().toByteString()); + } else if (StringUtils.endsWithIgnoreCase(queryString, BEGIN)) { TransactionBegin transactionBegin = createTransactionBegin(event.getSessionId()); Header header = createHeader(binlogFileName, event.getHeader(), "", "", null); return createEntry(header, EntryType.TRANSACTIONBEGIN, transactionBegin.toByteString()); @@ -237,6 +279,10 @@ public class LogEventConvert extends AbstractCanalLifeCycle implements BinlogPar } } + private String getXaXid(String queryString, String type) { + return StringUtils.substringAfter(queryString, type); + } + private boolean processFilter(String queryString, DdlResult result) { String schemaName = result.getSchemaName(); String tableName = result.getTableName(); diff --git a/parse/src/test/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlDumpTest.java b/parse/src/test/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlDumpTest.java index 1cb5d5e0..6849c5b3 100644 --- a/parse/src/test/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlDumpTest.java +++ b/parse/src/test/java/com/alibaba/otter/canal/parse/inbound/mysql/MysqlDumpTest.java @@ -4,6 +4,7 @@ import java.net.InetSocketAddress; import java.nio.charset.Charset; import java.util.List; +import org.apache.commons.lang.StringUtils; import org.junit.Assert; import org.junit.Test; @@ -16,6 +17,7 @@ import com.alibaba.otter.canal.protocol.CanalEntry.Column; import com.alibaba.otter.canal.protocol.CanalEntry.Entry; import com.alibaba.otter.canal.protocol.CanalEntry.EntryType; import com.alibaba.otter.canal.protocol.CanalEntry.EventType; +import com.alibaba.otter.canal.protocol.CanalEntry.Pair; import com.alibaba.otter.canal.protocol.CanalEntry.RowChange; import com.alibaba.otter.canal.protocol.CanalEntry.RowData; import com.alibaba.otter.canal.protocol.position.EntryPosition; @@ -27,8 +29,8 @@ public class MysqlDumpTest { @Test public void testSimple() { final MysqlEventParser controller = new MysqlEventParser(); - final EntryPosition startPosition = new EntryPosition("mysql-bin.000010", 154L, 100L); - startPosition.setGtid("f1ceb61a-a5d5-11e7-bdee-107c3dbcf8a7:1-17"); + final EntryPosition startPosition = new EntryPosition("mysql-bin.000012", 34051L, 100L); + // startPosition.setGtid("f1ceb61a-a5d5-11e7-bdee-107c3dbcf8a7:1-17"); controller.setConnectionCharset(Charset.forName("UTF-8")); controller.setSlaveId(3344L); controller.setDetectingEnable(false); @@ -39,7 +41,7 @@ public class MysqlDumpTest { controller.setTsdbSpringXml("classpath:tsdb/h2-tsdb.xml"); controller.setEventFilter(new AviaterRegexFilter("test\\..*")); controller.setEventBlackFilter(new AviaterRegexFilter("canal_tsdb\\..*")); - controller.setIsGTIDMode(true); + controller.setIsGTIDMode(false); controller.setEventSink(new AbstractCanalEventSinkTest>() { public boolean sink(List entrys, InetSocketAddress remoteAddress, String destination) @@ -73,6 +75,7 @@ public class MysqlDumpTest { System.out.println(" sql ----> " + rowChage.getSql()); } + printXAInfo(rowChage.getPropsList()); for (RowData rowData : rowChage.getRowDatasList()) { if (eventType == EventType.DELETE) { print(rowData.getBeforeColumnsList()); @@ -119,4 +122,25 @@ public class MysqlDumpTest { System.out.println(column.getName() + " : " + column.getValue() + " update=" + column.getUpdated()); } } + + private void printXAInfo(List pairs) { + if (pairs == null) { + return; + } + + String xaType = null; + String xaXid = null; + for (Pair pair : pairs) { + String key = pair.getKey(); + if (StringUtils.endsWithIgnoreCase(key, "XA_TYPE")) { + xaType = pair.getValue(); + } else if (StringUtils.endsWithIgnoreCase(key, "XA_XID")) { + xaXid = pair.getValue(); + } + } + + if (xaType != null && xaXid != null) { + System.out.println(" ------> " + xaType + " " + xaXid); + } + } } diff --git a/protocol/src/main/java/com/alibaba/otter/canal/protocol/CanalEntry.java b/protocol/src/main/java/com/alibaba/otter/canal/protocol/CanalEntry.java index eb911fb5..d802f54e 100644 --- a/protocol/src/main/java/com/alibaba/otter/canal/protocol/CanalEntry.java +++ b/protocol/src/main/java/com/alibaba/otter/canal/protocol/CanalEntry.java @@ -8,13 +8,14 @@ public final class CanalEntry { public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { } - /** - * Protobuf enum {@code com.alibaba.otter.canal.protocol.EntryType} - * - *
-   **打散后的事件类型,主要用于标识事务的开始,变更数据,结束*
-   * 
- */ + + /** + * Protobuf enum {@code com.alibaba.otter.canal.protocol.EntryType} + * + *
+     * *打散后的事件类型,主要用于标识事务的开始,变更数据,结束*
+     * 
+ */ public enum EntryType implements com.google.protobuf.ProtocolMessageEnum { /** @@ -29,13 +30,13 @@ public final class CanalEntry { * TRANSACTIONEND = 3; */ TRANSACTIONEND(2, 3), - /** - * HEARTBEAT = 4; - * - *
-     ** 心跳类型,内部使用,外部暂不可见,可忽略 *
-     * 
- */ + /** + * HEARTBEAT = 4; + * + *
+         * * 心跳类型,内部使用,外部暂不可见,可忽略 *
+         * 
+ */ HEARTBEAT(3, 4), /** * GTIDLOG = 5; @@ -55,13 +56,13 @@ public final class CanalEntry { * TRANSACTIONEND = 3; */ public static final int TRANSACTIONEND_VALUE = 3; - /** - * HEARTBEAT = 4; - * - *
-     ** 心跳类型,内部使用,外部暂不可见,可忽略 *
-     * 
- */ + /** + * HEARTBEAT = 4; + * + *
+         * * 心跳类型,内部使用,外部暂不可见,可忽略 *
+         * 
+ */ public static final int HEARTBEAT_VALUE = 4; /** * GTIDLOG = 5; @@ -129,13 +130,13 @@ public final class CanalEntry { // @@protoc_insertion_point(enum_scope:com.alibaba.otter.canal.protocol.EntryType) } - /** - * Protobuf enum {@code com.alibaba.otter.canal.protocol.EventType} - * - *
-   ** 事件类型 *
-   * 
- */ + /** + * Protobuf enum {@code com.alibaba.otter.canal.protocol.EventType} + * + *
+     * * 事件类型 *
+     * 
+ */ public enum EventType implements com.google.protobuf.ProtocolMessageEnum { /** @@ -190,6 +191,26 @@ public final class CanalEntry { * GTID = 12; */ GTID(11, 12), + /** + * XASTART = 13; + * + *
+     ** XA *
+     * 
+ */ + XASTART(12, 13), + /** + * XAEND = 14; + */ + XAEND(13, 14), + /** + * XACOMMIT = 15; + */ + XACOMMIT(14, 15), + /** + * XAROLLBACK = 16; + */ + XAROLLBACK(15, 16), ; /** @@ -244,6 +265,26 @@ public final class CanalEntry { * GTID = 12; */ public static final int GTID_VALUE = 12; + /** + * XASTART = 13; + * + *
+     ** XA *
+     * 
+ */ + public static final int XASTART_VALUE = 13; + /** + * XAEND = 14; + */ + public static final int XAEND_VALUE = 14; + /** + * XACOMMIT = 15; + */ + public static final int XACOMMIT_VALUE = 15; + /** + * XAROLLBACK = 16; + */ + public static final int XAROLLBACK_VALUE = 16; public final int getNumber() { return value; } @@ -262,6 +303,10 @@ public final class CanalEntry { case 10: return CINDEX; case 11: return DINDEX; case 12: return GTID; + case 13: return XASTART; + case 14: return XAEND; + case 15: return XACOMMIT; + case 16: return XAROLLBACK; default: return null; } } @@ -313,13 +358,13 @@ public final class CanalEntry { // @@protoc_insertion_point(enum_scope:com.alibaba.otter.canal.protocol.EventType) } - /** - * Protobuf enum {@code com.alibaba.otter.canal.protocol.Type} - * - *
-   **数据库类型*
-   * 
- */ + /** + * Protobuf enum {@code com.alibaba.otter.canal.protocol.Type} + * + *
+     * *数据库类型*
+     * 
+ */ public enum Type implements com.google.protobuf.ProtocolMessageEnum { /** @@ -412,75 +457,80 @@ public final class CanalEntry { // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Entry) com.google.protobuf.MessageOrBuilder { - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-     **协议头部信息*
-     * 
- */ + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+         * *协议头部信息*
+         * 
+ */ boolean hasHeader(); - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-     **协议头部信息*
-     * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+         * *协议头部信息*
+         * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.Header getHeader(); - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-     **协议头部信息*
-     * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+         * *协议头部信息*
+         * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder getHeaderOrBuilder(); - /** - * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; - * - *
-     **打散后的事件类型*
-     * 
- */ + /** + * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + * + *
+         * *打散后的事件类型*
+         * 
+ */ boolean hasEntryType(); - /** - * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; - * - *
-     **打散后的事件类型*
-     * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + * + *
+         * *打散后的事件类型*
+         * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.EntryType getEntryType(); - /** - * optional bytes storeValue = 3; - * - *
-     **传输的二进制数组*
-     * 
- */ + /** + * optional bytes storeValue = 3; + * + *
+         * *传输的二进制数组*
+         * 
+ */ boolean hasStoreValue(); - /** - * optional bytes storeValue = 3; - * - *
-     **传输的二进制数组*
-     * 
- */ + + /** + * optional bytes storeValue = 3; + * + *
+         * *传输的二进制数组*
+         * 
+ */ com.google.protobuf.ByteString getStoreValue(); } - /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.Entry} - * - *
-   ****************************************************************
-   * message model
-   *如果要在Enum中新增类型,确保以前的类型的下标值不变.
-   ***************************************************************
-   * 
- */ + + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Entry} + * + *
+     ****************************************************************
+     *  message model
+     * 如果要在Enum中新增类型,确保以前的类型的下标值不变.
+     ***************************************************************
+     * 
+ */ public static final class Entry extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Entry) @@ -601,79 +651,86 @@ public final class CanalEntry { private int bitField0_; public static final int HEADER_FIELD_NUMBER = 1; private com.alibaba.otter.canal.protocol.CanalEntry.Header header_; - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-     **协议头部信息*
-     * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+         * *协议头部信息*
+         * 
+ */ public boolean hasHeader() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-     **协议头部信息*
-     * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+         * *协议头部信息*
+         * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Header getHeader() { return header_; } - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-     **协议头部信息*
-     * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+         * *协议头部信息*
+         * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder getHeaderOrBuilder() { return header_; } public static final int ENTRYTYPE_FIELD_NUMBER = 2; private com.alibaba.otter.canal.protocol.CanalEntry.EntryType entryType_; - /** - * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; - * - *
-     **打散后的事件类型*
-     * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + * + *
+         * *打散后的事件类型*
+         * 
+ */ public boolean hasEntryType() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; - * - *
-     **打散后的事件类型*
-     * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + * + *
+         * *打散后的事件类型*
+         * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.EntryType getEntryType() { return entryType_; } public static final int STOREVALUE_FIELD_NUMBER = 3; private com.google.protobuf.ByteString storeValue_; - /** - * optional bytes storeValue = 3; - * - *
-     **传输的二进制数组*
-     * 
- */ + + /** + * optional bytes storeValue = 3; + * + *
+         * *传输的二进制数组*
+         * 
+ */ public boolean hasStoreValue() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional bytes storeValue = 3; - * - *
-     **传输的二进制数组*
-     * 
- */ + + /** + * optional bytes storeValue = 3; + * + *
+         * *传输的二进制数组*
+         * 
+ */ public com.google.protobuf.ByteString getStoreValue() { return storeValue_; } @@ -804,16 +861,17 @@ public final class CanalEntry { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.Entry} - * - *
-     ****************************************************************
-     * message model
-     *如果要在Enum中新增类型,确保以前的类型的下标值不变.
-     ***************************************************************
-     * 
- */ + + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Entry} + * + *
+         ****************************************************************
+         *  message model
+         * 如果要在Enum中新增类型,确保以前的类型的下标值不变.
+         ***************************************************************
+         * 
+ */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Entry) @@ -960,23 +1018,25 @@ public final class CanalEntry { private com.alibaba.otter.canal.protocol.CanalEntry.Header header_ = com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.alibaba.otter.canal.protocol.CanalEntry.Header, com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder, com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder> headerBuilder_; - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-       **协议头部信息*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+             * *协议头部信息*
+             * 
+ */ public boolean hasHeader() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-       **协议头部信息*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+             * *协议头部信息*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Header getHeader() { if (headerBuilder_ == null) { return header_; @@ -984,13 +1044,14 @@ public final class CanalEntry { return headerBuilder_.getMessage(); } } - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-       **协议头部信息*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+             * *协议头部信息*
+             * 
+ */ public Builder setHeader(com.alibaba.otter.canal.protocol.CanalEntry.Header value) { if (headerBuilder_ == null) { if (value == null) { @@ -1004,13 +1065,14 @@ public final class CanalEntry { bitField0_ |= 0x00000001; return this; } - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-       **协议头部信息*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+             * *协议头部信息*
+             * 
+ */ public Builder setHeader( com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder builderForValue) { if (headerBuilder_ == null) { @@ -1022,13 +1084,14 @@ public final class CanalEntry { bitField0_ |= 0x00000001; return this; } - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-       **协议头部信息*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+             * *协议头部信息*
+             * 
+ */ public Builder mergeHeader(com.alibaba.otter.canal.protocol.CanalEntry.Header value) { if (headerBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && @@ -1045,13 +1108,14 @@ public final class CanalEntry { bitField0_ |= 0x00000001; return this; } - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-       **协议头部信息*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+             * *协议头部信息*
+             * 
+ */ public Builder clearHeader() { if (headerBuilder_ == null) { header_ = com.alibaba.otter.canal.protocol.CanalEntry.Header.getDefaultInstance(); @@ -1062,25 +1126,27 @@ public final class CanalEntry { bitField0_ = (bitField0_ & ~0x00000001); return this; } - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-       **协议头部信息*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+             * *协议头部信息*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder getHeaderBuilder() { bitField0_ |= 0x00000001; onChanged(); return getHeaderFieldBuilder().getBuilder(); } - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-       **协议头部信息*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+             * *协议头部信息*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder getHeaderOrBuilder() { if (headerBuilder_ != null) { return headerBuilder_.getMessageOrBuilder(); @@ -1088,13 +1154,14 @@ public final class CanalEntry { return header_; } } - /** - * optional .com.alibaba.otter.canal.protocol.Header header = 1; - * - *
-       **协议头部信息*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.Header header = 1; + * + *
+             * *协议头部信息*
+             * 
+ */ private com.google.protobuf.SingleFieldBuilder< com.alibaba.otter.canal.protocol.CanalEntry.Header, com.alibaba.otter.canal.protocol.CanalEntry.Header.Builder, com.alibaba.otter.canal.protocol.CanalEntry.HeaderOrBuilder> getHeaderFieldBuilder() { @@ -1110,33 +1177,36 @@ public final class CanalEntry { } private com.alibaba.otter.canal.protocol.CanalEntry.EntryType entryType_ = com.alibaba.otter.canal.protocol.CanalEntry.EntryType.ROWDATA; - /** - * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; - * - *
-       **打散后的事件类型*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + * + *
+             * *打散后的事件类型*
+             * 
+ */ public boolean hasEntryType() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; - * - *
-       **打散后的事件类型*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + * + *
+             * *打散后的事件类型*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.EntryType getEntryType() { return entryType_; } - /** - * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; - * - *
-       **打散后的事件类型*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + * + *
+             * *打散后的事件类型*
+             * 
+ */ public Builder setEntryType(com.alibaba.otter.canal.protocol.CanalEntry.EntryType value) { if (value == null) { throw new NullPointerException(); @@ -1146,13 +1216,14 @@ public final class CanalEntry { onChanged(); return this; } - /** - * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; - * - *
-       **打散后的事件类型*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA]; + * + *
+             * *打散后的事件类型*
+             * 
+ */ public Builder clearEntryType() { bitField0_ = (bitField0_ & ~0x00000002); entryType_ = com.alibaba.otter.canal.protocol.CanalEntry.EntryType.ROWDATA; @@ -1161,33 +1232,36 @@ public final class CanalEntry { } private com.google.protobuf.ByteString storeValue_ = com.google.protobuf.ByteString.EMPTY; - /** - * optional bytes storeValue = 3; - * - *
-       **传输的二进制数组*
-       * 
- */ + + /** + * optional bytes storeValue = 3; + * + *
+             * *传输的二进制数组*
+             * 
+ */ public boolean hasStoreValue() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional bytes storeValue = 3; - * - *
-       **传输的二进制数组*
-       * 
- */ + + /** + * optional bytes storeValue = 3; + * + *
+             * *传输的二进制数组*
+             * 
+ */ public com.google.protobuf.ByteString getStoreValue() { return storeValue_; } - /** - * optional bytes storeValue = 3; - * - *
-       **传输的二进制数组*
-       * 
- */ + + /** + * optional bytes storeValue = 3; + * + *
+             * *传输的二进制数组*
+             * 
+ */ public Builder setStoreValue(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); @@ -1197,13 +1271,14 @@ public final class CanalEntry { onChanged(); return this; } - /** - * optional bytes storeValue = 3; - * - *
-       **传输的二进制数组*
-       * 
- */ + + /** + * optional bytes storeValue = 3; + * + *
+             * *传输的二进制数组*
+             * 
+ */ public Builder clearStoreValue() { bitField0_ = (bitField0_ & ~0x00000004); storeValue_ = getDefaultInstance().getStoreValue(); @@ -1226,296 +1301,317 @@ public final class CanalEntry { // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Header) com.google.protobuf.MessageOrBuilder { - /** - * optional int32 version = 1 [default = 1]; - * - *
-     **协议的版本号*
-     * 
- */ + /** + * optional int32 version = 1 [default = 1]; + * + *
+         * *协议的版本号*
+         * 
+ */ boolean hasVersion(); - /** - * optional int32 version = 1 [default = 1]; - * - *
-     **协议的版本号*
-     * 
- */ + + /** + * optional int32 version = 1 [default = 1]; + * + *
+         * *协议的版本号*
+         * 
+ */ int getVersion(); - /** - * optional string logfileName = 2; - * - *
-     **binlog/redolog 文件名*
-     * 
- */ + /** + * optional string logfileName = 2; + * + *
+         * *binlog/redolog 文件名*
+         * 
+ */ boolean hasLogfileName(); - /** - * optional string logfileName = 2; - * - *
-     **binlog/redolog 文件名*
-     * 
- */ + + /** + * optional string logfileName = 2; + * + *
+         * *binlog/redolog 文件名*
+         * 
+ */ java.lang.String getLogfileName(); - /** - * optional string logfileName = 2; - * - *
-     **binlog/redolog 文件名*
-     * 
- */ + + /** + * optional string logfileName = 2; + * + *
+         * *binlog/redolog 文件名*
+         * 
+ */ com.google.protobuf.ByteString getLogfileNameBytes(); - /** - * optional int64 logfileOffset = 3; - * - *
-     **binlog/redolog 文件的偏移位置*
-     * 
- */ + /** + * optional int64 logfileOffset = 3; + * + *
+         * *binlog/redolog 文件的偏移位置*
+         * 
+ */ boolean hasLogfileOffset(); - /** - * optional int64 logfileOffset = 3; - * - *
-     **binlog/redolog 文件的偏移位置*
-     * 
- */ + + /** + * optional int64 logfileOffset = 3; + * + *
+         * *binlog/redolog 文件的偏移位置*
+         * 
+ */ long getLogfileOffset(); - /** - * optional int64 serverId = 4; - * - *
-     **服务端serverId*
-     * 
- */ + /** + * optional int64 serverId = 4; + * + *
+         * *服务端serverId*
+         * 
+ */ boolean hasServerId(); - /** - * optional int64 serverId = 4; - * - *
-     **服务端serverId*
-     * 
- */ + + /** + * optional int64 serverId = 4; + * + *
+         * *服务端serverId*
+         * 
+ */ long getServerId(); - /** - * optional string serverenCode = 5; - * - *
-     ** 变更数据的编码 *
-     * 
- */ + /** + * optional string serverenCode = 5; + * + *
+         * * 变更数据的编码 *
+         * 
+ */ boolean hasServerenCode(); - /** - * optional string serverenCode = 5; - * - *
-     ** 变更数据的编码 *
-     * 
- */ + + /** + * optional string serverenCode = 5; + * + *
+         * * 变更数据的编码 *
+         * 
+ */ java.lang.String getServerenCode(); - /** - * optional string serverenCode = 5; - * - *
-     ** 变更数据的编码 *
-     * 
- */ + + /** + * optional string serverenCode = 5; + * + *
+         * * 变更数据的编码 *
+         * 
+ */ com.google.protobuf.ByteString getServerenCodeBytes(); - /** - * optional int64 executeTime = 6; - * - *
-     **变更数据的执行时间 *
-     * 
- */ + /** + * optional int64 executeTime = 6; + * + *
+         * *变更数据的执行时间 *
+         * 
+ */ boolean hasExecuteTime(); - /** - * optional int64 executeTime = 6; - * - *
-     **变更数据的执行时间 *
-     * 
- */ + + /** + * optional int64 executeTime = 6; + * + *
+         * *变更数据的执行时间 *
+         * 
+ */ long getExecuteTime(); - /** - * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; - * - *
-     ** 变更数据的来源*
-     * 
- */ + /** + * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + * + *
+         * * 变更数据的来源*
+         * 
+ */ boolean hasSourceType(); - /** - * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; - * - *
-     ** 变更数据的来源*
-     * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + * + *
+         * * 变更数据的来源*
+         * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.Type getSourceType(); - /** - * optional string schemaName = 8; - * - *
-     ** 变更数据的schemaname*
-     * 
- */ + /** + * optional string schemaName = 8; + * + *
+         * * 变更数据的schemaname*
+         * 
+ */ boolean hasSchemaName(); - /** - * optional string schemaName = 8; - * - *
-     ** 变更数据的schemaname*
-     * 
- */ + + /** + * optional string schemaName = 8; + * + *
+         * * 变更数据的schemaname*
+         * 
+ */ java.lang.String getSchemaName(); - /** - * optional string schemaName = 8; - * - *
-     ** 变更数据的schemaname*
-     * 
- */ + + /** + * optional string schemaName = 8; + * + *
+         * * 变更数据的schemaname*
+         * 
+ */ com.google.protobuf.ByteString getSchemaNameBytes(); - /** - * optional string tableName = 9; - * - *
-     **变更数据的tablename*
-     * 
- */ + /** + * optional string tableName = 9; + * + *
+         * *变更数据的tablename*
+         * 
+ */ boolean hasTableName(); - /** - * optional string tableName = 9; - * - *
-     **变更数据的tablename*
-     * 
- */ + + /** + * optional string tableName = 9; + * + *
+         * *变更数据的tablename*
+         * 
+ */ java.lang.String getTableName(); - /** - * optional string tableName = 9; - * - *
-     **变更数据的tablename*
-     * 
- */ + + /** + * optional string tableName = 9; + * + *
+         * *变更数据的tablename*
+         * 
+ */ com.google.protobuf.ByteString getTableNameBytes(); - /** - * optional int64 eventLength = 10; - * - *
-     **每个event的长度*
-     * 
- */ + /** + * optional int64 eventLength = 10; + * + *
+         * *每个event的长度*
+         * 
+ */ boolean hasEventLength(); - /** - * optional int64 eventLength = 10; - * - *
-     **每个event的长度*
-     * 
- */ + + /** + * optional int64 eventLength = 10; + * + *
+         * *每个event的长度*
+         * 
+ */ long getEventLength(); - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; - * - *
-     **数据变更类型*
-     * 
- */ + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + * + *
+         * *数据变更类型*
+         * 
+ */ boolean hasEventType(); - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; - * - *
-     **数据变更类型*
-     * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + * + *
+         * *数据变更类型*
+         * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType(); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-     **预留扩展*
-     * 
- */ + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+         * *预留扩展*
+         * 
+ */ java.util.List getPropsList(); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+         * *预留扩展*
+         * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+         * *预留扩展*
+         * 
+ */ int getPropsCount(); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+         * *预留扩展*
+         * 
+ */ java.util.List getPropsOrBuilderList(); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+         * *预留扩展*
+         * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index); - /** - * optional string gtid = 13; - * - *
-     **当前事务的gitd*
-     * 
- */ + /** + * optional string gtid = 13; + * + *
+         * *当前事务的gitd*
+         * 
+ */ boolean hasGtid(); - /** - * optional string gtid = 13; - * - *
-     **当前事务的gitd*
-     * 
- */ + + /** + * optional string gtid = 13; + * + *
+         * *当前事务的gitd*
+         * 
+ */ java.lang.String getGtid(); - /** - * optional string gtid = 13; - * - *
-     **当前事务的gitd*
-     * 
- */ + + /** + * optional string gtid = 13; + * + *
+         * *当前事务的gitd*
+         * 
+ */ com.google.protobuf.ByteString getGtidBytes(); } @@ -1705,46 +1801,50 @@ public final class CanalEntry { private int bitField0_; public static final int VERSION_FIELD_NUMBER = 1; private int version_; - /** - * optional int32 version = 1 [default = 1]; - * - *
-     **协议的版本号*
-     * 
- */ + + /** + * optional int32 version = 1 [default = 1]; + * + *
+         * *协议的版本号*
+         * 
+ */ public boolean hasVersion() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int32 version = 1 [default = 1]; - * - *
-     **协议的版本号*
-     * 
- */ + + /** + * optional int32 version = 1 [default = 1]; + * + *
+         * *协议的版本号*
+         * 
+ */ public int getVersion() { return version_; } public static final int LOGFILENAME_FIELD_NUMBER = 2; private java.lang.Object logfileName_; - /** - * optional string logfileName = 2; - * - *
-     **binlog/redolog 文件名*
-     * 
- */ + + /** + * optional string logfileName = 2; + * + *
+         * *binlog/redolog 文件名*
+         * 
+ */ public boolean hasLogfileName() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional string logfileName = 2; - * - *
-     **binlog/redolog 文件名*
-     * 
- */ + + /** + * optional string logfileName = 2; + * + *
+         * *binlog/redolog 文件名*
+         * 
+ */ public java.lang.String getLogfileName() { java.lang.Object ref = logfileName_; if (ref instanceof java.lang.String) { @@ -1759,13 +1859,14 @@ public final class CanalEntry { return s; } } - /** - * optional string logfileName = 2; - * - *
-     **binlog/redolog 文件名*
-     * 
- */ + + /** + * optional string logfileName = 2; + * + *
+         * *binlog/redolog 文件名*
+         * 
+ */ public com.google.protobuf.ByteString getLogfileNameBytes() { java.lang.Object ref = logfileName_; @@ -1782,69 +1883,75 @@ public final class CanalEntry { public static final int LOGFILEOFFSET_FIELD_NUMBER = 3; private long logfileOffset_; - /** - * optional int64 logfileOffset = 3; - * - *
-     **binlog/redolog 文件的偏移位置*
-     * 
- */ + + /** + * optional int64 logfileOffset = 3; + * + *
+         * *binlog/redolog 文件的偏移位置*
+         * 
+ */ public boolean hasLogfileOffset() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional int64 logfileOffset = 3; - * - *
-     **binlog/redolog 文件的偏移位置*
-     * 
- */ + + /** + * optional int64 logfileOffset = 3; + * + *
+         * *binlog/redolog 文件的偏移位置*
+         * 
+ */ public long getLogfileOffset() { return logfileOffset_; } public static final int SERVERID_FIELD_NUMBER = 4; private long serverId_; - /** - * optional int64 serverId = 4; - * - *
-     **服务端serverId*
-     * 
- */ + + /** + * optional int64 serverId = 4; + * + *
+         * *服务端serverId*
+         * 
+ */ public boolean hasServerId() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional int64 serverId = 4; - * - *
-     **服务端serverId*
-     * 
- */ + + /** + * optional int64 serverId = 4; + * + *
+         * *服务端serverId*
+         * 
+ */ public long getServerId() { return serverId_; } public static final int SERVERENCODE_FIELD_NUMBER = 5; private java.lang.Object serverenCode_; - /** - * optional string serverenCode = 5; - * - *
-     ** 变更数据的编码 *
-     * 
- */ + + /** + * optional string serverenCode = 5; + * + *
+         * * 变更数据的编码 *
+         * 
+ */ public boolean hasServerenCode() { return ((bitField0_ & 0x00000010) == 0x00000010); } - /** - * optional string serverenCode = 5; - * - *
-     ** 变更数据的编码 *
-     * 
- */ + + /** + * optional string serverenCode = 5; + * + *
+         * * 变更数据的编码 *
+         * 
+ */ public java.lang.String getServerenCode() { java.lang.Object ref = serverenCode_; if (ref instanceof java.lang.String) { @@ -1859,13 +1966,14 @@ public final class CanalEntry { return s; } } - /** - * optional string serverenCode = 5; - * - *
-     ** 变更数据的编码 *
-     * 
- */ + + /** + * optional string serverenCode = 5; + * + *
+         * * 变更数据的编码 *
+         * 
+ */ public com.google.protobuf.ByteString getServerenCodeBytes() { java.lang.Object ref = serverenCode_; @@ -1882,69 +1990,75 @@ public final class CanalEntry { public static final int EXECUTETIME_FIELD_NUMBER = 6; private long executeTime_; - /** - * optional int64 executeTime = 6; - * - *
-     **变更数据的执行时间 *
-     * 
- */ + + /** + * optional int64 executeTime = 6; + * + *
+         * *变更数据的执行时间 *
+         * 
+ */ public boolean hasExecuteTime() { return ((bitField0_ & 0x00000020) == 0x00000020); } - /** - * optional int64 executeTime = 6; - * - *
-     **变更数据的执行时间 *
-     * 
- */ + + /** + * optional int64 executeTime = 6; + * + *
+         * *变更数据的执行时间 *
+         * 
+ */ public long getExecuteTime() { return executeTime_; } public static final int SOURCETYPE_FIELD_NUMBER = 7; private com.alibaba.otter.canal.protocol.CanalEntry.Type sourceType_; - /** - * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; - * - *
-     ** 变更数据的来源*
-     * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + * + *
+         * * 变更数据的来源*
+         * 
+ */ public boolean hasSourceType() { return ((bitField0_ & 0x00000040) == 0x00000040); } - /** - * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; - * - *
-     ** 变更数据的来源*
-     * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + * + *
+         * * 变更数据的来源*
+         * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Type getSourceType() { return sourceType_; } public static final int SCHEMANAME_FIELD_NUMBER = 8; private java.lang.Object schemaName_; - /** - * optional string schemaName = 8; - * - *
-     ** 变更数据的schemaname*
-     * 
- */ + + /** + * optional string schemaName = 8; + * + *
+         * * 变更数据的schemaname*
+         * 
+ */ public boolean hasSchemaName() { return ((bitField0_ & 0x00000080) == 0x00000080); } - /** - * optional string schemaName = 8; - * - *
-     ** 变更数据的schemaname*
-     * 
- */ + + /** + * optional string schemaName = 8; + * + *
+         * * 变更数据的schemaname*
+         * 
+ */ public java.lang.String getSchemaName() { java.lang.Object ref = schemaName_; if (ref instanceof java.lang.String) { @@ -1959,13 +2073,14 @@ public final class CanalEntry { return s; } } - /** - * optional string schemaName = 8; - * - *
-     ** 变更数据的schemaname*
-     * 
- */ + + /** + * optional string schemaName = 8; + * + *
+         * * 变更数据的schemaname*
+         * 
+ */ public com.google.protobuf.ByteString getSchemaNameBytes() { java.lang.Object ref = schemaName_; @@ -1982,23 +2097,25 @@ public final class CanalEntry { public static final int TABLENAME_FIELD_NUMBER = 9; private java.lang.Object tableName_; - /** - * optional string tableName = 9; - * - *
-     **变更数据的tablename*
-     * 
- */ + + /** + * optional string tableName = 9; + * + *
+         * *变更数据的tablename*
+         * 
+ */ public boolean hasTableName() { return ((bitField0_ & 0x00000100) == 0x00000100); } - /** - * optional string tableName = 9; - * - *
-     **变更数据的tablename*
-     * 
- */ + + /** + * optional string tableName = 9; + * + *
+         * *变更数据的tablename*
+         * 
+ */ public java.lang.String getTableName() { java.lang.Object ref = tableName_; if (ref instanceof java.lang.String) { @@ -2013,13 +2130,14 @@ public final class CanalEntry { return s; } } - /** - * optional string tableName = 9; - * - *
-     **变更数据的tablename*
-     * 
- */ + + /** + * optional string tableName = 9; + * + *
+         * *变更数据的tablename*
+         * 
+ */ public com.google.protobuf.ByteString getTableNameBytes() { java.lang.Object ref = tableName_; @@ -2036,100 +2154,109 @@ public final class CanalEntry { public static final int EVENTLENGTH_FIELD_NUMBER = 10; private long eventLength_; - /** - * optional int64 eventLength = 10; - * - *
-     **每个event的长度*
-     * 
- */ + + /** + * optional int64 eventLength = 10; + * + *
+         * *每个event的长度*
+         * 
+ */ public boolean hasEventLength() { return ((bitField0_ & 0x00000200) == 0x00000200); } - /** - * optional int64 eventLength = 10; - * - *
-     **每个event的长度*
-     * 
- */ + + /** + * optional int64 eventLength = 10; + * + *
+         * *每个event的长度*
+         * 
+ */ public long getEventLength() { return eventLength_; } public static final int EVENTTYPE_FIELD_NUMBER = 11; private com.alibaba.otter.canal.protocol.CanalEntry.EventType eventType_; - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; - * - *
-     **数据变更类型*
-     * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + * + *
+         * *数据变更类型*
+         * 
+ */ public boolean hasEventType() { return ((bitField0_ & 0x00000400) == 0x00000400); } - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; - * - *
-     **数据变更类型*
-     * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + * + *
+         * *数据变更类型*
+         * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType() { return eventType_; } public static final int PROPS_FIELD_NUMBER = 12; private java.util.List props_; - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+         * *预留扩展*
+         * 
+ */ public java.util.List getPropsList() { return props_; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+         * *预留扩展*
+         * 
+ */ public java.util.List getPropsOrBuilderList() { return props_; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+         * *预留扩展*
+         * 
+ */ public int getPropsCount() { return props_.size(); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+         * *预留扩展*
+         * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { return props_.get(index); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+         * *预留扩展*
+         * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { return props_.get(index); @@ -2137,23 +2264,25 @@ public final class CanalEntry { public static final int GTID_FIELD_NUMBER = 13; private java.lang.Object gtid_; - /** - * optional string gtid = 13; - * - *
-     **当前事务的gitd*
-     * 
- */ + + /** + * optional string gtid = 13; + * + *
+         * *当前事务的gitd*
+         * 
+ */ public boolean hasGtid() { return ((bitField0_ & 0x00000800) == 0x00000800); } - /** - * optional string gtid = 13; - * - *
-     **当前事务的gitd*
-     * 
- */ + + /** + * optional string gtid = 13; + * + *
+         * *当前事务的gitd*
+         * 
+ */ public java.lang.String getGtid() { java.lang.Object ref = gtid_; if (ref instanceof java.lang.String) { @@ -2168,13 +2297,14 @@ public final class CanalEntry { return s; } } - /** - * optional string gtid = 13; - * - *
-     **当前事务的gitd*
-     * 
- */ + + /** + * optional string gtid = 13; + * + *
+         * *当前事务的gitd*
+         * 
+ */ public com.google.protobuf.ByteString getGtidBytes() { java.lang.Object ref = gtid_; @@ -2670,46 +2800,50 @@ public final class CanalEntry { private int bitField0_; private int version_ = 1; - /** - * optional int32 version = 1 [default = 1]; - * - *
-       **协议的版本号*
-       * 
- */ + + /** + * optional int32 version = 1 [default = 1]; + * + *
+             * *协议的版本号*
+             * 
+ */ public boolean hasVersion() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int32 version = 1 [default = 1]; - * - *
-       **协议的版本号*
-       * 
- */ + + /** + * optional int32 version = 1 [default = 1]; + * + *
+             * *协议的版本号*
+             * 
+ */ public int getVersion() { return version_; } - /** - * optional int32 version = 1 [default = 1]; - * - *
-       **协议的版本号*
-       * 
- */ + + /** + * optional int32 version = 1 [default = 1]; + * + *
+             * *协议的版本号*
+             * 
+ */ public Builder setVersion(int value) { bitField0_ |= 0x00000001; version_ = value; onChanged(); return this; } - /** - * optional int32 version = 1 [default = 1]; - * - *
-       **协议的版本号*
-       * 
- */ + + /** + * optional int32 version = 1 [default = 1]; + * + *
+             * *协议的版本号*
+             * 
+ */ public Builder clearVersion() { bitField0_ = (bitField0_ & ~0x00000001); version_ = 1; @@ -2718,23 +2852,25 @@ public final class CanalEntry { } private java.lang.Object logfileName_ = ""; - /** - * optional string logfileName = 2; - * - *
-       **binlog/redolog 文件名*
-       * 
- */ + + /** + * optional string logfileName = 2; + * + *
+             * *binlog/redolog 文件名*
+             * 
+ */ public boolean hasLogfileName() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional string logfileName = 2; - * - *
-       **binlog/redolog 文件名*
-       * 
- */ + + /** + * optional string logfileName = 2; + * + *
+             * *binlog/redolog 文件名*
+             * 
+ */ public java.lang.String getLogfileName() { java.lang.Object ref = logfileName_; if (!(ref instanceof java.lang.String)) { @@ -2749,13 +2885,14 @@ public final class CanalEntry { return (java.lang.String) ref; } } - /** - * optional string logfileName = 2; - * - *
-       **binlog/redolog 文件名*
-       * 
- */ + + /** + * optional string logfileName = 2; + * + *
+             * *binlog/redolog 文件名*
+             * 
+ */ public com.google.protobuf.ByteString getLogfileNameBytes() { java.lang.Object ref = logfileName_; @@ -2769,13 +2906,14 @@ public final class CanalEntry { return (com.google.protobuf.ByteString) ref; } } - /** - * optional string logfileName = 2; - * - *
-       **binlog/redolog 文件名*
-       * 
- */ + + /** + * optional string logfileName = 2; + * + *
+             * *binlog/redolog 文件名*
+             * 
+ */ public Builder setLogfileName( java.lang.String value) { if (value == null) { @@ -2786,26 +2924,28 @@ public final class CanalEntry { onChanged(); return this; } - /** - * optional string logfileName = 2; - * - *
-       **binlog/redolog 文件名*
-       * 
- */ + + /** + * optional string logfileName = 2; + * + *
+             * *binlog/redolog 文件名*
+             * 
+ */ public Builder clearLogfileName() { bitField0_ = (bitField0_ & ~0x00000002); logfileName_ = getDefaultInstance().getLogfileName(); onChanged(); return this; } - /** - * optional string logfileName = 2; - * - *
-       **binlog/redolog 文件名*
-       * 
- */ + + /** + * optional string logfileName = 2; + * + *
+             * *binlog/redolog 文件名*
+             * 
+ */ public Builder setLogfileNameBytes( com.google.protobuf.ByteString value) { if (value == null) { @@ -2818,46 +2958,50 @@ public final class CanalEntry { } private long logfileOffset_ ; - /** - * optional int64 logfileOffset = 3; - * - *
-       **binlog/redolog 文件的偏移位置*
-       * 
- */ + + /** + * optional int64 logfileOffset = 3; + * + *
+             * *binlog/redolog 文件的偏移位置*
+             * 
+ */ public boolean hasLogfileOffset() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional int64 logfileOffset = 3; - * - *
-       **binlog/redolog 文件的偏移位置*
-       * 
- */ + + /** + * optional int64 logfileOffset = 3; + * + *
+             * *binlog/redolog 文件的偏移位置*
+             * 
+ */ public long getLogfileOffset() { return logfileOffset_; } - /** - * optional int64 logfileOffset = 3; - * - *
-       **binlog/redolog 文件的偏移位置*
-       * 
- */ + + /** + * optional int64 logfileOffset = 3; + * + *
+             * *binlog/redolog 文件的偏移位置*
+             * 
+ */ public Builder setLogfileOffset(long value) { bitField0_ |= 0x00000004; logfileOffset_ = value; onChanged(); return this; } - /** - * optional int64 logfileOffset = 3; - * - *
-       **binlog/redolog 文件的偏移位置*
-       * 
- */ + + /** + * optional int64 logfileOffset = 3; + * + *
+             * *binlog/redolog 文件的偏移位置*
+             * 
+ */ public Builder clearLogfileOffset() { bitField0_ = (bitField0_ & ~0x00000004); logfileOffset_ = 0L; @@ -2866,46 +3010,50 @@ public final class CanalEntry { } private long serverId_ ; - /** - * optional int64 serverId = 4; - * - *
-       **服务端serverId*
-       * 
- */ + + /** + * optional int64 serverId = 4; + * + *
+             * *服务端serverId*
+             * 
+ */ public boolean hasServerId() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional int64 serverId = 4; - * - *
-       **服务端serverId*
-       * 
- */ + + /** + * optional int64 serverId = 4; + * + *
+             * *服务端serverId*
+             * 
+ */ public long getServerId() { return serverId_; } - /** - * optional int64 serverId = 4; - * - *
-       **服务端serverId*
-       * 
- */ + + /** + * optional int64 serverId = 4; + * + *
+             * *服务端serverId*
+             * 
+ */ public Builder setServerId(long value) { bitField0_ |= 0x00000008; serverId_ = value; onChanged(); return this; } - /** - * optional int64 serverId = 4; - * - *
-       **服务端serverId*
-       * 
- */ + + /** + * optional int64 serverId = 4; + * + *
+             * *服务端serverId*
+             * 
+ */ public Builder clearServerId() { bitField0_ = (bitField0_ & ~0x00000008); serverId_ = 0L; @@ -2914,23 +3062,25 @@ public final class CanalEntry { } private java.lang.Object serverenCode_ = ""; - /** - * optional string serverenCode = 5; - * - *
-       ** 变更数据的编码 *
-       * 
- */ + + /** + * optional string serverenCode = 5; + * + *
+             * * 变更数据的编码 *
+             * 
+ */ public boolean hasServerenCode() { return ((bitField0_ & 0x00000010) == 0x00000010); } - /** - * optional string serverenCode = 5; - * - *
-       ** 变更数据的编码 *
-       * 
- */ + + /** + * optional string serverenCode = 5; + * + *
+             * * 变更数据的编码 *
+             * 
+ */ public java.lang.String getServerenCode() { java.lang.Object ref = serverenCode_; if (!(ref instanceof java.lang.String)) { @@ -2945,13 +3095,14 @@ public final class CanalEntry { return (java.lang.String) ref; } } - /** - * optional string serverenCode = 5; - * - *
-       ** 变更数据的编码 *
-       * 
- */ + + /** + * optional string serverenCode = 5; + * + *
+             * * 变更数据的编码 *
+             * 
+ */ public com.google.protobuf.ByteString getServerenCodeBytes() { java.lang.Object ref = serverenCode_; @@ -2965,13 +3116,14 @@ public final class CanalEntry { return (com.google.protobuf.ByteString) ref; } } - /** - * optional string serverenCode = 5; - * - *
-       ** 变更数据的编码 *
-       * 
- */ + + /** + * optional string serverenCode = 5; + * + *
+             * * 变更数据的编码 *
+             * 
+ */ public Builder setServerenCode( java.lang.String value) { if (value == null) { @@ -2982,26 +3134,28 @@ public final class CanalEntry { onChanged(); return this; } - /** - * optional string serverenCode = 5; - * - *
-       ** 变更数据的编码 *
-       * 
- */ + + /** + * optional string serverenCode = 5; + * + *
+             * * 变更数据的编码 *
+             * 
+ */ public Builder clearServerenCode() { bitField0_ = (bitField0_ & ~0x00000010); serverenCode_ = getDefaultInstance().getServerenCode(); onChanged(); return this; } - /** - * optional string serverenCode = 5; - * - *
-       ** 变更数据的编码 *
-       * 
- */ + + /** + * optional string serverenCode = 5; + * + *
+             * * 变更数据的编码 *
+             * 
+ */ public Builder setServerenCodeBytes( com.google.protobuf.ByteString value) { if (value == null) { @@ -3014,46 +3168,50 @@ public final class CanalEntry { } private long executeTime_ ; - /** - * optional int64 executeTime = 6; - * - *
-       **变更数据的执行时间 *
-       * 
- */ + + /** + * optional int64 executeTime = 6; + * + *
+             * *变更数据的执行时间 *
+             * 
+ */ public boolean hasExecuteTime() { return ((bitField0_ & 0x00000020) == 0x00000020); } - /** - * optional int64 executeTime = 6; - * - *
-       **变更数据的执行时间 *
-       * 
- */ + + /** + * optional int64 executeTime = 6; + * + *
+             * *变更数据的执行时间 *
+             * 
+ */ public long getExecuteTime() { return executeTime_; } - /** - * optional int64 executeTime = 6; - * - *
-       **变更数据的执行时间 *
-       * 
- */ + + /** + * optional int64 executeTime = 6; + * + *
+             * *变更数据的执行时间 *
+             * 
+ */ public Builder setExecuteTime(long value) { bitField0_ |= 0x00000020; executeTime_ = value; onChanged(); return this; } - /** - * optional int64 executeTime = 6; - * - *
-       **变更数据的执行时间 *
-       * 
- */ + + /** + * optional int64 executeTime = 6; + * + *
+             * *变更数据的执行时间 *
+             * 
+ */ public Builder clearExecuteTime() { bitField0_ = (bitField0_ & ~0x00000020); executeTime_ = 0L; @@ -3062,33 +3220,36 @@ public final class CanalEntry { } private com.alibaba.otter.canal.protocol.CanalEntry.Type sourceType_ = com.alibaba.otter.canal.protocol.CanalEntry.Type.MYSQL; - /** - * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; - * - *
-       ** 变更数据的来源*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + * + *
+             * * 变更数据的来源*
+             * 
+ */ public boolean hasSourceType() { return ((bitField0_ & 0x00000040) == 0x00000040); } - /** - * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; - * - *
-       ** 变更数据的来源*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + * + *
+             * * 变更数据的来源*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Type getSourceType() { return sourceType_; } - /** - * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; - * - *
-       ** 变更数据的来源*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + * + *
+             * * 变更数据的来源*
+             * 
+ */ public Builder setSourceType(com.alibaba.otter.canal.protocol.CanalEntry.Type value) { if (value == null) { throw new NullPointerException(); @@ -3098,13 +3259,14 @@ public final class CanalEntry { onChanged(); return this; } - /** - * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; - * - *
-       ** 变更数据的来源*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL]; + * + *
+             * * 变更数据的来源*
+             * 
+ */ public Builder clearSourceType() { bitField0_ = (bitField0_ & ~0x00000040); sourceType_ = com.alibaba.otter.canal.protocol.CanalEntry.Type.MYSQL; @@ -3113,23 +3275,25 @@ public final class CanalEntry { } private java.lang.Object schemaName_ = ""; - /** - * optional string schemaName = 8; - * - *
-       ** 变更数据的schemaname*
-       * 
- */ + + /** + * optional string schemaName = 8; + * + *
+             * * 变更数据的schemaname*
+             * 
+ */ public boolean hasSchemaName() { return ((bitField0_ & 0x00000080) == 0x00000080); } - /** - * optional string schemaName = 8; - * - *
-       ** 变更数据的schemaname*
-       * 
- */ + + /** + * optional string schemaName = 8; + * + *
+             * * 变更数据的schemaname*
+             * 
+ */ public java.lang.String getSchemaName() { java.lang.Object ref = schemaName_; if (!(ref instanceof java.lang.String)) { @@ -3144,13 +3308,14 @@ public final class CanalEntry { return (java.lang.String) ref; } } - /** - * optional string schemaName = 8; - * - *
-       ** 变更数据的schemaname*
-       * 
- */ + + /** + * optional string schemaName = 8; + * + *
+             * * 变更数据的schemaname*
+             * 
+ */ public com.google.protobuf.ByteString getSchemaNameBytes() { java.lang.Object ref = schemaName_; @@ -3164,13 +3329,14 @@ public final class CanalEntry { return (com.google.protobuf.ByteString) ref; } } - /** - * optional string schemaName = 8; - * - *
-       ** 变更数据的schemaname*
-       * 
- */ + + /** + * optional string schemaName = 8; + * + *
+             * * 变更数据的schemaname*
+             * 
+ */ public Builder setSchemaName( java.lang.String value) { if (value == null) { @@ -3181,26 +3347,28 @@ public final class CanalEntry { onChanged(); return this; } - /** - * optional string schemaName = 8; - * - *
-       ** 变更数据的schemaname*
-       * 
- */ + + /** + * optional string schemaName = 8; + * + *
+             * * 变更数据的schemaname*
+             * 
+ */ public Builder clearSchemaName() { bitField0_ = (bitField0_ & ~0x00000080); schemaName_ = getDefaultInstance().getSchemaName(); onChanged(); return this; } - /** - * optional string schemaName = 8; - * - *
-       ** 变更数据的schemaname*
-       * 
- */ + + /** + * optional string schemaName = 8; + * + *
+             * * 变更数据的schemaname*
+             * 
+ */ public Builder setSchemaNameBytes( com.google.protobuf.ByteString value) { if (value == null) { @@ -3213,23 +3381,25 @@ public final class CanalEntry { } private java.lang.Object tableName_ = ""; - /** - * optional string tableName = 9; - * - *
-       **变更数据的tablename*
-       * 
- */ + + /** + * optional string tableName = 9; + * + *
+             * *变更数据的tablename*
+             * 
+ */ public boolean hasTableName() { return ((bitField0_ & 0x00000100) == 0x00000100); } - /** - * optional string tableName = 9; - * - *
-       **变更数据的tablename*
-       * 
- */ + + /** + * optional string tableName = 9; + * + *
+             * *变更数据的tablename*
+             * 
+ */ public java.lang.String getTableName() { java.lang.Object ref = tableName_; if (!(ref instanceof java.lang.String)) { @@ -3244,13 +3414,14 @@ public final class CanalEntry { return (java.lang.String) ref; } } - /** - * optional string tableName = 9; - * - *
-       **变更数据的tablename*
-       * 
- */ + + /** + * optional string tableName = 9; + * + *
+             * *变更数据的tablename*
+             * 
+ */ public com.google.protobuf.ByteString getTableNameBytes() { java.lang.Object ref = tableName_; @@ -3264,13 +3435,14 @@ public final class CanalEntry { return (com.google.protobuf.ByteString) ref; } } - /** - * optional string tableName = 9; - * - *
-       **变更数据的tablename*
-       * 
- */ + + /** + * optional string tableName = 9; + * + *
+             * *变更数据的tablename*
+             * 
+ */ public Builder setTableName( java.lang.String value) { if (value == null) { @@ -3281,26 +3453,28 @@ public final class CanalEntry { onChanged(); return this; } - /** - * optional string tableName = 9; - * - *
-       **变更数据的tablename*
-       * 
- */ + + /** + * optional string tableName = 9; + * + *
+             * *变更数据的tablename*
+             * 
+ */ public Builder clearTableName() { bitField0_ = (bitField0_ & ~0x00000100); tableName_ = getDefaultInstance().getTableName(); onChanged(); return this; } - /** - * optional string tableName = 9; - * - *
-       **变更数据的tablename*
-       * 
- */ + + /** + * optional string tableName = 9; + * + *
+             * *变更数据的tablename*
+             * 
+ */ public Builder setTableNameBytes( com.google.protobuf.ByteString value) { if (value == null) { @@ -3313,46 +3487,50 @@ public final class CanalEntry { } private long eventLength_ ; - /** - * optional int64 eventLength = 10; - * - *
-       **每个event的长度*
-       * 
- */ + + /** + * optional int64 eventLength = 10; + * + *
+             * *每个event的长度*
+             * 
+ */ public boolean hasEventLength() { return ((bitField0_ & 0x00000200) == 0x00000200); } - /** - * optional int64 eventLength = 10; - * - *
-       **每个event的长度*
-       * 
- */ + + /** + * optional int64 eventLength = 10; + * + *
+             * *每个event的长度*
+             * 
+ */ public long getEventLength() { return eventLength_; } - /** - * optional int64 eventLength = 10; - * - *
-       **每个event的长度*
-       * 
- */ + + /** + * optional int64 eventLength = 10; + * + *
+             * *每个event的长度*
+             * 
+ */ public Builder setEventLength(long value) { bitField0_ |= 0x00000200; eventLength_ = value; onChanged(); return this; } - /** - * optional int64 eventLength = 10; - * - *
-       **每个event的长度*
-       * 
- */ + + /** + * optional int64 eventLength = 10; + * + *
+             * *每个event的长度*
+             * 
+ */ public Builder clearEventLength() { bitField0_ = (bitField0_ & ~0x00000200); eventLength_ = 0L; @@ -3361,33 +3539,36 @@ public final class CanalEntry { } private com.alibaba.otter.canal.protocol.CanalEntry.EventType eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; - * - *
-       **数据变更类型*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + * + *
+             * *数据变更类型*
+             * 
+ */ public boolean hasEventType() { return ((bitField0_ & 0x00000400) == 0x00000400); } - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; - * - *
-       **数据变更类型*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + * + *
+             * *数据变更类型*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType() { return eventType_; } - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; - * - *
-       **数据变更类型*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + * + *
+             * *数据变更类型*
+             * 
+ */ public Builder setEventType(com.alibaba.otter.canal.protocol.CanalEntry.EventType value) { if (value == null) { throw new NullPointerException(); @@ -3397,13 +3578,14 @@ public final class CanalEntry { onChanged(); return this; } - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; - * - *
-       **数据变更类型*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE]; + * + *
+             * *数据变更类型*
+             * 
+ */ public Builder clearEventType() { bitField0_ = (bitField0_ & ~0x00000400); eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; @@ -3423,13 +3605,13 @@ public final class CanalEntry { private com.google.protobuf.RepeatedFieldBuilder< com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> propsBuilder_; - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-       **预留扩展*
-       * 
- */ + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+             * *预留扩展*
+             * 
+ */ public java.util.List getPropsList() { if (propsBuilder_ == null) { return java.util.Collections.unmodifiableList(props_); @@ -3437,13 +3619,14 @@ public final class CanalEntry { return propsBuilder_.getMessageList(); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+             * *预留扩展*
+             * 
+ */ public int getPropsCount() { if (propsBuilder_ == null) { return props_.size(); @@ -3451,13 +3634,14 @@ public final class CanalEntry { return propsBuilder_.getCount(); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { if (propsBuilder_ == null) { return props_.get(index); @@ -3465,13 +3649,14 @@ public final class CanalEntry { return propsBuilder_.getMessage(index); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder setProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { @@ -3486,13 +3671,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder setProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -3504,13 +3690,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { @@ -3524,13 +3711,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { @@ -3545,13 +3733,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addProps( com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -3563,13 +3752,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -3581,13 +3771,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addAllProps( java.lang.Iterable values) { if (propsBuilder_ == null) { @@ -3600,13 +3791,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder clearProps() { if (propsBuilder_ == null) { props_ = java.util.Collections.emptyList(); @@ -3617,13 +3809,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder removeProps(int index) { if (propsBuilder_ == null) { ensurePropsIsMutable(); @@ -3634,24 +3827,26 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder getPropsBuilder( int index) { return getPropsFieldBuilder().getBuilder(index); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { if (propsBuilder_ == null) { @@ -3659,13 +3854,14 @@ public final class CanalEntry { return propsBuilder_.getMessageOrBuilder(index); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+             * *预留扩展*
+             * 
+ */ public java.util.List getPropsOrBuilderList() { if (propsBuilder_ != null) { @@ -3674,36 +3870,39 @@ public final class CanalEntry { return java.util.Collections.unmodifiableList(props_); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { return getPropsFieldBuilder().addBuilder( com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder( int index) { return getPropsFieldBuilder().addBuilder( index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 12; + * + *
+             * *预留扩展*
+             * 
+ */ public java.util.List getPropsBuilderList() { return getPropsFieldBuilder().getBuilderList(); @@ -3724,23 +3923,25 @@ public final class CanalEntry { } private java.lang.Object gtid_ = ""; - /** - * optional string gtid = 13; - * - *
-       **当前事务的gitd*
-       * 
- */ + + /** + * optional string gtid = 13; + * + *
+             * *当前事务的gitd*
+             * 
+ */ public boolean hasGtid() { return ((bitField0_ & 0x00001000) == 0x00001000); } - /** - * optional string gtid = 13; - * - *
-       **当前事务的gitd*
-       * 
- */ + + /** + * optional string gtid = 13; + * + *
+             * *当前事务的gitd*
+             * 
+ */ public java.lang.String getGtid() { java.lang.Object ref = gtid_; if (!(ref instanceof java.lang.String)) { @@ -3755,13 +3956,14 @@ public final class CanalEntry { return (java.lang.String) ref; } } - /** - * optional string gtid = 13; - * - *
-       **当前事务的gitd*
-       * 
- */ + + /** + * optional string gtid = 13; + * + *
+             * *当前事务的gitd*
+             * 
+ */ public com.google.protobuf.ByteString getGtidBytes() { java.lang.Object ref = gtid_; @@ -3775,13 +3977,14 @@ public final class CanalEntry { return (com.google.protobuf.ByteString) ref; } } - /** - * optional string gtid = 13; - * - *
-       **当前事务的gitd*
-       * 
- */ + + /** + * optional string gtid = 13; + * + *
+             * *当前事务的gitd*
+             * 
+ */ public Builder setGtid( java.lang.String value) { if (value == null) { @@ -3792,26 +3995,28 @@ public final class CanalEntry { onChanged(); return this; } - /** - * optional string gtid = 13; - * - *
-       **当前事务的gitd*
-       * 
- */ + + /** + * optional string gtid = 13; + * + *
+             * *当前事务的gitd*
+             * 
+ */ public Builder clearGtid() { bitField0_ = (bitField0_ & ~0x00001000); gtid_ = getDefaultInstance().getGtid(); onChanged(); return this; } - /** - * optional string gtid = 13; - * - *
-       **当前事务的gitd*
-       * 
- */ + + /** + * optional string gtid = 13; + * + *
+             * *当前事务的gitd*
+             * 
+ */ public Builder setGtidBytes( com.google.protobuf.ByteString value) { if (value == null) { @@ -3838,237 +4043,254 @@ public final class CanalEntry { // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.Column) com.google.protobuf.MessageOrBuilder { - /** - * optional int32 index = 1; - * - *
-     **字段下标*
-     * 
- */ + /** + * optional int32 index = 1; + * + *
+         * *字段下标*
+         * 
+ */ boolean hasIndex(); - /** - * optional int32 index = 1; - * - *
-     **字段下标*
-     * 
- */ + + /** + * optional int32 index = 1; + * + *
+         * *字段下标*
+         * 
+ */ int getIndex(); - /** - * optional int32 sqlType = 2; - * - *
-     **字段java中类型*
-     * 
- */ + /** + * optional int32 sqlType = 2; + * + *
+         * *字段java中类型*
+         * 
+ */ boolean hasSqlType(); - /** - * optional int32 sqlType = 2; - * - *
-     **字段java中类型*
-     * 
- */ + + /** + * optional int32 sqlType = 2; + * + *
+         * *字段java中类型*
+         * 
+ */ int getSqlType(); - /** - * optional string name = 3; - * - *
-     **字段名称(忽略大小写),在mysql中是没有的*
-     * 
- */ + /** + * optional string name = 3; + * + *
+         * *字段名称(忽略大小写),在mysql中是没有的*
+         * 
+ */ boolean hasName(); - /** - * optional string name = 3; - * - *
-     **字段名称(忽略大小写),在mysql中是没有的*
-     * 
- */ + + /** + * optional string name = 3; + * + *
+         * *字段名称(忽略大小写),在mysql中是没有的*
+         * 
+ */ java.lang.String getName(); - /** - * optional string name = 3; - * - *
-     **字段名称(忽略大小写),在mysql中是没有的*
-     * 
- */ + + /** + * optional string name = 3; + * + *
+         * *字段名称(忽略大小写),在mysql中是没有的*
+         * 
+ */ com.google.protobuf.ByteString getNameBytes(); - /** - * optional bool isKey = 4; - * - *
-     **是否是主键*
-     * 
- */ + /** + * optional bool isKey = 4; + * + *
+         * *是否是主键*
+         * 
+ */ boolean hasIsKey(); - /** - * optional bool isKey = 4; - * - *
-     **是否是主键*
-     * 
- */ + + /** + * optional bool isKey = 4; + * + *
+         * *是否是主键*
+         * 
+ */ boolean getIsKey(); - /** - * optional bool updated = 5; - * - *
-     **如果EventType=UPDATE,用于标识这个字段值是否有修改*
-     * 
- */ + /** + * optional bool updated = 5; + * + *
+         * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
+         * 
+ */ boolean hasUpdated(); - /** - * optional bool updated = 5; - * - *
-     **如果EventType=UPDATE,用于标识这个字段值是否有修改*
-     * 
- */ + + /** + * optional bool updated = 5; + * + *
+         * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
+         * 
+ */ boolean getUpdated(); - /** - * optional bool isNull = 6 [default = false]; - * - *
-     ** 标识是否为空  *
-     * 
- */ + /** + * optional bool isNull = 6 [default = false]; + * + *
+         * * 标识是否为空  *
+         * 
+ */ boolean hasIsNull(); - /** - * optional bool isNull = 6 [default = false]; - * - *
-     ** 标识是否为空  *
-     * 
- */ + + /** + * optional bool isNull = 6 [default = false]; + * + *
+         * * 标识是否为空  *
+         * 
+ */ boolean getIsNull(); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-     **预留扩展*
-     * 
- */ + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+         * *预留扩展*
+         * 
+ */ java.util.List getPropsList(); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+         * *预留扩展*
+         * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+         * *预留扩展*
+         * 
+ */ int getPropsCount(); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+         * *预留扩展*
+         * 
+ */ java.util.List getPropsOrBuilderList(); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+         * *预留扩展*
+         * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index); - /** - * optional string value = 8; - * - *
-     ** 字段值,timestamp,Datetime是一个时间格式的文本 *
-     * 
- */ + /** + * optional string value = 8; + * + *
+         * * 字段值,timestamp,Datetime是一个时间格式的文本 *
+         * 
+ */ boolean hasValue(); - /** - * optional string value = 8; - * - *
-     ** 字段值,timestamp,Datetime是一个时间格式的文本 *
-     * 
- */ + + /** + * optional string value = 8; + * + *
+         * * 字段值,timestamp,Datetime是一个时间格式的文本 *
+         * 
+ */ java.lang.String getValue(); - /** - * optional string value = 8; - * - *
-     ** 字段值,timestamp,Datetime是一个时间格式的文本 *
-     * 
- */ + + /** + * optional string value = 8; + * + *
+         * * 字段值,timestamp,Datetime是一个时间格式的文本 *
+         * 
+ */ com.google.protobuf.ByteString getValueBytes(); - /** - * optional int32 length = 9; - * - *
-     ** 对应数据对象原始长度 *
-     * 
- */ + /** + * optional int32 length = 9; + * + *
+         * * 对应数据对象原始长度 *
+         * 
+ */ boolean hasLength(); - /** - * optional int32 length = 9; - * - *
-     ** 对应数据对象原始长度 *
-     * 
- */ + + /** + * optional int32 length = 9; + * + *
+         * * 对应数据对象原始长度 *
+         * 
+ */ int getLength(); - /** - * optional string mysqlType = 10; - * - *
-     **字段mysql类型*
-     * 
- */ + /** + * optional string mysqlType = 10; + * + *
+         * *字段mysql类型*
+         * 
+ */ boolean hasMysqlType(); - /** - * optional string mysqlType = 10; - * - *
-     **字段mysql类型*
-     * 
- */ + + /** + * optional string mysqlType = 10; + * + *
+         * *字段mysql类型*
+         * 
+ */ java.lang.String getMysqlType(); - /** - * optional string mysqlType = 10; - * - *
-     **字段mysql类型*
-     * 
- */ + + /** + * optional string mysqlType = 10; + * + *
+         * *字段mysql类型*
+         * 
+ */ com.google.protobuf.ByteString getMysqlTypeBytes(); } - /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.Column} - * - *
-   **每个字段的数据结构*
-   * 
- */ + + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Column} + * + *
+     * *每个字段的数据结构*
+     * 
+ */ public static final class Column extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Column) @@ -4219,69 +4441,75 @@ public final class CanalEntry { private int bitField0_; public static final int INDEX_FIELD_NUMBER = 1; private int index_; - /** - * optional int32 index = 1; - * - *
-     **字段下标*
-     * 
- */ + + /** + * optional int32 index = 1; + * + *
+         * *字段下标*
+         * 
+ */ public boolean hasIndex() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int32 index = 1; - * - *
-     **字段下标*
-     * 
- */ + + /** + * optional int32 index = 1; + * + *
+         * *字段下标*
+         * 
+ */ public int getIndex() { return index_; } public static final int SQLTYPE_FIELD_NUMBER = 2; private int sqlType_; - /** - * optional int32 sqlType = 2; - * - *
-     **字段java中类型*
-     * 
- */ + + /** + * optional int32 sqlType = 2; + * + *
+         * *字段java中类型*
+         * 
+ */ public boolean hasSqlType() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional int32 sqlType = 2; - * - *
-     **字段java中类型*
-     * 
- */ + + /** + * optional int32 sqlType = 2; + * + *
+         * *字段java中类型*
+         * 
+ */ public int getSqlType() { return sqlType_; } public static final int NAME_FIELD_NUMBER = 3; private java.lang.Object name_; - /** - * optional string name = 3; - * - *
-     **字段名称(忽略大小写),在mysql中是没有的*
-     * 
- */ + + /** + * optional string name = 3; + * + *
+         * *字段名称(忽略大小写),在mysql中是没有的*
+         * 
+ */ public boolean hasName() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional string name = 3; - * - *
-     **字段名称(忽略大小写),在mysql中是没有的*
-     * 
- */ + + /** + * optional string name = 3; + * + *
+         * *字段名称(忽略大小写),在mysql中是没有的*
+         * 
+ */ public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -4296,13 +4524,14 @@ public final class CanalEntry { return s; } } - /** - * optional string name = 3; - * - *
-     **字段名称(忽略大小写),在mysql中是没有的*
-     * 
- */ + + /** + * optional string name = 3; + * + *
+         * *字段名称(忽略大小写),在mysql中是没有的*
+         * 
+ */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; @@ -4319,123 +4548,134 @@ public final class CanalEntry { public static final int ISKEY_FIELD_NUMBER = 4; private boolean isKey_; - /** - * optional bool isKey = 4; - * - *
-     **是否是主键*
-     * 
- */ + + /** + * optional bool isKey = 4; + * + *
+         * *是否是主键*
+         * 
+ */ public boolean hasIsKey() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional bool isKey = 4; - * - *
-     **是否是主键*
-     * 
- */ + + /** + * optional bool isKey = 4; + * + *
+         * *是否是主键*
+         * 
+ */ public boolean getIsKey() { return isKey_; } public static final int UPDATED_FIELD_NUMBER = 5; private boolean updated_; - /** - * optional bool updated = 5; - * - *
-     **如果EventType=UPDATE,用于标识这个字段值是否有修改*
-     * 
- */ + + /** + * optional bool updated = 5; + * + *
+         * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
+         * 
+ */ public boolean hasUpdated() { return ((bitField0_ & 0x00000010) == 0x00000010); } - /** - * optional bool updated = 5; - * - *
-     **如果EventType=UPDATE,用于标识这个字段值是否有修改*
-     * 
- */ + + /** + * optional bool updated = 5; + * + *
+         * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
+         * 
+ */ public boolean getUpdated() { return updated_; } public static final int ISNULL_FIELD_NUMBER = 6; private boolean isNull_; - /** - * optional bool isNull = 6 [default = false]; - * - *
-     ** 标识是否为空  *
-     * 
- */ + + /** + * optional bool isNull = 6 [default = false]; + * + *
+         * * 标识是否为空  *
+         * 
+ */ public boolean hasIsNull() { return ((bitField0_ & 0x00000020) == 0x00000020); } - /** - * optional bool isNull = 6 [default = false]; - * - *
-     ** 标识是否为空  *
-     * 
- */ + + /** + * optional bool isNull = 6 [default = false]; + * + *
+         * * 标识是否为空  *
+         * 
+ */ public boolean getIsNull() { return isNull_; } public static final int PROPS_FIELD_NUMBER = 7; private java.util.List props_; - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+         * *预留扩展*
+         * 
+ */ public java.util.List getPropsList() { return props_; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+         * *预留扩展*
+         * 
+ */ public java.util.List getPropsOrBuilderList() { return props_; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+         * *预留扩展*
+         * 
+ */ public int getPropsCount() { return props_.size(); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+         * *预留扩展*
+         * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { return props_.get(index); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+         * *预留扩展*
+         * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { return props_.get(index); @@ -4443,23 +4683,25 @@ public final class CanalEntry { public static final int VALUE_FIELD_NUMBER = 8; private java.lang.Object value_; - /** - * optional string value = 8; - * - *
-     ** 字段值,timestamp,Datetime是一个时间格式的文本 *
-     * 
- */ + + /** + * optional string value = 8; + * + *
+         * * 字段值,timestamp,Datetime是一个时间格式的文本 *
+         * 
+ */ public boolean hasValue() { return ((bitField0_ & 0x00000040) == 0x00000040); } - /** - * optional string value = 8; - * - *
-     ** 字段值,timestamp,Datetime是一个时间格式的文本 *
-     * 
- */ + + /** + * optional string value = 8; + * + *
+         * * 字段值,timestamp,Datetime是一个时间格式的文本 *
+         * 
+ */ public java.lang.String getValue() { java.lang.Object ref = value_; if (ref instanceof java.lang.String) { @@ -4474,13 +4716,14 @@ public final class CanalEntry { return s; } } - /** - * optional string value = 8; - * - *
-     ** 字段值,timestamp,Datetime是一个时间格式的文本 *
-     * 
- */ + + /** + * optional string value = 8; + * + *
+         * * 字段值,timestamp,Datetime是一个时间格式的文本 *
+         * 
+ */ public com.google.protobuf.ByteString getValueBytes() { java.lang.Object ref = value_; @@ -4497,46 +4740,50 @@ public final class CanalEntry { public static final int LENGTH_FIELD_NUMBER = 9; private int length_; - /** - * optional int32 length = 9; - * - *
-     ** 对应数据对象原始长度 *
-     * 
- */ + + /** + * optional int32 length = 9; + * + *
+         * * 对应数据对象原始长度 *
+         * 
+ */ public boolean hasLength() { return ((bitField0_ & 0x00000080) == 0x00000080); } - /** - * optional int32 length = 9; - * - *
-     ** 对应数据对象原始长度 *
-     * 
- */ + + /** + * optional int32 length = 9; + * + *
+         * * 对应数据对象原始长度 *
+         * 
+ */ public int getLength() { return length_; } public static final int MYSQLTYPE_FIELD_NUMBER = 10; private java.lang.Object mysqlType_; - /** - * optional string mysqlType = 10; - * - *
-     **字段mysql类型*
-     * 
- */ + + /** + * optional string mysqlType = 10; + * + *
+         * *字段mysql类型*
+         * 
+ */ public boolean hasMysqlType() { return ((bitField0_ & 0x00000100) == 0x00000100); } - /** - * optional string mysqlType = 10; - * - *
-     **字段mysql类型*
-     * 
- */ + + /** + * optional string mysqlType = 10; + * + *
+         * *字段mysql类型*
+         * 
+ */ public java.lang.String getMysqlType() { java.lang.Object ref = mysqlType_; if (ref instanceof java.lang.String) { @@ -4551,13 +4798,14 @@ public final class CanalEntry { return s; } } - /** - * optional string mysqlType = 10; - * - *
-     **字段mysql类型*
-     * 
- */ + + /** + * optional string mysqlType = 10; + * + *
+         * *字段mysql类型*
+         * 
+ */ public com.google.protobuf.ByteString getMysqlTypeBytes() { java.lang.Object ref = mysqlType_; @@ -4754,13 +5002,14 @@ public final class CanalEntry { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.Column} - * - *
-     **每个字段的数据结构*
-     * 
- */ + + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Column} + * + *
+         * *每个字段的数据结构*
+         * 
+ */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Column) @@ -4998,46 +5247,50 @@ public final class CanalEntry { private int bitField0_; private int index_ ; - /** - * optional int32 index = 1; - * - *
-       **字段下标*
-       * 
- */ + + /** + * optional int32 index = 1; + * + *
+             * *字段下标*
+             * 
+ */ public boolean hasIndex() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int32 index = 1; - * - *
-       **字段下标*
-       * 
- */ + + /** + * optional int32 index = 1; + * + *
+             * *字段下标*
+             * 
+ */ public int getIndex() { return index_; } - /** - * optional int32 index = 1; - * - *
-       **字段下标*
-       * 
- */ + + /** + * optional int32 index = 1; + * + *
+             * *字段下标*
+             * 
+ */ public Builder setIndex(int value) { bitField0_ |= 0x00000001; index_ = value; onChanged(); return this; } - /** - * optional int32 index = 1; - * - *
-       **字段下标*
-       * 
- */ + + /** + * optional int32 index = 1; + * + *
+             * *字段下标*
+             * 
+ */ public Builder clearIndex() { bitField0_ = (bitField0_ & ~0x00000001); index_ = 0; @@ -5046,46 +5299,50 @@ public final class CanalEntry { } private int sqlType_ ; - /** - * optional int32 sqlType = 2; - * - *
-       **字段java中类型*
-       * 
- */ + + /** + * optional int32 sqlType = 2; + * + *
+             * *字段java中类型*
+             * 
+ */ public boolean hasSqlType() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional int32 sqlType = 2; - * - *
-       **字段java中类型*
-       * 
- */ + + /** + * optional int32 sqlType = 2; + * + *
+             * *字段java中类型*
+             * 
+ */ public int getSqlType() { return sqlType_; } - /** - * optional int32 sqlType = 2; - * - *
-       **字段java中类型*
-       * 
- */ + + /** + * optional int32 sqlType = 2; + * + *
+             * *字段java中类型*
+             * 
+ */ public Builder setSqlType(int value) { bitField0_ |= 0x00000002; sqlType_ = value; onChanged(); return this; } - /** - * optional int32 sqlType = 2; - * - *
-       **字段java中类型*
-       * 
- */ + + /** + * optional int32 sqlType = 2; + * + *
+             * *字段java中类型*
+             * 
+ */ public Builder clearSqlType() { bitField0_ = (bitField0_ & ~0x00000002); sqlType_ = 0; @@ -5094,23 +5351,25 @@ public final class CanalEntry { } private java.lang.Object name_ = ""; - /** - * optional string name = 3; - * - *
-       **字段名称(忽略大小写),在mysql中是没有的*
-       * 
- */ + + /** + * optional string name = 3; + * + *
+             * *字段名称(忽略大小写),在mysql中是没有的*
+             * 
+ */ public boolean hasName() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional string name = 3; - * - *
-       **字段名称(忽略大小写),在mysql中是没有的*
-       * 
- */ + + /** + * optional string name = 3; + * + *
+             * *字段名称(忽略大小写),在mysql中是没有的*
+             * 
+ */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { @@ -5125,13 +5384,14 @@ public final class CanalEntry { return (java.lang.String) ref; } } - /** - * optional string name = 3; - * - *
-       **字段名称(忽略大小写),在mysql中是没有的*
-       * 
- */ + + /** + * optional string name = 3; + * + *
+             * *字段名称(忽略大小写),在mysql中是没有的*
+             * 
+ */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; @@ -5145,13 +5405,14 @@ public final class CanalEntry { return (com.google.protobuf.ByteString) ref; } } - /** - * optional string name = 3; - * - *
-       **字段名称(忽略大小写),在mysql中是没有的*
-       * 
- */ + + /** + * optional string name = 3; + * + *
+             * *字段名称(忽略大小写),在mysql中是没有的*
+             * 
+ */ public Builder setName( java.lang.String value) { if (value == null) { @@ -5162,26 +5423,28 @@ public final class CanalEntry { onChanged(); return this; } - /** - * optional string name = 3; - * - *
-       **字段名称(忽略大小写),在mysql中是没有的*
-       * 
- */ + + /** + * optional string name = 3; + * + *
+             * *字段名称(忽略大小写),在mysql中是没有的*
+             * 
+ */ public Builder clearName() { bitField0_ = (bitField0_ & ~0x00000004); name_ = getDefaultInstance().getName(); onChanged(); return this; } - /** - * optional string name = 3; - * - *
-       **字段名称(忽略大小写),在mysql中是没有的*
-       * 
- */ + + /** + * optional string name = 3; + * + *
+             * *字段名称(忽略大小写),在mysql中是没有的*
+             * 
+ */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { @@ -5194,46 +5457,50 @@ public final class CanalEntry { } private boolean isKey_ ; - /** - * optional bool isKey = 4; - * - *
-       **是否是主键*
-       * 
- */ + + /** + * optional bool isKey = 4; + * + *
+             * *是否是主键*
+             * 
+ */ public boolean hasIsKey() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional bool isKey = 4; - * - *
-       **是否是主键*
-       * 
- */ + + /** + * optional bool isKey = 4; + * + *
+             * *是否是主键*
+             * 
+ */ public boolean getIsKey() { return isKey_; } - /** - * optional bool isKey = 4; - * - *
-       **是否是主键*
-       * 
- */ + + /** + * optional bool isKey = 4; + * + *
+             * *是否是主键*
+             * 
+ */ public Builder setIsKey(boolean value) { bitField0_ |= 0x00000008; isKey_ = value; onChanged(); return this; } - /** - * optional bool isKey = 4; - * - *
-       **是否是主键*
-       * 
- */ + + /** + * optional bool isKey = 4; + * + *
+             * *是否是主键*
+             * 
+ */ public Builder clearIsKey() { bitField0_ = (bitField0_ & ~0x00000008); isKey_ = false; @@ -5242,46 +5509,50 @@ public final class CanalEntry { } private boolean updated_ ; - /** - * optional bool updated = 5; - * - *
-       **如果EventType=UPDATE,用于标识这个字段值是否有修改*
-       * 
- */ + + /** + * optional bool updated = 5; + * + *
+             * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
+             * 
+ */ public boolean hasUpdated() { return ((bitField0_ & 0x00000010) == 0x00000010); } - /** - * optional bool updated = 5; - * - *
-       **如果EventType=UPDATE,用于标识这个字段值是否有修改*
-       * 
- */ + + /** + * optional bool updated = 5; + * + *
+             * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
+             * 
+ */ public boolean getUpdated() { return updated_; } - /** - * optional bool updated = 5; - * - *
-       **如果EventType=UPDATE,用于标识这个字段值是否有修改*
-       * 
- */ + + /** + * optional bool updated = 5; + * + *
+             * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
+             * 
+ */ public Builder setUpdated(boolean value) { bitField0_ |= 0x00000010; updated_ = value; onChanged(); return this; } - /** - * optional bool updated = 5; - * - *
-       **如果EventType=UPDATE,用于标识这个字段值是否有修改*
-       * 
- */ + + /** + * optional bool updated = 5; + * + *
+             * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
+             * 
+ */ public Builder clearUpdated() { bitField0_ = (bitField0_ & ~0x00000010); updated_ = false; @@ -5290,46 +5561,50 @@ public final class CanalEntry { } private boolean isNull_ ; - /** - * optional bool isNull = 6 [default = false]; - * - *
-       ** 标识是否为空  *
-       * 
- */ + + /** + * optional bool isNull = 6 [default = false]; + * + *
+             * * 标识是否为空  *
+             * 
+ */ public boolean hasIsNull() { return ((bitField0_ & 0x00000020) == 0x00000020); } - /** - * optional bool isNull = 6 [default = false]; - * - *
-       ** 标识是否为空  *
-       * 
- */ + + /** + * optional bool isNull = 6 [default = false]; + * + *
+             * * 标识是否为空  *
+             * 
+ */ public boolean getIsNull() { return isNull_; } - /** - * optional bool isNull = 6 [default = false]; - * - *
-       ** 标识是否为空  *
-       * 
- */ + + /** + * optional bool isNull = 6 [default = false]; + * + *
+             * * 标识是否为空  *
+             * 
+ */ public Builder setIsNull(boolean value) { bitField0_ |= 0x00000020; isNull_ = value; onChanged(); return this; } - /** - * optional bool isNull = 6 [default = false]; - * - *
-       ** 标识是否为空  *
-       * 
- */ + + /** + * optional bool isNull = 6 [default = false]; + * + *
+             * * 标识是否为空  *
+             * 
+ */ public Builder clearIsNull() { bitField0_ = (bitField0_ & ~0x00000020); isNull_ = false; @@ -5349,13 +5624,13 @@ public final class CanalEntry { private com.google.protobuf.RepeatedFieldBuilder< com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> propsBuilder_; - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-       **预留扩展*
-       * 
- */ + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+             * *预留扩展*
+             * 
+ */ public java.util.List getPropsList() { if (propsBuilder_ == null) { return java.util.Collections.unmodifiableList(props_); @@ -5363,13 +5638,14 @@ public final class CanalEntry { return propsBuilder_.getMessageList(); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+             * *预留扩展*
+             * 
+ */ public int getPropsCount() { if (propsBuilder_ == null) { return props_.size(); @@ -5377,13 +5653,14 @@ public final class CanalEntry { return propsBuilder_.getCount(); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { if (propsBuilder_ == null) { return props_.get(index); @@ -5391,13 +5668,14 @@ public final class CanalEntry { return propsBuilder_.getMessage(index); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder setProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { @@ -5412,13 +5690,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder setProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -5430,13 +5709,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { @@ -5450,13 +5730,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { @@ -5471,13 +5752,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addProps( com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -5489,13 +5771,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -5507,13 +5790,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addAllProps( java.lang.Iterable values) { if (propsBuilder_ == null) { @@ -5526,13 +5810,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder clearProps() { if (propsBuilder_ == null) { props_ = java.util.Collections.emptyList(); @@ -5543,13 +5828,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder removeProps(int index) { if (propsBuilder_ == null) { ensurePropsIsMutable(); @@ -5560,24 +5846,26 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder getPropsBuilder( int index) { return getPropsFieldBuilder().getBuilder(index); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { if (propsBuilder_ == null) { @@ -5585,13 +5873,14 @@ public final class CanalEntry { return propsBuilder_.getMessageOrBuilder(index); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+             * *预留扩展*
+             * 
+ */ public java.util.List getPropsOrBuilderList() { if (propsBuilder_ != null) { @@ -5600,36 +5889,39 @@ public final class CanalEntry { return java.util.Collections.unmodifiableList(props_); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { return getPropsFieldBuilder().addBuilder( com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder( int index) { return getPropsFieldBuilder().addBuilder( index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 7; + * + *
+             * *预留扩展*
+             * 
+ */ public java.util.List getPropsBuilderList() { return getPropsFieldBuilder().getBuilderList(); @@ -5650,23 +5942,25 @@ public final class CanalEntry { } private java.lang.Object value_ = ""; - /** - * optional string value = 8; - * - *
-       ** 字段值,timestamp,Datetime是一个时间格式的文本 *
-       * 
- */ + + /** + * optional string value = 8; + * + *
+             * * 字段值,timestamp,Datetime是一个时间格式的文本 *
+             * 
+ */ public boolean hasValue() { return ((bitField0_ & 0x00000080) == 0x00000080); } - /** - * optional string value = 8; - * - *
-       ** 字段值,timestamp,Datetime是一个时间格式的文本 *
-       * 
- */ + + /** + * optional string value = 8; + * + *
+             * * 字段值,timestamp,Datetime是一个时间格式的文本 *
+             * 
+ */ public java.lang.String getValue() { java.lang.Object ref = value_; if (!(ref instanceof java.lang.String)) { @@ -5681,13 +5975,14 @@ public final class CanalEntry { return (java.lang.String) ref; } } - /** - * optional string value = 8; - * - *
-       ** 字段值,timestamp,Datetime是一个时间格式的文本 *
-       * 
- */ + + /** + * optional string value = 8; + * + *
+             * * 字段值,timestamp,Datetime是一个时间格式的文本 *
+             * 
+ */ public com.google.protobuf.ByteString getValueBytes() { java.lang.Object ref = value_; @@ -5701,13 +5996,14 @@ public final class CanalEntry { return (com.google.protobuf.ByteString) ref; } } - /** - * optional string value = 8; - * - *
-       ** 字段值,timestamp,Datetime是一个时间格式的文本 *
-       * 
- */ + + /** + * optional string value = 8; + * + *
+             * * 字段值,timestamp,Datetime是一个时间格式的文本 *
+             * 
+ */ public Builder setValue( java.lang.String value) { if (value == null) { @@ -5718,26 +6014,28 @@ public final class CanalEntry { onChanged(); return this; } - /** - * optional string value = 8; - * - *
-       ** 字段值,timestamp,Datetime是一个时间格式的文本 *
-       * 
- */ + + /** + * optional string value = 8; + * + *
+             * * 字段值,timestamp,Datetime是一个时间格式的文本 *
+             * 
+ */ public Builder clearValue() { bitField0_ = (bitField0_ & ~0x00000080); value_ = getDefaultInstance().getValue(); onChanged(); return this; } - /** - * optional string value = 8; - * - *
-       ** 字段值,timestamp,Datetime是一个时间格式的文本 *
-       * 
- */ + + /** + * optional string value = 8; + * + *
+             * * 字段值,timestamp,Datetime是一个时间格式的文本 *
+             * 
+ */ public Builder setValueBytes( com.google.protobuf.ByteString value) { if (value == null) { @@ -5750,46 +6048,50 @@ public final class CanalEntry { } private int length_ ; - /** - * optional int32 length = 9; - * - *
-       ** 对应数据对象原始长度 *
-       * 
- */ + + /** + * optional int32 length = 9; + * + *
+             * * 对应数据对象原始长度 *
+             * 
+ */ public boolean hasLength() { return ((bitField0_ & 0x00000100) == 0x00000100); } - /** - * optional int32 length = 9; - * - *
-       ** 对应数据对象原始长度 *
-       * 
- */ + + /** + * optional int32 length = 9; + * + *
+             * * 对应数据对象原始长度 *
+             * 
+ */ public int getLength() { return length_; } - /** - * optional int32 length = 9; - * - *
-       ** 对应数据对象原始长度 *
-       * 
- */ + + /** + * optional int32 length = 9; + * + *
+             * * 对应数据对象原始长度 *
+             * 
+ */ public Builder setLength(int value) { bitField0_ |= 0x00000100; length_ = value; onChanged(); return this; } - /** - * optional int32 length = 9; - * - *
-       ** 对应数据对象原始长度 *
-       * 
- */ + + /** + * optional int32 length = 9; + * + *
+             * * 对应数据对象原始长度 *
+             * 
+ */ public Builder clearLength() { bitField0_ = (bitField0_ & ~0x00000100); length_ = 0; @@ -5798,23 +6100,25 @@ public final class CanalEntry { } private java.lang.Object mysqlType_ = ""; - /** - * optional string mysqlType = 10; - * - *
-       **字段mysql类型*
-       * 
- */ + + /** + * optional string mysqlType = 10; + * + *
+             * *字段mysql类型*
+             * 
+ */ public boolean hasMysqlType() { return ((bitField0_ & 0x00000200) == 0x00000200); } - /** - * optional string mysqlType = 10; - * - *
-       **字段mysql类型*
-       * 
- */ + + /** + * optional string mysqlType = 10; + * + *
+             * *字段mysql类型*
+             * 
+ */ public java.lang.String getMysqlType() { java.lang.Object ref = mysqlType_; if (!(ref instanceof java.lang.String)) { @@ -5829,13 +6133,14 @@ public final class CanalEntry { return (java.lang.String) ref; } } - /** - * optional string mysqlType = 10; - * - *
-       **字段mysql类型*
-       * 
- */ + + /** + * optional string mysqlType = 10; + * + *
+             * *字段mysql类型*
+             * 
+ */ public com.google.protobuf.ByteString getMysqlTypeBytes() { java.lang.Object ref = mysqlType_; @@ -5849,13 +6154,14 @@ public final class CanalEntry { return (com.google.protobuf.ByteString) ref; } } - /** - * optional string mysqlType = 10; - * - *
-       **字段mysql类型*
-       * 
- */ + + /** + * optional string mysqlType = 10; + * + *
+             * *字段mysql类型*
+             * 
+ */ public Builder setMysqlType( java.lang.String value) { if (value == null) { @@ -5866,26 +6172,28 @@ public final class CanalEntry { onChanged(); return this; } - /** - * optional string mysqlType = 10; - * - *
-       **字段mysql类型*
-       * 
- */ + + /** + * optional string mysqlType = 10; + * + *
+             * *字段mysql类型*
+             * 
+ */ public Builder clearMysqlType() { bitField0_ = (bitField0_ & ~0x00000200); mysqlType_ = getDefaultInstance().getMysqlType(); onChanged(); return this; } - /** - * optional string mysqlType = 10; - * - *
-       **字段mysql类型*
-       * 
- */ + + /** + * optional string mysqlType = 10; + * + *
+             * *字段mysql类型*
+             * 
+ */ public Builder setMysqlTypeBytes( com.google.protobuf.ByteString value) { if (value == null) { @@ -5912,135 +6220,147 @@ public final class CanalEntry { // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.RowData) com.google.protobuf.MessageOrBuilder { - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-     ** 字段信息,增量数据(修改前,删除前) *
-     * 
- */ + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+         * * 字段信息,增量数据(修改前,删除前) *
+         * 
+ */ java.util.List getBeforeColumnsList(); - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-     ** 字段信息,增量数据(修改前,删除前) *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+         * * 字段信息,增量数据(修改前,删除前) *
+         * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.Column getBeforeColumns(int index); - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-     ** 字段信息,增量数据(修改前,删除前) *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+         * * 字段信息,增量数据(修改前,删除前) *
+         * 
+ */ int getBeforeColumnsCount(); - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-     ** 字段信息,增量数据(修改前,删除前) *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+         * * 字段信息,增量数据(修改前,删除前) *
+         * 
+ */ java.util.List getBeforeColumnsOrBuilderList(); - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-     ** 字段信息,增量数据(修改前,删除前) *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+         * * 字段信息,增量数据(修改前,删除前) *
+         * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getBeforeColumnsOrBuilder( int index); - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-     ** 字段信息,增量数据(修改后,新增后)  *
-     * 
- */ + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+         * * 字段信息,增量数据(修改后,新增后)  *
+         * 
+ */ java.util.List getAfterColumnsList(); - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-     ** 字段信息,增量数据(修改后,新增后)  *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+         * * 字段信息,增量数据(修改后,新增后)  *
+         * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.Column getAfterColumns(int index); - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-     ** 字段信息,增量数据(修改后,新增后)  *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+         * * 字段信息,增量数据(修改后,新增后)  *
+         * 
+ */ int getAfterColumnsCount(); - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-     ** 字段信息,增量数据(修改后,新增后)  *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+         * * 字段信息,增量数据(修改后,新增后)  *
+         * 
+ */ java.util.List getAfterColumnsOrBuilderList(); - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-     ** 字段信息,增量数据(修改后,新增后)  *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+         * * 字段信息,增量数据(修改后,新增后)  *
+         * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getAfterColumnsOrBuilder( int index); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ java.util.List getPropsList(); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ int getPropsCount(); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ java.util.List getPropsOrBuilderList(); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index); } @@ -6170,54 +6490,59 @@ public final class CanalEntry { public static final int BEFORECOLUMNS_FIELD_NUMBER = 1; private java.util.List beforeColumns_; - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-     ** 字段信息,增量数据(修改前,删除前) *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+         * * 字段信息,增量数据(修改前,删除前) *
+         * 
+ */ public java.util.List getBeforeColumnsList() { return beforeColumns_; } - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-     ** 字段信息,增量数据(修改前,删除前) *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+         * * 字段信息,增量数据(修改前,删除前) *
+         * 
+ */ public java.util.List getBeforeColumnsOrBuilderList() { return beforeColumns_; } - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-     ** 字段信息,增量数据(修改前,删除前) *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+         * * 字段信息,增量数据(修改前,删除前) *
+         * 
+ */ public int getBeforeColumnsCount() { return beforeColumns_.size(); } - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-     ** 字段信息,增量数据(修改前,删除前) *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+         * * 字段信息,增量数据(修改前,删除前) *
+         * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Column getBeforeColumns(int index) { return beforeColumns_.get(index); } - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-     ** 字段信息,增量数据(修改前,删除前) *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+         * * 字段信息,增量数据(修改前,删除前) *
+         * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getBeforeColumnsOrBuilder( int index) { return beforeColumns_.get(index); @@ -6225,54 +6550,59 @@ public final class CanalEntry { public static final int AFTERCOLUMNS_FIELD_NUMBER = 2; private java.util.List afterColumns_; - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-     ** 字段信息,增量数据(修改后,新增后)  *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+         * * 字段信息,增量数据(修改后,新增后)  *
+         * 
+ */ public java.util.List getAfterColumnsList() { return afterColumns_; } - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-     ** 字段信息,增量数据(修改后,新增后)  *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+         * * 字段信息,增量数据(修改后,新增后)  *
+         * 
+ */ public java.util.List getAfterColumnsOrBuilderList() { return afterColumns_; } - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-     ** 字段信息,增量数据(修改后,新增后)  *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+         * * 字段信息,增量数据(修改后,新增后)  *
+         * 
+ */ public int getAfterColumnsCount() { return afterColumns_.size(); } - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-     ** 字段信息,增量数据(修改后,新增后)  *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+         * * 字段信息,增量数据(修改后,新增后)  *
+         * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Column getAfterColumns(int index) { return afterColumns_.get(index); } - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-     ** 字段信息,增量数据(修改后,新增后)  *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+         * * 字段信息,增量数据(修改后,新增后)  *
+         * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getAfterColumnsOrBuilder( int index) { return afterColumns_.get(index); @@ -6280,54 +6610,59 @@ public final class CanalEntry { public static final int PROPS_FIELD_NUMBER = 3; private java.util.List props_; - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ public java.util.List getPropsList() { return props_; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ public java.util.List getPropsOrBuilderList() { return props_; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ public int getPropsCount() { return props_.size(); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { return props_.get(index); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { return props_.get(index); @@ -6705,13 +7040,13 @@ public final class CanalEntry { private com.google.protobuf.RepeatedFieldBuilder< com.alibaba.otter.canal.protocol.CanalEntry.Column, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder, com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder> beforeColumnsBuilder_; - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-       ** 字段信息,增量数据(修改前,删除前) *
-       * 
- */ + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+             * * 字段信息,增量数据(修改前,删除前) *
+             * 
+ */ public java.util.List getBeforeColumnsList() { if (beforeColumnsBuilder_ == null) { return java.util.Collections.unmodifiableList(beforeColumns_); @@ -6719,13 +7054,14 @@ public final class CanalEntry { return beforeColumnsBuilder_.getMessageList(); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-       ** 字段信息,增量数据(修改前,删除前) *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+             * * 字段信息,增量数据(修改前,删除前) *
+             * 
+ */ public int getBeforeColumnsCount() { if (beforeColumnsBuilder_ == null) { return beforeColumns_.size(); @@ -6733,13 +7069,14 @@ public final class CanalEntry { return beforeColumnsBuilder_.getCount(); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-       ** 字段信息,增量数据(修改前,删除前) *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+             * * 字段信息,增量数据(修改前,删除前) *
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Column getBeforeColumns(int index) { if (beforeColumnsBuilder_ == null) { return beforeColumns_.get(index); @@ -6747,13 +7084,14 @@ public final class CanalEntry { return beforeColumnsBuilder_.getMessage(index); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-       ** 字段信息,增量数据(修改前,删除前) *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+             * * 字段信息,增量数据(修改前,删除前) *
+             * 
+ */ public Builder setBeforeColumns( int index, com.alibaba.otter.canal.protocol.CanalEntry.Column value) { if (beforeColumnsBuilder_ == null) { @@ -6768,13 +7106,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-       ** 字段信息,增量数据(修改前,删除前) *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+             * * 字段信息,增量数据(修改前,删除前) *
+             * 
+ */ public Builder setBeforeColumns( int index, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { if (beforeColumnsBuilder_ == null) { @@ -6786,13 +7125,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-       ** 字段信息,增量数据(修改前,删除前) *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+             * * 字段信息,增量数据(修改前,删除前) *
+             * 
+ */ public Builder addBeforeColumns(com.alibaba.otter.canal.protocol.CanalEntry.Column value) { if (beforeColumnsBuilder_ == null) { if (value == null) { @@ -6806,13 +7146,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-       ** 字段信息,增量数据(修改前,删除前) *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+             * * 字段信息,增量数据(修改前,删除前) *
+             * 
+ */ public Builder addBeforeColumns( int index, com.alibaba.otter.canal.protocol.CanalEntry.Column value) { if (beforeColumnsBuilder_ == null) { @@ -6827,13 +7168,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-       ** 字段信息,增量数据(修改前,删除前) *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+             * * 字段信息,增量数据(修改前,删除前) *
+             * 
+ */ public Builder addBeforeColumns( com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { if (beforeColumnsBuilder_ == null) { @@ -6845,13 +7187,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-       ** 字段信息,增量数据(修改前,删除前) *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+             * * 字段信息,增量数据(修改前,删除前) *
+             * 
+ */ public Builder addBeforeColumns( int index, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { if (beforeColumnsBuilder_ == null) { @@ -6863,13 +7206,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-       ** 字段信息,增量数据(修改前,删除前) *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+             * * 字段信息,增量数据(修改前,删除前) *
+             * 
+ */ public Builder addAllBeforeColumns( java.lang.Iterable values) { if (beforeColumnsBuilder_ == null) { @@ -6882,13 +7226,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-       ** 字段信息,增量数据(修改前,删除前) *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+             * * 字段信息,增量数据(修改前,删除前) *
+             * 
+ */ public Builder clearBeforeColumns() { if (beforeColumnsBuilder_ == null) { beforeColumns_ = java.util.Collections.emptyList(); @@ -6899,13 +7244,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-       ** 字段信息,增量数据(修改前,删除前) *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+             * * 字段信息,增量数据(修改前,删除前) *
+             * 
+ */ public Builder removeBeforeColumns(int index) { if (beforeColumnsBuilder_ == null) { ensureBeforeColumnsIsMutable(); @@ -6916,24 +7262,26 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-       ** 字段信息,增量数据(修改前,删除前) *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+             * * 字段信息,增量数据(修改前,删除前) *
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder getBeforeColumnsBuilder( int index) { return getBeforeColumnsFieldBuilder().getBuilder(index); } - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-       ** 字段信息,增量数据(修改前,删除前) *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+             * * 字段信息,增量数据(修改前,删除前) *
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getBeforeColumnsOrBuilder( int index) { if (beforeColumnsBuilder_ == null) { @@ -6941,13 +7289,14 @@ public final class CanalEntry { return beforeColumnsBuilder_.getMessageOrBuilder(index); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-       ** 字段信息,增量数据(修改前,删除前) *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+             * * 字段信息,增量数据(修改前,删除前) *
+             * 
+ */ public java.util.List getBeforeColumnsOrBuilderList() { if (beforeColumnsBuilder_ != null) { @@ -6956,36 +7305,39 @@ public final class CanalEntry { return java.util.Collections.unmodifiableList(beforeColumns_); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-       ** 字段信息,增量数据(修改前,删除前) *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+             * * 字段信息,增量数据(修改前,删除前) *
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder addBeforeColumnsBuilder() { return getBeforeColumnsFieldBuilder().addBuilder( com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance()); } - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-       ** 字段信息,增量数据(修改前,删除前) *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+             * * 字段信息,增量数据(修改前,删除前) *
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder addBeforeColumnsBuilder( int index) { return getBeforeColumnsFieldBuilder().addBuilder( index, com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance()); } - /** - * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; - * - *
-       ** 字段信息,增量数据(修改前,删除前) *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1; + * + *
+             * * 字段信息,增量数据(修改前,删除前) *
+             * 
+ */ public java.util.List getBeforeColumnsBuilderList() { return getBeforeColumnsFieldBuilder().getBuilderList(); @@ -7017,13 +7369,13 @@ public final class CanalEntry { private com.google.protobuf.RepeatedFieldBuilder< com.alibaba.otter.canal.protocol.CanalEntry.Column, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder, com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder> afterColumnsBuilder_; - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-       ** 字段信息,增量数据(修改后,新增后)  *
-       * 
- */ + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+             * * 字段信息,增量数据(修改后,新增后)  *
+             * 
+ */ public java.util.List getAfterColumnsList() { if (afterColumnsBuilder_ == null) { return java.util.Collections.unmodifiableList(afterColumns_); @@ -7031,13 +7383,14 @@ public final class CanalEntry { return afterColumnsBuilder_.getMessageList(); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-       ** 字段信息,增量数据(修改后,新增后)  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+             * * 字段信息,增量数据(修改后,新增后)  *
+             * 
+ */ public int getAfterColumnsCount() { if (afterColumnsBuilder_ == null) { return afterColumns_.size(); @@ -7045,13 +7398,14 @@ public final class CanalEntry { return afterColumnsBuilder_.getCount(); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-       ** 字段信息,增量数据(修改后,新增后)  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+             * * 字段信息,增量数据(修改后,新增后)  *
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Column getAfterColumns(int index) { if (afterColumnsBuilder_ == null) { return afterColumns_.get(index); @@ -7059,13 +7413,14 @@ public final class CanalEntry { return afterColumnsBuilder_.getMessage(index); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-       ** 字段信息,增量数据(修改后,新增后)  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+             * * 字段信息,增量数据(修改后,新增后)  *
+             * 
+ */ public Builder setAfterColumns( int index, com.alibaba.otter.canal.protocol.CanalEntry.Column value) { if (afterColumnsBuilder_ == null) { @@ -7080,13 +7435,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-       ** 字段信息,增量数据(修改后,新增后)  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+             * * 字段信息,增量数据(修改后,新增后)  *
+             * 
+ */ public Builder setAfterColumns( int index, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { if (afterColumnsBuilder_ == null) { @@ -7098,13 +7454,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-       ** 字段信息,增量数据(修改后,新增后)  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+             * * 字段信息,增量数据(修改后,新增后)  *
+             * 
+ */ public Builder addAfterColumns(com.alibaba.otter.canal.protocol.CanalEntry.Column value) { if (afterColumnsBuilder_ == null) { if (value == null) { @@ -7118,13 +7475,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-       ** 字段信息,增量数据(修改后,新增后)  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+             * * 字段信息,增量数据(修改后,新增后)  *
+             * 
+ */ public Builder addAfterColumns( int index, com.alibaba.otter.canal.protocol.CanalEntry.Column value) { if (afterColumnsBuilder_ == null) { @@ -7139,13 +7497,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-       ** 字段信息,增量数据(修改后,新增后)  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+             * * 字段信息,增量数据(修改后,新增后)  *
+             * 
+ */ public Builder addAfterColumns( com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { if (afterColumnsBuilder_ == null) { @@ -7157,13 +7516,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-       ** 字段信息,增量数据(修改后,新增后)  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+             * * 字段信息,增量数据(修改后,新增后)  *
+             * 
+ */ public Builder addAfterColumns( int index, com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder builderForValue) { if (afterColumnsBuilder_ == null) { @@ -7175,13 +7535,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-       ** 字段信息,增量数据(修改后,新增后)  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+             * * 字段信息,增量数据(修改后,新增后)  *
+             * 
+ */ public Builder addAllAfterColumns( java.lang.Iterable values) { if (afterColumnsBuilder_ == null) { @@ -7194,13 +7555,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-       ** 字段信息,增量数据(修改后,新增后)  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+             * * 字段信息,增量数据(修改后,新增后)  *
+             * 
+ */ public Builder clearAfterColumns() { if (afterColumnsBuilder_ == null) { afterColumns_ = java.util.Collections.emptyList(); @@ -7211,13 +7573,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-       ** 字段信息,增量数据(修改后,新增后)  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+             * * 字段信息,增量数据(修改后,新增后)  *
+             * 
+ */ public Builder removeAfterColumns(int index) { if (afterColumnsBuilder_ == null) { ensureAfterColumnsIsMutable(); @@ -7228,24 +7591,26 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-       ** 字段信息,增量数据(修改后,新增后)  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+             * * 字段信息,增量数据(修改后,新增后)  *
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder getAfterColumnsBuilder( int index) { return getAfterColumnsFieldBuilder().getBuilder(index); } - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-       ** 字段信息,增量数据(修改后,新增后)  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+             * * 字段信息,增量数据(修改后,新增后)  *
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder getAfterColumnsOrBuilder( int index) { if (afterColumnsBuilder_ == null) { @@ -7253,13 +7618,14 @@ public final class CanalEntry { return afterColumnsBuilder_.getMessageOrBuilder(index); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-       ** 字段信息,增量数据(修改后,新增后)  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+             * * 字段信息,增量数据(修改后,新增后)  *
+             * 
+ */ public java.util.List getAfterColumnsOrBuilderList() { if (afterColumnsBuilder_ != null) { @@ -7268,36 +7634,39 @@ public final class CanalEntry { return java.util.Collections.unmodifiableList(afterColumns_); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-       ** 字段信息,增量数据(修改后,新增后)  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+             * * 字段信息,增量数据(修改后,新增后)  *
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder addAfterColumnsBuilder() { return getAfterColumnsFieldBuilder().addBuilder( com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance()); } - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-       ** 字段信息,增量数据(修改后,新增后)  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+             * * 字段信息,增量数据(修改后,新增后)  *
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Column.Builder addAfterColumnsBuilder( int index) { return getAfterColumnsFieldBuilder().addBuilder( index, com.alibaba.otter.canal.protocol.CanalEntry.Column.getDefaultInstance()); } - /** - * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; - * - *
-       ** 字段信息,增量数据(修改后,新增后)  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2; + * + *
+             * * 字段信息,增量数据(修改后,新增后)  *
+             * 
+ */ public java.util.List getAfterColumnsBuilderList() { return getAfterColumnsFieldBuilder().getBuilderList(); @@ -7329,13 +7698,13 @@ public final class CanalEntry { private com.google.protobuf.RepeatedFieldBuilder< com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> propsBuilder_; - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public java.util.List getPropsList() { if (propsBuilder_ == null) { return java.util.Collections.unmodifiableList(props_); @@ -7343,13 +7712,14 @@ public final class CanalEntry { return propsBuilder_.getMessageList(); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public int getPropsCount() { if (propsBuilder_ == null) { return props_.size(); @@ -7357,13 +7727,14 @@ public final class CanalEntry { return propsBuilder_.getCount(); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { if (propsBuilder_ == null) { return props_.get(index); @@ -7371,13 +7742,14 @@ public final class CanalEntry { return propsBuilder_.getMessage(index); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder setProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { @@ -7392,13 +7764,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder setProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -7410,13 +7783,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { @@ -7430,13 +7804,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { @@ -7451,13 +7826,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addProps( com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -7469,13 +7845,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -7487,13 +7864,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addAllProps( java.lang.Iterable values) { if (propsBuilder_ == null) { @@ -7506,13 +7884,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder clearProps() { if (propsBuilder_ == null) { props_ = java.util.Collections.emptyList(); @@ -7523,13 +7902,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder removeProps(int index) { if (propsBuilder_ == null) { ensurePropsIsMutable(); @@ -7540,24 +7920,26 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder getPropsBuilder( int index) { return getPropsFieldBuilder().getBuilder(index); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { if (propsBuilder_ == null) { @@ -7565,13 +7947,14 @@ public final class CanalEntry { return propsBuilder_.getMessageOrBuilder(index); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public java.util.List getPropsOrBuilderList() { if (propsBuilder_ != null) { @@ -7580,36 +7963,39 @@ public final class CanalEntry { return java.util.Collections.unmodifiableList(props_); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { return getPropsFieldBuilder().addBuilder( com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder( int index) { return getPropsFieldBuilder().addBuilder( index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public java.util.List getPropsBuilderList() { return getPropsFieldBuilder().getBuilderList(); @@ -7644,204 +8030,220 @@ public final class CanalEntry { // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.RowChange) com.google.protobuf.MessageOrBuilder { - /** - * optional int64 tableId = 1; - * - *
-     **tableId,由数据库产生*
-     * 
- */ + /** + * optional int64 tableId = 1; + * + *
+         * *tableId,由数据库产生*
+         * 
+ */ boolean hasTableId(); - /** - * optional int64 tableId = 1; - * - *
-     **tableId,由数据库产生*
-     * 
- */ + + /** + * optional int64 tableId = 1; + * + *
+         * *tableId,由数据库产生*
+         * 
+ */ long getTableId(); - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; - * - *
-     **数据变更类型*
-     * 
- */ + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + * + *
+         * *数据变更类型*
+         * 
+ */ boolean hasEventType(); - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; - * - *
-     **数据变更类型*
-     * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + * + *
+         * *数据变更类型*
+         * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType(); - /** - * optional bool isDdl = 10 [default = false]; - * - *
-     ** 标识是否是ddl语句  *
-     * 
- */ + /** + * optional bool isDdl = 10 [default = false]; + * + *
+         * * 标识是否是ddl语句  *
+         * 
+ */ boolean hasIsDdl(); - /** - * optional bool isDdl = 10 [default = false]; - * - *
-     ** 标识是否是ddl语句  *
-     * 
- */ + + /** + * optional bool isDdl = 10 [default = false]; + * + *
+         * * 标识是否是ddl语句  *
+         * 
+ */ boolean getIsDdl(); - /** - * optional string sql = 11; - * - *
-     ** ddl/query的sql语句  *
-     * 
- */ + /** + * optional string sql = 11; + * + *
+         * * ddl/query的sql语句  *
+         * 
+ */ boolean hasSql(); - /** - * optional string sql = 11; - * - *
-     ** ddl/query的sql语句  *
-     * 
- */ + + /** + * optional string sql = 11; + * + *
+         * * ddl/query的sql语句  *
+         * 
+ */ java.lang.String getSql(); - /** - * optional string sql = 11; - * - *
-     ** ddl/query的sql语句  *
-     * 
- */ + + /** + * optional string sql = 11; + * + *
+         * * ddl/query的sql语句  *
+         * 
+ */ com.google.protobuf.ByteString getSqlBytes(); - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-     ** 一次数据库变更可能存在多行  *
-     * 
- */ + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+         * * 一次数据库变更可能存在多行  *
+         * 
+ */ java.util.List getRowDatasList(); - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-     ** 一次数据库变更可能存在多行  *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+         * * 一次数据库变更可能存在多行  *
+         * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.RowData getRowDatas(int index); - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-     ** 一次数据库变更可能存在多行  *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+         * * 一次数据库变更可能存在多行  *
+         * 
+ */ int getRowDatasCount(); - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-     ** 一次数据库变更可能存在多行  *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+         * * 一次数据库变更可能存在多行  *
+         * 
+ */ java.util.List getRowDatasOrBuilderList(); - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-     ** 一次数据库变更可能存在多行  *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+         * * 一次数据库变更可能存在多行  *
+         * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder getRowDatasOrBuilder( int index); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-     **预留扩展*
-     * 
- */ + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+         * *预留扩展*
+         * 
+ */ java.util.List getPropsList(); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+         * *预留扩展*
+         * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+         * *预留扩展*
+         * 
+ */ int getPropsCount(); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+         * *预留扩展*
+         * 
+ */ java.util.List getPropsOrBuilderList(); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+         * *预留扩展*
+         * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index); - /** - * optional string ddlSchemaName = 14; - * - *
-     ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-     * 
- */ + /** + * optional string ddlSchemaName = 14; + * + *
+         * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+         * 
+ */ boolean hasDdlSchemaName(); - /** - * optional string ddlSchemaName = 14; - * - *
-     ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-     * 
- */ + + /** + * optional string ddlSchemaName = 14; + * + *
+         * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+         * 
+ */ java.lang.String getDdlSchemaName(); - /** - * optional string ddlSchemaName = 14; - * - *
-     ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-     * 
- */ + + /** + * optional string ddlSchemaName = 14; + * + *
+         * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+         * 
+ */ com.google.protobuf.ByteString getDdlSchemaNameBytes(); } - /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.RowChange} - * - *
-   **message row 每行变更数据的数据结构*
-   * 
- */ + + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.RowChange} + * + *
+     * *message row 每行变更数据的数据结构*
+     * 
+ */ public static final class RowChange extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.RowChange) @@ -7988,92 +8390,100 @@ public final class CanalEntry { private int bitField0_; public static final int TABLEID_FIELD_NUMBER = 1; private long tableId_; - /** - * optional int64 tableId = 1; - * - *
-     **tableId,由数据库产生*
-     * 
- */ + + /** + * optional int64 tableId = 1; + * + *
+         * *tableId,由数据库产生*
+         * 
+ */ public boolean hasTableId() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int64 tableId = 1; - * - *
-     **tableId,由数据库产生*
-     * 
- */ + + /** + * optional int64 tableId = 1; + * + *
+         * *tableId,由数据库产生*
+         * 
+ */ public long getTableId() { return tableId_; } public static final int EVENTTYPE_FIELD_NUMBER = 2; private com.alibaba.otter.canal.protocol.CanalEntry.EventType eventType_; - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; - * - *
-     **数据变更类型*
-     * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + * + *
+         * *数据变更类型*
+         * 
+ */ public boolean hasEventType() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; - * - *
-     **数据变更类型*
-     * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + * + *
+         * *数据变更类型*
+         * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType() { return eventType_; } public static final int ISDDL_FIELD_NUMBER = 10; private boolean isDdl_; - /** - * optional bool isDdl = 10 [default = false]; - * - *
-     ** 标识是否是ddl语句  *
-     * 
- */ + + /** + * optional bool isDdl = 10 [default = false]; + * + *
+         * * 标识是否是ddl语句  *
+         * 
+ */ public boolean hasIsDdl() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional bool isDdl = 10 [default = false]; - * - *
-     ** 标识是否是ddl语句  *
-     * 
- */ + + /** + * optional bool isDdl = 10 [default = false]; + * + *
+         * * 标识是否是ddl语句  *
+         * 
+ */ public boolean getIsDdl() { return isDdl_; } public static final int SQL_FIELD_NUMBER = 11; private java.lang.Object sql_; - /** - * optional string sql = 11; - * - *
-     ** ddl/query的sql语句  *
-     * 
- */ + + /** + * optional string sql = 11; + * + *
+         * * ddl/query的sql语句  *
+         * 
+ */ public boolean hasSql() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional string sql = 11; - * - *
-     ** ddl/query的sql语句  *
-     * 
- */ + + /** + * optional string sql = 11; + * + *
+         * * ddl/query的sql语句  *
+         * 
+ */ public java.lang.String getSql() { java.lang.Object ref = sql_; if (ref instanceof java.lang.String) { @@ -8088,13 +8498,14 @@ public final class CanalEntry { return s; } } - /** - * optional string sql = 11; - * - *
-     ** ddl/query的sql语句  *
-     * 
- */ + + /** + * optional string sql = 11; + * + *
+         * * ddl/query的sql语句  *
+         * 
+ */ public com.google.protobuf.ByteString getSqlBytes() { java.lang.Object ref = sql_; @@ -8111,54 +8522,59 @@ public final class CanalEntry { public static final int ROWDATAS_FIELD_NUMBER = 12; private java.util.List rowDatas_; - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-     ** 一次数据库变更可能存在多行  *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+         * * 一次数据库变更可能存在多行  *
+         * 
+ */ public java.util.List getRowDatasList() { return rowDatas_; } - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-     ** 一次数据库变更可能存在多行  *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+         * * 一次数据库变更可能存在多行  *
+         * 
+ */ public java.util.List getRowDatasOrBuilderList() { return rowDatas_; } - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-     ** 一次数据库变更可能存在多行  *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+         * * 一次数据库变更可能存在多行  *
+         * 
+ */ public int getRowDatasCount() { return rowDatas_.size(); } - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-     ** 一次数据库变更可能存在多行  *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+         * * 一次数据库变更可能存在多行  *
+         * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.RowData getRowDatas(int index) { return rowDatas_.get(index); } - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-     ** 一次数据库变更可能存在多行  *
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+         * * 一次数据库变更可能存在多行  *
+         * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder getRowDatasOrBuilder( int index) { return rowDatas_.get(index); @@ -8166,54 +8582,59 @@ public final class CanalEntry { public static final int PROPS_FIELD_NUMBER = 13; private java.util.List props_; - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+         * *预留扩展*
+         * 
+ */ public java.util.List getPropsList() { return props_; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+         * *预留扩展*
+         * 
+ */ public java.util.List getPropsOrBuilderList() { return props_; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+         * *预留扩展*
+         * 
+ */ public int getPropsCount() { return props_.size(); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+         * *预留扩展*
+         * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { return props_.get(index); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+         * *预留扩展*
+         * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { return props_.get(index); @@ -8221,23 +8642,25 @@ public final class CanalEntry { public static final int DDLSCHEMANAME_FIELD_NUMBER = 14; private java.lang.Object ddlSchemaName_; - /** - * optional string ddlSchemaName = 14; - * - *
-     ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-     * 
- */ + + /** + * optional string ddlSchemaName = 14; + * + *
+         * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+         * 
+ */ public boolean hasDdlSchemaName() { return ((bitField0_ & 0x00000010) == 0x00000010); } - /** - * optional string ddlSchemaName = 14; - * - *
-     ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-     * 
- */ + + /** + * optional string ddlSchemaName = 14; + * + *
+         * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+         * 
+ */ public java.lang.String getDdlSchemaName() { java.lang.Object ref = ddlSchemaName_; if (ref instanceof java.lang.String) { @@ -8252,13 +8675,14 @@ public final class CanalEntry { return s; } } - /** - * optional string ddlSchemaName = 14; - * - *
-     ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-     * 
- */ + + /** + * optional string ddlSchemaName = 14; + * + *
+         * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+         * 
+ */ public com.google.protobuf.ByteString getDdlSchemaNameBytes() { java.lang.Object ref = ddlSchemaName_; @@ -8431,13 +8855,14 @@ public final class CanalEntry { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.RowChange} - * - *
-     **message row 每行变更数据的数据结构*
-     * 
- */ + + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.RowChange} + * + *
+         * *message row 每行变更数据的数据结构*
+         * 
+ */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.RowChange) @@ -8679,46 +9104,50 @@ public final class CanalEntry { private int bitField0_; private long tableId_ ; - /** - * optional int64 tableId = 1; - * - *
-       **tableId,由数据库产生*
-       * 
- */ + + /** + * optional int64 tableId = 1; + * + *
+             * *tableId,由数据库产生*
+             * 
+ */ public boolean hasTableId() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int64 tableId = 1; - * - *
-       **tableId,由数据库产生*
-       * 
- */ + + /** + * optional int64 tableId = 1; + * + *
+             * *tableId,由数据库产生*
+             * 
+ */ public long getTableId() { return tableId_; } - /** - * optional int64 tableId = 1; - * - *
-       **tableId,由数据库产生*
-       * 
- */ + + /** + * optional int64 tableId = 1; + * + *
+             * *tableId,由数据库产生*
+             * 
+ */ public Builder setTableId(long value) { bitField0_ |= 0x00000001; tableId_ = value; onChanged(); return this; } - /** - * optional int64 tableId = 1; - * - *
-       **tableId,由数据库产生*
-       * 
- */ + + /** + * optional int64 tableId = 1; + * + *
+             * *tableId,由数据库产生*
+             * 
+ */ public Builder clearTableId() { bitField0_ = (bitField0_ & ~0x00000001); tableId_ = 0L; @@ -8727,33 +9156,36 @@ public final class CanalEntry { } private com.alibaba.otter.canal.protocol.CanalEntry.EventType eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; - * - *
-       **数据变更类型*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + * + *
+             * *数据变更类型*
+             * 
+ */ public boolean hasEventType() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; - * - *
-       **数据变更类型*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + * + *
+             * *数据变更类型*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.EventType getEventType() { return eventType_; } - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; - * - *
-       **数据变更类型*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + * + *
+             * *数据变更类型*
+             * 
+ */ public Builder setEventType(com.alibaba.otter.canal.protocol.CanalEntry.EventType value) { if (value == null) { throw new NullPointerException(); @@ -8763,13 +9195,14 @@ public final class CanalEntry { onChanged(); return this; } - /** - * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; - * - *
-       **数据变更类型*
-       * 
- */ + + /** + * optional .com.alibaba.otter.canal.protocol.EventType eventType = 2 [default = UPDATE]; + * + *
+             * *数据变更类型*
+             * 
+ */ public Builder clearEventType() { bitField0_ = (bitField0_ & ~0x00000002); eventType_ = com.alibaba.otter.canal.protocol.CanalEntry.EventType.UPDATE; @@ -8778,46 +9211,50 @@ public final class CanalEntry { } private boolean isDdl_ ; - /** - * optional bool isDdl = 10 [default = false]; - * - *
-       ** 标识是否是ddl语句  *
-       * 
- */ + + /** + * optional bool isDdl = 10 [default = false]; + * + *
+             * * 标识是否是ddl语句  *
+             * 
+ */ public boolean hasIsDdl() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional bool isDdl = 10 [default = false]; - * - *
-       ** 标识是否是ddl语句  *
-       * 
- */ + + /** + * optional bool isDdl = 10 [default = false]; + * + *
+             * * 标识是否是ddl语句  *
+             * 
+ */ public boolean getIsDdl() { return isDdl_; } - /** - * optional bool isDdl = 10 [default = false]; - * - *
-       ** 标识是否是ddl语句  *
-       * 
- */ + + /** + * optional bool isDdl = 10 [default = false]; + * + *
+             * * 标识是否是ddl语句  *
+             * 
+ */ public Builder setIsDdl(boolean value) { bitField0_ |= 0x00000004; isDdl_ = value; onChanged(); return this; } - /** - * optional bool isDdl = 10 [default = false]; - * - *
-       ** 标识是否是ddl语句  *
-       * 
- */ + + /** + * optional bool isDdl = 10 [default = false]; + * + *
+             * * 标识是否是ddl语句  *
+             * 
+ */ public Builder clearIsDdl() { bitField0_ = (bitField0_ & ~0x00000004); isDdl_ = false; @@ -8826,23 +9263,25 @@ public final class CanalEntry { } private java.lang.Object sql_ = ""; - /** - * optional string sql = 11; - * - *
-       ** ddl/query的sql语句  *
-       * 
- */ + + /** + * optional string sql = 11; + * + *
+             * * ddl/query的sql语句  *
+             * 
+ */ public boolean hasSql() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional string sql = 11; - * - *
-       ** ddl/query的sql语句  *
-       * 
- */ + + /** + * optional string sql = 11; + * + *
+             * * ddl/query的sql语句  *
+             * 
+ */ public java.lang.String getSql() { java.lang.Object ref = sql_; if (!(ref instanceof java.lang.String)) { @@ -8857,13 +9296,14 @@ public final class CanalEntry { return (java.lang.String) ref; } } - /** - * optional string sql = 11; - * - *
-       ** ddl/query的sql语句  *
-       * 
- */ + + /** + * optional string sql = 11; + * + *
+             * * ddl/query的sql语句  *
+             * 
+ */ public com.google.protobuf.ByteString getSqlBytes() { java.lang.Object ref = sql_; @@ -8877,13 +9317,14 @@ public final class CanalEntry { return (com.google.protobuf.ByteString) ref; } } - /** - * optional string sql = 11; - * - *
-       ** ddl/query的sql语句  *
-       * 
- */ + + /** + * optional string sql = 11; + * + *
+             * * ddl/query的sql语句  *
+             * 
+ */ public Builder setSql( java.lang.String value) { if (value == null) { @@ -8894,26 +9335,28 @@ public final class CanalEntry { onChanged(); return this; } - /** - * optional string sql = 11; - * - *
-       ** ddl/query的sql语句  *
-       * 
- */ + + /** + * optional string sql = 11; + * + *
+             * * ddl/query的sql语句  *
+             * 
+ */ public Builder clearSql() { bitField0_ = (bitField0_ & ~0x00000008); sql_ = getDefaultInstance().getSql(); onChanged(); return this; } - /** - * optional string sql = 11; - * - *
-       ** ddl/query的sql语句  *
-       * 
- */ + + /** + * optional string sql = 11; + * + *
+             * * ddl/query的sql语句  *
+             * 
+ */ public Builder setSqlBytes( com.google.protobuf.ByteString value) { if (value == null) { @@ -8937,13 +9380,13 @@ public final class CanalEntry { private com.google.protobuf.RepeatedFieldBuilder< com.alibaba.otter.canal.protocol.CanalEntry.RowData, com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder, com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder> rowDatasBuilder_; - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-       ** 一次数据库变更可能存在多行  *
-       * 
- */ + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+             * * 一次数据库变更可能存在多行  *
+             * 
+ */ public java.util.List getRowDatasList() { if (rowDatasBuilder_ == null) { return java.util.Collections.unmodifiableList(rowDatas_); @@ -8951,13 +9394,14 @@ public final class CanalEntry { return rowDatasBuilder_.getMessageList(); } } - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-       ** 一次数据库变更可能存在多行  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+             * * 一次数据库变更可能存在多行  *
+             * 
+ */ public int getRowDatasCount() { if (rowDatasBuilder_ == null) { return rowDatas_.size(); @@ -8965,13 +9409,14 @@ public final class CanalEntry { return rowDatasBuilder_.getCount(); } } - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-       ** 一次数据库变更可能存在多行  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+             * * 一次数据库变更可能存在多行  *
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.RowData getRowDatas(int index) { if (rowDatasBuilder_ == null) { return rowDatas_.get(index); @@ -8979,13 +9424,14 @@ public final class CanalEntry { return rowDatasBuilder_.getMessage(index); } } - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-       ** 一次数据库变更可能存在多行  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+             * * 一次数据库变更可能存在多行  *
+             * 
+ */ public Builder setRowDatas( int index, com.alibaba.otter.canal.protocol.CanalEntry.RowData value) { if (rowDatasBuilder_ == null) { @@ -9000,13 +9446,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-       ** 一次数据库变更可能存在多行  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+             * * 一次数据库变更可能存在多行  *
+             * 
+ */ public Builder setRowDatas( int index, com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder builderForValue) { if (rowDatasBuilder_ == null) { @@ -9018,13 +9465,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-       ** 一次数据库变更可能存在多行  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+             * * 一次数据库变更可能存在多行  *
+             * 
+ */ public Builder addRowDatas(com.alibaba.otter.canal.protocol.CanalEntry.RowData value) { if (rowDatasBuilder_ == null) { if (value == null) { @@ -9038,13 +9486,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-       ** 一次数据库变更可能存在多行  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+             * * 一次数据库变更可能存在多行  *
+             * 
+ */ public Builder addRowDatas( int index, com.alibaba.otter.canal.protocol.CanalEntry.RowData value) { if (rowDatasBuilder_ == null) { @@ -9059,13 +9508,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-       ** 一次数据库变更可能存在多行  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+             * * 一次数据库变更可能存在多行  *
+             * 
+ */ public Builder addRowDatas( com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder builderForValue) { if (rowDatasBuilder_ == null) { @@ -9077,13 +9527,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-       ** 一次数据库变更可能存在多行  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+             * * 一次数据库变更可能存在多行  *
+             * 
+ */ public Builder addRowDatas( int index, com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder builderForValue) { if (rowDatasBuilder_ == null) { @@ -9095,13 +9546,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-       ** 一次数据库变更可能存在多行  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+             * * 一次数据库变更可能存在多行  *
+             * 
+ */ public Builder addAllRowDatas( java.lang.Iterable values) { if (rowDatasBuilder_ == null) { @@ -9114,13 +9566,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-       ** 一次数据库变更可能存在多行  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+             * * 一次数据库变更可能存在多行  *
+             * 
+ */ public Builder clearRowDatas() { if (rowDatasBuilder_ == null) { rowDatas_ = java.util.Collections.emptyList(); @@ -9131,13 +9584,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-       ** 一次数据库变更可能存在多行  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+             * * 一次数据库变更可能存在多行  *
+             * 
+ */ public Builder removeRowDatas(int index) { if (rowDatasBuilder_ == null) { ensureRowDatasIsMutable(); @@ -9148,24 +9602,26 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-       ** 一次数据库变更可能存在多行  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+             * * 一次数据库变更可能存在多行  *
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder getRowDatasBuilder( int index) { return getRowDatasFieldBuilder().getBuilder(index); } - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-       ** 一次数据库变更可能存在多行  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+             * * 一次数据库变更可能存在多行  *
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder getRowDatasOrBuilder( int index) { if (rowDatasBuilder_ == null) { @@ -9173,13 +9629,14 @@ public final class CanalEntry { return rowDatasBuilder_.getMessageOrBuilder(index); } } - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-       ** 一次数据库变更可能存在多行  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+             * * 一次数据库变更可能存在多行  *
+             * 
+ */ public java.util.List getRowDatasOrBuilderList() { if (rowDatasBuilder_ != null) { @@ -9188,36 +9645,39 @@ public final class CanalEntry { return java.util.Collections.unmodifiableList(rowDatas_); } } - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-       ** 一次数据库变更可能存在多行  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+             * * 一次数据库变更可能存在多行  *
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder addRowDatasBuilder() { return getRowDatasFieldBuilder().addBuilder( com.alibaba.otter.canal.protocol.CanalEntry.RowData.getDefaultInstance()); } - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-       ** 一次数据库变更可能存在多行  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+             * * 一次数据库变更可能存在多行  *
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.RowData.Builder addRowDatasBuilder( int index) { return getRowDatasFieldBuilder().addBuilder( index, com.alibaba.otter.canal.protocol.CanalEntry.RowData.getDefaultInstance()); } - /** - * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; - * - *
-       ** 一次数据库变更可能存在多行  *
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12; + * + *
+             * * 一次数据库变更可能存在多行  *
+             * 
+ */ public java.util.List getRowDatasBuilderList() { return getRowDatasFieldBuilder().getBuilderList(); @@ -9249,13 +9709,13 @@ public final class CanalEntry { private com.google.protobuf.RepeatedFieldBuilder< com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> propsBuilder_; - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-       **预留扩展*
-       * 
- */ + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+             * *预留扩展*
+             * 
+ */ public java.util.List getPropsList() { if (propsBuilder_ == null) { return java.util.Collections.unmodifiableList(props_); @@ -9263,13 +9723,14 @@ public final class CanalEntry { return propsBuilder_.getMessageList(); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+             * *预留扩展*
+             * 
+ */ public int getPropsCount() { if (propsBuilder_ == null) { return props_.size(); @@ -9277,13 +9738,14 @@ public final class CanalEntry { return propsBuilder_.getCount(); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { if (propsBuilder_ == null) { return props_.get(index); @@ -9291,13 +9753,14 @@ public final class CanalEntry { return propsBuilder_.getMessage(index); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder setProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { @@ -9312,13 +9775,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder setProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -9330,13 +9794,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { @@ -9350,13 +9815,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { @@ -9371,13 +9837,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addProps( com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -9389,13 +9856,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -9407,13 +9875,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addAllProps( java.lang.Iterable values) { if (propsBuilder_ == null) { @@ -9426,13 +9895,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder clearProps() { if (propsBuilder_ == null) { props_ = java.util.Collections.emptyList(); @@ -9443,13 +9913,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder removeProps(int index) { if (propsBuilder_ == null) { ensurePropsIsMutable(); @@ -9460,24 +9931,26 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder getPropsBuilder( int index) { return getPropsFieldBuilder().getBuilder(index); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { if (propsBuilder_ == null) { @@ -9485,13 +9958,14 @@ public final class CanalEntry { return propsBuilder_.getMessageOrBuilder(index); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+             * *预留扩展*
+             * 
+ */ public java.util.List getPropsOrBuilderList() { if (propsBuilder_ != null) { @@ -9500,36 +9974,39 @@ public final class CanalEntry { return java.util.Collections.unmodifiableList(props_); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { return getPropsFieldBuilder().addBuilder( com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder( int index) { return getPropsFieldBuilder().addBuilder( index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 13; + * + *
+             * *预留扩展*
+             * 
+ */ public java.util.List getPropsBuilderList() { return getPropsFieldBuilder().getBuilderList(); @@ -9550,23 +10027,25 @@ public final class CanalEntry { } private java.lang.Object ddlSchemaName_ = ""; - /** - * optional string ddlSchemaName = 14; - * - *
-       ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-       * 
- */ + + /** + * optional string ddlSchemaName = 14; + * + *
+             * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+             * 
+ */ public boolean hasDdlSchemaName() { return ((bitField0_ & 0x00000040) == 0x00000040); } - /** - * optional string ddlSchemaName = 14; - * - *
-       ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-       * 
- */ + + /** + * optional string ddlSchemaName = 14; + * + *
+             * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+             * 
+ */ public java.lang.String getDdlSchemaName() { java.lang.Object ref = ddlSchemaName_; if (!(ref instanceof java.lang.String)) { @@ -9581,13 +10060,14 @@ public final class CanalEntry { return (java.lang.String) ref; } } - /** - * optional string ddlSchemaName = 14; - * - *
-       ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-       * 
- */ + + /** + * optional string ddlSchemaName = 14; + * + *
+             * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+             * 
+ */ public com.google.protobuf.ByteString getDdlSchemaNameBytes() { java.lang.Object ref = ddlSchemaName_; @@ -9601,13 +10081,14 @@ public final class CanalEntry { return (com.google.protobuf.ByteString) ref; } } - /** - * optional string ddlSchemaName = 14; - * - *
-       ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-       * 
- */ + + /** + * optional string ddlSchemaName = 14; + * + *
+             * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+             * 
+ */ public Builder setDdlSchemaName( java.lang.String value) { if (value == null) { @@ -9618,26 +10099,28 @@ public final class CanalEntry { onChanged(); return this; } - /** - * optional string ddlSchemaName = 14; - * - *
-       ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-       * 
- */ + + /** + * optional string ddlSchemaName = 14; + * + *
+             * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+             * 
+ */ public Builder clearDdlSchemaName() { bitField0_ = (bitField0_ & ~0x00000040); ddlSchemaName_ = getDefaultInstance().getDdlSchemaName(); onChanged(); return this; } - /** - * optional string ddlSchemaName = 14; - * - *
-       ** ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
-       * 
- */ + + /** + * optional string ddlSchemaName = 14; + * + *
+             * * ddl/query的schemaName,会存在跨库ddl,需要保留执行ddl的当前schemaName  *
+             * 
+ */ public Builder setDdlSchemaNameBytes( com.google.protobuf.ByteString value) { if (value == null) { @@ -9664,117 +10147,126 @@ public final class CanalEntry { // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.TransactionBegin) com.google.protobuf.MessageOrBuilder { - /** - * optional int64 executeTime = 1; - * - *
-     **已废弃,请使用header里的executeTime*
-     * 
- */ + /** + * optional int64 executeTime = 1; + * + *
+         * *已废弃,请使用header里的executeTime*
+         * 
+ */ boolean hasExecuteTime(); - /** - * optional int64 executeTime = 1; - * - *
-     **已废弃,请使用header里的executeTime*
-     * 
- */ + + /** + * optional int64 executeTime = 1; + * + *
+         * *已废弃,请使用header里的executeTime*
+         * 
+ */ long getExecuteTime(); - /** - * optional string transactionId = 2; - * - *
-     **已废弃,Begin里不提供事务id*
-     * 
- */ + /** + * optional string transactionId = 2; + * + *
+         * *已废弃,Begin里不提供事务id*
+         * 
+ */ boolean hasTransactionId(); - /** - * optional string transactionId = 2; - * - *
-     **已废弃,Begin里不提供事务id*
-     * 
- */ + + /** + * optional string transactionId = 2; + * + *
+         * *已废弃,Begin里不提供事务id*
+         * 
+ */ java.lang.String getTransactionId(); - /** - * optional string transactionId = 2; - * - *
-     **已废弃,Begin里不提供事务id*
-     * 
- */ + + /** + * optional string transactionId = 2; + * + *
+         * *已废弃,Begin里不提供事务id*
+         * 
+ */ com.google.protobuf.ByteString getTransactionIdBytes(); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ java.util.List getPropsList(); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ int getPropsCount(); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ java.util.List getPropsOrBuilderList(); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index); - /** - * optional int64 threadId = 4; - * - *
-     **执行的thread Id*
-     * 
- */ + /** + * optional int64 threadId = 4; + * + *
+         * *执行的thread Id*
+         * 
+ */ boolean hasThreadId(); - /** - * optional int64 threadId = 4; - * - *
-     **执行的thread Id*
-     * 
- */ + + /** + * optional int64 threadId = 4; + * + *
+         * *执行的thread Id*
+         * 
+ */ long getThreadId(); } - /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.TransactionBegin} - * - *
-   **开始事务的一些信息*
-   * 
- */ + + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.TransactionBegin} + * + *
+     * *开始事务的一些信息*
+     * 
+ */ public static final class TransactionBegin extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.TransactionBegin) @@ -9893,46 +10385,50 @@ public final class CanalEntry { private int bitField0_; public static final int EXECUTETIME_FIELD_NUMBER = 1; private long executeTime_; - /** - * optional int64 executeTime = 1; - * - *
-     **已废弃,请使用header里的executeTime*
-     * 
- */ + + /** + * optional int64 executeTime = 1; + * + *
+         * *已废弃,请使用header里的executeTime*
+         * 
+ */ public boolean hasExecuteTime() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int64 executeTime = 1; - * - *
-     **已废弃,请使用header里的executeTime*
-     * 
- */ + + /** + * optional int64 executeTime = 1; + * + *
+         * *已废弃,请使用header里的executeTime*
+         * 
+ */ public long getExecuteTime() { return executeTime_; } public static final int TRANSACTIONID_FIELD_NUMBER = 2; private java.lang.Object transactionId_; - /** - * optional string transactionId = 2; - * - *
-     **已废弃,Begin里不提供事务id*
-     * 
- */ + + /** + * optional string transactionId = 2; + * + *
+         * *已废弃,Begin里不提供事务id*
+         * 
+ */ public boolean hasTransactionId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional string transactionId = 2; - * - *
-     **已废弃,Begin里不提供事务id*
-     * 
- */ + + /** + * optional string transactionId = 2; + * + *
+         * *已废弃,Begin里不提供事务id*
+         * 
+ */ public java.lang.String getTransactionId() { java.lang.Object ref = transactionId_; if (ref instanceof java.lang.String) { @@ -9947,13 +10443,14 @@ public final class CanalEntry { return s; } } - /** - * optional string transactionId = 2; - * - *
-     **已废弃,Begin里不提供事务id*
-     * 
- */ + + /** + * optional string transactionId = 2; + * + *
+         * *已废弃,Begin里不提供事务id*
+         * 
+ */ public com.google.protobuf.ByteString getTransactionIdBytes() { java.lang.Object ref = transactionId_; @@ -9970,54 +10467,59 @@ public final class CanalEntry { public static final int PROPS_FIELD_NUMBER = 3; private java.util.List props_; - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ public java.util.List getPropsList() { return props_; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ public java.util.List getPropsOrBuilderList() { return props_; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ public int getPropsCount() { return props_.size(); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { return props_.get(index); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { return props_.get(index); @@ -10025,23 +10527,25 @@ public final class CanalEntry { public static final int THREADID_FIELD_NUMBER = 4; private long threadId_; - /** - * optional int64 threadId = 4; - * - *
-     **执行的thread Id*
-     * 
- */ + + /** + * optional int64 threadId = 4; + * + *
+         * *执行的thread Id*
+         * 
+ */ public boolean hasThreadId() { return ((bitField0_ & 0x00000004) == 0x00000004); } - /** - * optional int64 threadId = 4; - * - *
-     **执行的thread Id*
-     * 
- */ + + /** + * optional int64 threadId = 4; + * + *
+         * *执行的thread Id*
+         * 
+ */ public long getThreadId() { return threadId_; } @@ -10180,13 +10684,15 @@ public final class CanalEntry { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.TransactionBegin} - * - *
-     **开始事务的一些信息*
-     * 
- */ + + /** + * Protobuf type + * {@code com.alibaba.otter.canal.protocol.TransactionBegin} + * + *
+         * *开始事务的一些信息*
+         * 
+ */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.TransactionBegin) @@ -10366,46 +10872,50 @@ public final class CanalEntry { private int bitField0_; private long executeTime_ ; - /** - * optional int64 executeTime = 1; - * - *
-       **已废弃,请使用header里的executeTime*
-       * 
- */ + + /** + * optional int64 executeTime = 1; + * + *
+             * *已废弃,请使用header里的executeTime*
+             * 
+ */ public boolean hasExecuteTime() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int64 executeTime = 1; - * - *
-       **已废弃,请使用header里的executeTime*
-       * 
- */ + + /** + * optional int64 executeTime = 1; + * + *
+             * *已废弃,请使用header里的executeTime*
+             * 
+ */ public long getExecuteTime() { return executeTime_; } - /** - * optional int64 executeTime = 1; - * - *
-       **已废弃,请使用header里的executeTime*
-       * 
- */ + + /** + * optional int64 executeTime = 1; + * + *
+             * *已废弃,请使用header里的executeTime*
+             * 
+ */ public Builder setExecuteTime(long value) { bitField0_ |= 0x00000001; executeTime_ = value; onChanged(); return this; } - /** - * optional int64 executeTime = 1; - * - *
-       **已废弃,请使用header里的executeTime*
-       * 
- */ + + /** + * optional int64 executeTime = 1; + * + *
+             * *已废弃,请使用header里的executeTime*
+             * 
+ */ public Builder clearExecuteTime() { bitField0_ = (bitField0_ & ~0x00000001); executeTime_ = 0L; @@ -10414,23 +10924,25 @@ public final class CanalEntry { } private java.lang.Object transactionId_ = ""; - /** - * optional string transactionId = 2; - * - *
-       **已废弃,Begin里不提供事务id*
-       * 
- */ + + /** + * optional string transactionId = 2; + * + *
+             * *已废弃,Begin里不提供事务id*
+             * 
+ */ public boolean hasTransactionId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional string transactionId = 2; - * - *
-       **已废弃,Begin里不提供事务id*
-       * 
- */ + + /** + * optional string transactionId = 2; + * + *
+             * *已废弃,Begin里不提供事务id*
+             * 
+ */ public java.lang.String getTransactionId() { java.lang.Object ref = transactionId_; if (!(ref instanceof java.lang.String)) { @@ -10445,13 +10957,14 @@ public final class CanalEntry { return (java.lang.String) ref; } } - /** - * optional string transactionId = 2; - * - *
-       **已废弃,Begin里不提供事务id*
-       * 
- */ + + /** + * optional string transactionId = 2; + * + *
+             * *已废弃,Begin里不提供事务id*
+             * 
+ */ public com.google.protobuf.ByteString getTransactionIdBytes() { java.lang.Object ref = transactionId_; @@ -10465,13 +10978,14 @@ public final class CanalEntry { return (com.google.protobuf.ByteString) ref; } } - /** - * optional string transactionId = 2; - * - *
-       **已废弃,Begin里不提供事务id*
-       * 
- */ + + /** + * optional string transactionId = 2; + * + *
+             * *已废弃,Begin里不提供事务id*
+             * 
+ */ public Builder setTransactionId( java.lang.String value) { if (value == null) { @@ -10482,26 +10996,28 @@ public final class CanalEntry { onChanged(); return this; } - /** - * optional string transactionId = 2; - * - *
-       **已废弃,Begin里不提供事务id*
-       * 
- */ + + /** + * optional string transactionId = 2; + * + *
+             * *已废弃,Begin里不提供事务id*
+             * 
+ */ public Builder clearTransactionId() { bitField0_ = (bitField0_ & ~0x00000002); transactionId_ = getDefaultInstance().getTransactionId(); onChanged(); return this; } - /** - * optional string transactionId = 2; - * - *
-       **已废弃,Begin里不提供事务id*
-       * 
- */ + + /** + * optional string transactionId = 2; + * + *
+             * *已废弃,Begin里不提供事务id*
+             * 
+ */ public Builder setTransactionIdBytes( com.google.protobuf.ByteString value) { if (value == null) { @@ -10525,13 +11041,13 @@ public final class CanalEntry { private com.google.protobuf.RepeatedFieldBuilder< com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> propsBuilder_; - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public java.util.List getPropsList() { if (propsBuilder_ == null) { return java.util.Collections.unmodifiableList(props_); @@ -10539,13 +11055,14 @@ public final class CanalEntry { return propsBuilder_.getMessageList(); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public int getPropsCount() { if (propsBuilder_ == null) { return props_.size(); @@ -10553,13 +11070,14 @@ public final class CanalEntry { return propsBuilder_.getCount(); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { if (propsBuilder_ == null) { return props_.get(index); @@ -10567,13 +11085,14 @@ public final class CanalEntry { return propsBuilder_.getMessage(index); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder setProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { @@ -10588,13 +11107,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder setProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -10606,13 +11126,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { @@ -10626,13 +11147,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { @@ -10647,13 +11169,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addProps( com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -10665,13 +11188,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -10683,13 +11207,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addAllProps( java.lang.Iterable values) { if (propsBuilder_ == null) { @@ -10702,13 +11227,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder clearProps() { if (propsBuilder_ == null) { props_ = java.util.Collections.emptyList(); @@ -10719,13 +11245,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder removeProps(int index) { if (propsBuilder_ == null) { ensurePropsIsMutable(); @@ -10736,24 +11263,26 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder getPropsBuilder( int index) { return getPropsFieldBuilder().getBuilder(index); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { if (propsBuilder_ == null) { @@ -10761,13 +11290,14 @@ public final class CanalEntry { return propsBuilder_.getMessageOrBuilder(index); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public java.util.List getPropsOrBuilderList() { if (propsBuilder_ != null) { @@ -10776,36 +11306,39 @@ public final class CanalEntry { return java.util.Collections.unmodifiableList(props_); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { return getPropsFieldBuilder().addBuilder( com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder( int index) { return getPropsFieldBuilder().addBuilder( index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public java.util.List getPropsBuilderList() { return getPropsFieldBuilder().getBuilderList(); @@ -10826,46 +11359,50 @@ public final class CanalEntry { } private long threadId_ ; - /** - * optional int64 threadId = 4; - * - *
-       **执行的thread Id*
-       * 
- */ + + /** + * optional int64 threadId = 4; + * + *
+             * *执行的thread Id*
+             * 
+ */ public boolean hasThreadId() { return ((bitField0_ & 0x00000008) == 0x00000008); } - /** - * optional int64 threadId = 4; - * - *
-       **执行的thread Id*
-       * 
- */ + + /** + * optional int64 threadId = 4; + * + *
+             * *执行的thread Id*
+             * 
+ */ public long getThreadId() { return threadId_; } - /** - * optional int64 threadId = 4; - * - *
-       **执行的thread Id*
-       * 
- */ + + /** + * optional int64 threadId = 4; + * + *
+             * *执行的thread Id*
+             * 
+ */ public Builder setThreadId(long value) { bitField0_ |= 0x00000008; threadId_ = value; onChanged(); return this; } - /** - * optional int64 threadId = 4; - * - *
-       **执行的thread Id*
-       * 
- */ + + /** + * optional int64 threadId = 4; + * + *
+             * *执行的thread Id*
+             * 
+ */ public Builder clearThreadId() { bitField0_ = (bitField0_ & ~0x00000008); threadId_ = 0L; @@ -10888,100 +11425,108 @@ public final class CanalEntry { // @@protoc_insertion_point(interface_extends:com.alibaba.otter.canal.protocol.TransactionEnd) com.google.protobuf.MessageOrBuilder { - /** - * optional int64 executeTime = 1; - * - *
-     **已废弃,请使用header里的executeTime*
-     * 
- */ + /** + * optional int64 executeTime = 1; + * + *
+         * *已废弃,请使用header里的executeTime*
+         * 
+ */ boolean hasExecuteTime(); - /** - * optional int64 executeTime = 1; - * - *
-     **已废弃,请使用header里的executeTime*
-     * 
- */ + + /** + * optional int64 executeTime = 1; + * + *
+         * *已废弃,请使用header里的executeTime*
+         * 
+ */ long getExecuteTime(); - /** - * optional string transactionId = 2; - * - *
-     **事务号*
-     * 
- */ + /** + * optional string transactionId = 2; + * + *
+         * *事务号*
+         * 
+ */ boolean hasTransactionId(); - /** - * optional string transactionId = 2; - * - *
-     **事务号*
-     * 
- */ + + /** + * optional string transactionId = 2; + * + *
+         * *事务号*
+         * 
+ */ java.lang.String getTransactionId(); - /** - * optional string transactionId = 2; - * - *
-     **事务号*
-     * 
- */ + + /** + * optional string transactionId = 2; + * + *
+         * *事务号*
+         * 
+ */ com.google.protobuf.ByteString getTransactionIdBytes(); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ java.util.List getPropsList(); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ int getPropsCount(); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ java.util.List getPropsOrBuilderList(); - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index); } - /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.TransactionEnd} - * - *
-   **结束事务的一些信息*
-   * 
- */ + + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.TransactionEnd} + * + *
+     * *结束事务的一些信息*
+     * 
+ */ public static final class TransactionEnd extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.TransactionEnd) @@ -11095,46 +11640,50 @@ public final class CanalEntry { private int bitField0_; public static final int EXECUTETIME_FIELD_NUMBER = 1; private long executeTime_; - /** - * optional int64 executeTime = 1; - * - *
-     **已废弃,请使用header里的executeTime*
-     * 
- */ + + /** + * optional int64 executeTime = 1; + * + *
+         * *已废弃,请使用header里的executeTime*
+         * 
+ */ public boolean hasExecuteTime() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int64 executeTime = 1; - * - *
-     **已废弃,请使用header里的executeTime*
-     * 
- */ + + /** + * optional int64 executeTime = 1; + * + *
+         * *已废弃,请使用header里的executeTime*
+         * 
+ */ public long getExecuteTime() { return executeTime_; } public static final int TRANSACTIONID_FIELD_NUMBER = 2; private java.lang.Object transactionId_; - /** - * optional string transactionId = 2; - * - *
-     **事务号*
-     * 
- */ + + /** + * optional string transactionId = 2; + * + *
+         * *事务号*
+         * 
+ */ public boolean hasTransactionId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional string transactionId = 2; - * - *
-     **事务号*
-     * 
- */ + + /** + * optional string transactionId = 2; + * + *
+         * *事务号*
+         * 
+ */ public java.lang.String getTransactionId() { java.lang.Object ref = transactionId_; if (ref instanceof java.lang.String) { @@ -11149,13 +11698,14 @@ public final class CanalEntry { return s; } } - /** - * optional string transactionId = 2; - * - *
-     **事务号*
-     * 
- */ + + /** + * optional string transactionId = 2; + * + *
+         * *事务号*
+         * 
+ */ public com.google.protobuf.ByteString getTransactionIdBytes() { java.lang.Object ref = transactionId_; @@ -11172,54 +11722,59 @@ public final class CanalEntry { public static final int PROPS_FIELD_NUMBER = 3; private java.util.List props_; - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ public java.util.List getPropsList() { return props_; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ public java.util.List getPropsOrBuilderList() { return props_; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ public int getPropsCount() { return props_.size(); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { return props_.get(index); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-     **预留扩展*
-     * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+         * *预留扩展*
+         * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { return props_.get(index); @@ -11351,13 +11906,14 @@ public final class CanalEntry { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.TransactionEnd} - * - *
-     **结束事务的一些信息*
-     * 
- */ + + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.TransactionEnd} + * + *
+         * *结束事务的一些信息*
+         * 
+ */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.TransactionEnd) @@ -11528,46 +12084,50 @@ public final class CanalEntry { private int bitField0_; private long executeTime_ ; - /** - * optional int64 executeTime = 1; - * - *
-       **已废弃,请使用header里的executeTime*
-       * 
- */ + + /** + * optional int64 executeTime = 1; + * + *
+             * *已废弃,请使用header里的executeTime*
+             * 
+ */ public boolean hasExecuteTime() { return ((bitField0_ & 0x00000001) == 0x00000001); } - /** - * optional int64 executeTime = 1; - * - *
-       **已废弃,请使用header里的executeTime*
-       * 
- */ + + /** + * optional int64 executeTime = 1; + * + *
+             * *已废弃,请使用header里的executeTime*
+             * 
+ */ public long getExecuteTime() { return executeTime_; } - /** - * optional int64 executeTime = 1; - * - *
-       **已废弃,请使用header里的executeTime*
-       * 
- */ + + /** + * optional int64 executeTime = 1; + * + *
+             * *已废弃,请使用header里的executeTime*
+             * 
+ */ public Builder setExecuteTime(long value) { bitField0_ |= 0x00000001; executeTime_ = value; onChanged(); return this; } - /** - * optional int64 executeTime = 1; - * - *
-       **已废弃,请使用header里的executeTime*
-       * 
- */ + + /** + * optional int64 executeTime = 1; + * + *
+             * *已废弃,请使用header里的executeTime*
+             * 
+ */ public Builder clearExecuteTime() { bitField0_ = (bitField0_ & ~0x00000001); executeTime_ = 0L; @@ -11576,23 +12136,25 @@ public final class CanalEntry { } private java.lang.Object transactionId_ = ""; - /** - * optional string transactionId = 2; - * - *
-       **事务号*
-       * 
- */ + + /** + * optional string transactionId = 2; + * + *
+             * *事务号*
+             * 
+ */ public boolean hasTransactionId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - /** - * optional string transactionId = 2; - * - *
-       **事务号*
-       * 
- */ + + /** + * optional string transactionId = 2; + * + *
+             * *事务号*
+             * 
+ */ public java.lang.String getTransactionId() { java.lang.Object ref = transactionId_; if (!(ref instanceof java.lang.String)) { @@ -11607,13 +12169,14 @@ public final class CanalEntry { return (java.lang.String) ref; } } - /** - * optional string transactionId = 2; - * - *
-       **事务号*
-       * 
- */ + + /** + * optional string transactionId = 2; + * + *
+             * *事务号*
+             * 
+ */ public com.google.protobuf.ByteString getTransactionIdBytes() { java.lang.Object ref = transactionId_; @@ -11627,13 +12190,14 @@ public final class CanalEntry { return (com.google.protobuf.ByteString) ref; } } - /** - * optional string transactionId = 2; - * - *
-       **事务号*
-       * 
- */ + + /** + * optional string transactionId = 2; + * + *
+             * *事务号*
+             * 
+ */ public Builder setTransactionId( java.lang.String value) { if (value == null) { @@ -11644,26 +12208,28 @@ public final class CanalEntry { onChanged(); return this; } - /** - * optional string transactionId = 2; - * - *
-       **事务号*
-       * 
- */ + + /** + * optional string transactionId = 2; + * + *
+             * *事务号*
+             * 
+ */ public Builder clearTransactionId() { bitField0_ = (bitField0_ & ~0x00000002); transactionId_ = getDefaultInstance().getTransactionId(); onChanged(); return this; } - /** - * optional string transactionId = 2; - * - *
-       **事务号*
-       * 
- */ + + /** + * optional string transactionId = 2; + * + *
+             * *事务号*
+             * 
+ */ public Builder setTransactionIdBytes( com.google.protobuf.ByteString value) { if (value == null) { @@ -11687,13 +12253,13 @@ public final class CanalEntry { private com.google.protobuf.RepeatedFieldBuilder< com.alibaba.otter.canal.protocol.CanalEntry.Pair, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder, com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> propsBuilder_; - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public java.util.List getPropsList() { if (propsBuilder_ == null) { return java.util.Collections.unmodifiableList(props_); @@ -11701,13 +12267,14 @@ public final class CanalEntry { return propsBuilder_.getMessageList(); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public int getPropsCount() { if (propsBuilder_ == null) { return props_.size(); @@ -11715,13 +12282,14 @@ public final class CanalEntry { return propsBuilder_.getCount(); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair getProps(int index) { if (propsBuilder_ == null) { return props_.get(index); @@ -11729,13 +12297,14 @@ public final class CanalEntry { return propsBuilder_.getMessage(index); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder setProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { @@ -11750,13 +12319,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder setProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -11768,13 +12338,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addProps(com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { if (value == null) { @@ -11788,13 +12359,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair value) { if (propsBuilder_ == null) { @@ -11809,13 +12381,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addProps( com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -11827,13 +12400,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addProps( int index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder builderForValue) { if (propsBuilder_ == null) { @@ -11845,13 +12419,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder addAllProps( java.lang.Iterable values) { if (propsBuilder_ == null) { @@ -11864,13 +12439,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder clearProps() { if (propsBuilder_ == null) { props_ = java.util.Collections.emptyList(); @@ -11881,13 +12457,14 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public Builder removeProps(int index) { if (propsBuilder_ == null) { ensurePropsIsMutable(); @@ -11898,24 +12475,26 @@ public final class CanalEntry { } return this; } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder getPropsBuilder( int index) { return getPropsFieldBuilder().getBuilder(index); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder getPropsOrBuilder( int index) { if (propsBuilder_ == null) { @@ -11923,13 +12502,14 @@ public final class CanalEntry { return propsBuilder_.getMessageOrBuilder(index); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public java.util.List getPropsOrBuilderList() { if (propsBuilder_ != null) { @@ -11938,36 +12518,39 @@ public final class CanalEntry { return java.util.Collections.unmodifiableList(props_); } } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder() { return getPropsFieldBuilder().addBuilder( com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public com.alibaba.otter.canal.protocol.CanalEntry.Pair.Builder addPropsBuilder( int index) { return getPropsFieldBuilder().addBuilder( index, com.alibaba.otter.canal.protocol.CanalEntry.Pair.getDefaultInstance()); } - /** - * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; - * - *
-       **预留扩展*
-       * 
- */ + + /** + * repeated .com.alibaba.otter.canal.protocol.Pair props = 3; + * + *
+             * *预留扩展*
+             * 
+ */ public java.util.List getPropsBuilderList() { return getPropsFieldBuilder().getBuilderList(); @@ -12030,13 +12613,14 @@ public final class CanalEntry { com.google.protobuf.ByteString getValueBytes(); } - /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.Pair} - * - *
-   **预留扩展*
-   * 
- */ + + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Pair} + * + *
+     * *预留扩展*
+     * 
+ */ public static final class Pair extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:com.alibaba.otter.canal.protocol.Pair) @@ -12340,13 +12924,14 @@ public final class CanalEntry { Builder builder = new Builder(parent); return builder; } - /** - * Protobuf type {@code com.alibaba.otter.canal.protocol.Pair} - * - *
-     **预留扩展*
-     * 
- */ + + /** + * Protobuf type {@code com.alibaba.otter.canal.protocol.Pair} + * + *
+         * *预留扩展*
+         * 
+ */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Pair) @@ -12730,13 +13315,14 @@ public final class CanalEntry { ".Pair\"\"\n\004Pair\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(", "\t*^\n\tEntryType\022\024\n\020TRANSACTIONBEGIN\020\001\022\013\n\007" + "ROWDATA\020\002\022\022\n\016TRANSACTIONEND\020\003\022\r\n\tHEARTBE" + - "AT\020\004\022\013\n\007GTIDLOG\020\005*\230\001\n\tEventType\022\n\n\006INSER" + + "AT\020\004\022\013\n\007GTIDLOG\020\005*\316\001\n\tEventType\022\n\n\006INSER" + "T\020\001\022\n\n\006UPDATE\020\002\022\n\n\006DELETE\020\003\022\n\n\006CREATE\020\004\022" + "\t\n\005ALTER\020\005\022\t\n\005ERASE\020\006\022\t\n\005QUERY\020\007\022\014\n\010TRUN" + "CATE\020\010\022\n\n\006RENAME\020\t\022\n\n\006CINDEX\020\n\022\n\n\006DINDEX" + - "\020\013\022\010\n\004GTID\020\014*(\n\004Type\022\n\n\006ORACLE\020\001\022\t\n\005MYSQ" + - "L\020\002\022\t\n\005PGSQL\020\003B0\n com.alibaba.otter.cana" + - "l.protocolB\nCanalEntryH\001" + "\020\013\022\010\n\004GTID\020\014\022\013\n\007XASTART\020\r\022\t\n\005XAEND\020\016\022\014\n\010" + + "XACOMMIT\020\017\022\016\n\nXAROLLBACK\020\020*(\n\004Type\022\n\n\006OR" + + "ACLE\020\001\022\t\n\005MYSQL\020\002\022\t\n\005PGSQL\020\003B0\n com.alib" + + "aba.otter.canal.protocolB\nCanalEntryH\001" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -12801,4 +13387,4 @@ public final class CanalEntry { } // @@protoc_insertion_point(outer_class_scope) -} +} \ No newline at end of file diff --git a/protocol/src/main/java/com/alibaba/otter/canal/protocol/EntryProtocol.proto b/protocol/src/main/java/com/alibaba/otter/canal/protocol/EntryProtocol.proto index 15ee319a..b6d2ae76 100644 --- a/protocol/src/main/java/com/alibaba/otter/canal/protocol/EntryProtocol.proto +++ b/protocol/src/main/java/com/alibaba/otter/canal/protocol/EntryProtocol.proto @@ -191,6 +191,9 @@ enum EventType { CINDEX = 10; DINDEX = 11; GTID = 12; + /** XA **/ + XACOMMIT = 13; + XAROLLBACK = 14; } /**数据库类型**/