>();
+ private static final ConvertUtilsBean convertUtilsBean = new ConvertUtilsBean();
+
+ static {
+ // regist Converter
+ convertUtilsBean.register(SqlTimestampConverter.SQL_TIMESTAMP, Date.class);
+ convertUtilsBean.register(SqlTimestampConverter.SQL_TIMESTAMP, Time.class);
+ convertUtilsBean.register(SqlTimestampConverter.SQL_TIMESTAMP, Timestamp.class);
+ convertUtilsBean.register(ByteArrayConverter.SQL_BYTES, byte[].class);
+
+ // bool
+ sqlTypeToJavaTypeMap.put(Types.BOOLEAN, Boolean.class);
+
+ // int
+ sqlTypeToJavaTypeMap.put(Types.TINYINT, Integer.class);
+ sqlTypeToJavaTypeMap.put(Types.SMALLINT, Integer.class);
+ sqlTypeToJavaTypeMap.put(Types.INTEGER, Integer.class);
+
+ // long
+ sqlTypeToJavaTypeMap.put(Types.BIGINT, Long.class);
+ // mysql bit最多64位,无符号
+ sqlTypeToJavaTypeMap.put(Types.BIT, BigInteger.class);
+
+ // decimal
+ sqlTypeToJavaTypeMap.put(Types.REAL, Float.class);
+ sqlTypeToJavaTypeMap.put(Types.FLOAT, Float.class);
+ sqlTypeToJavaTypeMap.put(Types.DOUBLE, Double.class);
+ sqlTypeToJavaTypeMap.put(Types.NUMERIC, BigDecimal.class);
+ sqlTypeToJavaTypeMap.put(Types.DECIMAL, BigDecimal.class);
+
+ // date
+ sqlTypeToJavaTypeMap.put(Types.DATE, Date.class);
+ sqlTypeToJavaTypeMap.put(Types.TIME, Time.class);
+ sqlTypeToJavaTypeMap.put(Types.TIMESTAMP, Timestamp.class);
+
+ // blob
+ sqlTypeToJavaTypeMap.put(Types.BLOB, byte[].class);
+
+ // byte[]
+ sqlTypeToJavaTypeMap.put(Types.REF, byte[].class);
+ sqlTypeToJavaTypeMap.put(Types.OTHER, byte[].class);
+ sqlTypeToJavaTypeMap.put(Types.ARRAY, byte[].class);
+ sqlTypeToJavaTypeMap.put(Types.STRUCT, byte[].class);
+ sqlTypeToJavaTypeMap.put(Types.SQLXML, byte[].class);
+ sqlTypeToJavaTypeMap.put(Types.BINARY, byte[].class);
+ sqlTypeToJavaTypeMap.put(Types.DATALINK, byte[].class);
+ sqlTypeToJavaTypeMap.put(Types.DISTINCT, byte[].class);
+ sqlTypeToJavaTypeMap.put(Types.VARBINARY, byte[].class);
+ sqlTypeToJavaTypeMap.put(Types.JAVA_OBJECT, byte[].class);
+ sqlTypeToJavaTypeMap.put(Types.LONGVARBINARY, byte[].class);
+
+ // String
+ sqlTypeToJavaTypeMap.put(Types.CHAR, String.class);
+ sqlTypeToJavaTypeMap.put(Types.VARCHAR, String.class);
+ sqlTypeToJavaTypeMap.put(Types.LONGVARCHAR, String.class);
+ sqlTypeToJavaTypeMap.put(Types.LONGNVARCHAR, String.class);
+ sqlTypeToJavaTypeMap.put(Types.NCHAR, String.class);
+ sqlTypeToJavaTypeMap.put(Types.NVARCHAR, String.class);
+ sqlTypeToJavaTypeMap.put(Types.NCLOB, String.class);
+ sqlTypeToJavaTypeMap.put(Types.CLOB, String.class);
+ }
+
+ /**
+ * 将指定java.sql.Types的ResultSet value转换成相应的String
+ *
+ * @param rs
+ * @param index
+ * @param sqlType
+ * @return
+ * @throws SQLException
+ */
+ public static String sqlValueToString(ResultSet rs, int index, int sqlType) throws SQLException {
+ Class> requiredType = sqlTypeToJavaTypeMap.get(sqlType);
+ if (requiredType == null) {
+ throw new IllegalArgumentException("unknow java.sql.Types - " + sqlType);
+ }
+
+ return getResultSetValue(rs, index, requiredType);
+ }
+
+ /**
+ * sqlValueToString方法的逆向过程
+ *
+ * @param value
+ * @param sqlType
+ * @param isTextRequired
+ * @param isEmptyStringNulled
+ * @return
+ */
+ public static Object stringToSqlValue(String value, int sqlType, boolean isRequired, boolean isEmptyStringNulled) {
+ // 设置变量
+ String sourceValue = value;
+ if (SqlUtils.isTextType(sqlType)) {
+ if ((sourceValue == null) || (StringUtils.isEmpty(sourceValue) && isEmptyStringNulled)) {
+ return isRequired ? REQUIRED_FIELD_NULL_SUBSTITUTE : null;
+ } else {
+ return sourceValue;
+ }
+ } else {
+ if (StringUtils.isEmpty(sourceValue)) {
+ return null;
+ } else {
+ Class> requiredType = sqlTypeToJavaTypeMap.get(sqlType);
+ if (requiredType == null) {
+ throw new IllegalArgumentException("unknow java.sql.Types - " + sqlType);
+ } else if (requiredType.equals(String.class)) {
+ return sourceValue;
+ } else if (isNumeric(sqlType)) {
+ return convertUtilsBean.convert(sourceValue.trim(), requiredType);
+ } else {
+ return convertUtilsBean.convert(sourceValue, requiredType);
+ }
+ }
+ }
+ }
+
+ public static String encoding(String source, int sqlType, String sourceEncoding, String targetEncoding) {
+ switch (sqlType) {
+ case Types.CHAR:
+ case Types.VARCHAR:
+ case Types.LONGVARCHAR:
+ case Types.NCHAR:
+ case Types.NVARCHAR:
+ case Types.LONGNVARCHAR:
+ case Types.CLOB:
+ case Types.NCLOB:
+ if (false == StringUtils.isEmpty(source)) {
+ String fromEncoding = StringUtils.isBlank(sourceEncoding) ? "UTF-8" : sourceEncoding;
+ String toEncoding = StringUtils.isBlank(targetEncoding) ? "UTF-8" : targetEncoding;
+
+ // if (false == StringUtils.equalsIgnoreCase(fromEncoding,
+ // toEncoding)) {
+ try {
+ return new String(source.getBytes(fromEncoding), toEncoding);
+ } catch (UnsupportedEncodingException e) {
+ throw new IllegalArgumentException(e.getMessage(), e);
+ }
+ // }
+ }
+ }
+
+ return source;
+ }
+
+ /**
+ * Retrieve a JDBC column value from a ResultSet, using the specified value
+ * type.
+ *
+ * Uses the specifically typed ResultSet accessor methods, falling back to
+ * {@link #getResultSetValue(ResultSet, int)} for unknown types.
+ *
+ * Note that the returned value may not be assignable to the specified
+ * required type, in case of an unknown type. Calling code needs to deal
+ * with this case appropriately, e.g. throwing a corresponding exception.
+ *
+ * @param rs is the ResultSet holding the data
+ * @param index is the column index
+ * @param requiredType the required value type (may be null)
+ * @return the value object
+ * @throws SQLException if thrown by the JDBC API
+ */
+ private static String getResultSetValue(ResultSet rs, int index, Class> requiredType) throws SQLException {
+ if (requiredType == null) {
+ return getResultSetValue(rs, index);
+ }
+
+ Object value = null;
+ boolean wasNullCheck = false;
+
+ // Explicitly extract typed value, as far as possible.
+ if (String.class.equals(requiredType)) {
+ value = rs.getString(index);
+ } else if (boolean.class.equals(requiredType) || Boolean.class.equals(requiredType)) {
+ value = Boolean.valueOf(rs.getBoolean(index));
+ wasNullCheck = true;
+ } else if (byte.class.equals(requiredType) || Byte.class.equals(requiredType)) {
+ value = new Byte(rs.getByte(index));
+ wasNullCheck = true;
+ } else if (short.class.equals(requiredType) || Short.class.equals(requiredType)) {
+ value = new Short(rs.getShort(index));
+ wasNullCheck = true;
+ } else if (int.class.equals(requiredType) || Integer.class.equals(requiredType)) {
+ value = new Long(rs.getLong(index));
+ wasNullCheck = true;
+ } else if (long.class.equals(requiredType) || Long.class.equals(requiredType)) {
+ value = rs.getBigDecimal(index);
+ wasNullCheck = true;
+ } else if (float.class.equals(requiredType) || Float.class.equals(requiredType)) {
+ value = new Float(rs.getFloat(index));
+ wasNullCheck = true;
+ } else if (double.class.equals(requiredType) || Double.class.equals(requiredType)
+ || Number.class.equals(requiredType)) {
+ value = new Double(rs.getDouble(index));
+ wasNullCheck = true;
+ } else if (Time.class.equals(requiredType)) {
+ // try {
+ // value = rs.getTime(index);
+ // } catch (SQLException e) {
+ value = rs.getString(index);// 尝试拿为string对象,0000无法用Time表示
+ // if (value == null && !rs.wasNull()) {
+ // value = "00:00:00"; //
+ // mysql设置了zeroDateTimeBehavior=convertToNull,出现0值时返回为null
+ // }
+ // }
+ } else if (Timestamp.class.equals(requiredType) || Date.class.equals(requiredType)) {
+ // try {
+ // value = convertTimestamp(rs.getTimestamp(index));
+ // } catch (SQLException e) {
+ // 尝试拿为string对象,0000-00-00 00:00:00无法用Timestamp 表示
+ value = rs.getString(index);
+ // if (value == null && !rs.wasNull()) {
+ // value = "0000:00:00 00:00:00"; //
+ // mysql设置了zeroDateTimeBehavior=convertToNull,出现0值时返回为null
+ // }
+ // }
+ } else if (BigDecimal.class.equals(requiredType)) {
+ value = rs.getBigDecimal(index);
+ } else if (BigInteger.class.equals(requiredType)) {
+ value = rs.getBigDecimal(index);
+ } else if (Blob.class.equals(requiredType)) {
+ value = rs.getBlob(index);
+ } else if (Clob.class.equals(requiredType)) {
+ value = rs.getClob(index);
+ } else if (byte[].class.equals(requiredType)) {
+ try {
+ byte[] bytes = rs.getBytes(index);
+ if (bytes == null) {
+ value = null;
+ } else {
+ value = new String(bytes, "ISO-8859-1");// 将binary转化为iso-8859-1的字符串
+ }
+ } catch (UnsupportedEncodingException e) {
+ throw new SQLException(e);
+ }
+ } else {
+ // Some unknown type desired -> rely on getObject.
+ value = getResultSetValue(rs, index);
+ }
+
+ // Perform was-null check if demanded (for results that the
+ // JDBC driver returns as primitives).
+ if (wasNullCheck && (value != null) && rs.wasNull()) {
+ value = null;
+ }
+
+ return (value == null) ? null : convertUtilsBean.convert(value);
+ }
+
+ /**
+ * Retrieve a JDBC column value from a ResultSet, using the most appropriate
+ * value type. The returned value should be a detached value object, not
+ * having any ties to the active ResultSet: in particular, it should not be
+ * a Blob or Clob object but rather a byte array respectively String
+ * representation.
+ *
+ * Uses the getObject(index) method, but includes additional
+ * "hacks" to get around Oracle 10g returning a non-standard object for its
+ * TIMESTAMP datatype and a java.sql.Date for DATE columns
+ * leaving out the time portion: These columns will explicitly be extracted
+ * as standard java.sql.Timestamp object.
+ *
+ * @param rs is the ResultSet holding the data
+ * @param index is the column index
+ * @return the value object
+ * @throws SQLException if thrown by the JDBC API
+ * @see Blob
+ * @see Clob
+ * @see Timestamp
+ */
+ private static String getResultSetValue(ResultSet rs, int index) throws SQLException {
+ Object obj = rs.getObject(index);
+ return (obj == null) ? null : convertUtilsBean.convert(obj);
+ }
+
+ // private static Object convertTimestamp(Timestamp timestamp) {
+ // return (timestamp == null) ? null : timestamp.getTime();
+ // }
+
+ /**
+ * Check whether the given SQL type is numeric.
+ */
+ public static boolean isNumeric(int sqlType) {
+ return (Types.BIT == sqlType) || (Types.BIGINT == sqlType) || (Types.DECIMAL == sqlType)
+ || (Types.DOUBLE == sqlType) || (Types.FLOAT == sqlType) || (Types.INTEGER == sqlType)
+ || (Types.NUMERIC == sqlType) || (Types.REAL == sqlType) || (Types.SMALLINT == sqlType)
+ || (Types.TINYINT == sqlType);
+ }
+
+ public static boolean isTextType(int sqlType) {
+ if (sqlType == Types.CHAR || sqlType == Types.VARCHAR || sqlType == Types.CLOB || sqlType == Types.LONGVARCHAR
+ || sqlType == Types.NCHAR || sqlType == Types.NVARCHAR || sqlType == Types.NCLOB
+ || sqlType == Types.LONGNVARCHAR) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+}
diff --git a/example/src/main/resources/client-spring.xml b/example/src/main/resources/client-spring.xml
new file mode 100644
index 00000000..29eba1af
--- /dev/null
+++ b/example/src/main/resources/client-spring.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+ classpath:client.properties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/example/src/main/resources/client.properties b/example/src/main/resources/client.properties
new file mode 100644
index 00000000..c5142912
--- /dev/null
+++ b/example/src/main/resources/client.properties
@@ -0,0 +1,16 @@
+# client 配置
+zk.servers=127.0.0.1:2181
+# 5 * 1024
+client.batch.size=5120
+client.debug=false
+client.destination=example
+client.username=canal
+client.password=canal
+client.exceptionstrategy=1
+client.retrytimes=3
+client.filter=.*\\..*
+
+# 同步目标: mysql 配置
+target.mysql.url=jdbc:mysql://127.0.0.1:4306
+target.mysql.username=root
+target.mysql.password=123456
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 35e3235a..63ed2d02 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
@@ -6,7 +6,6 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import com.alibaba.otter.canal.meta.FileMixedMetaManager;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -21,7 +20,14 @@ import com.alibaba.otter.canal.filter.aviater.AviaterRegexFilter;
import com.alibaba.otter.canal.instance.core.AbstractCanalInstance;
import com.alibaba.otter.canal.instance.manager.model.Canal;
import com.alibaba.otter.canal.instance.manager.model.CanalParameter;
-import com.alibaba.otter.canal.instance.manager.model.CanalParameter.*;
+import com.alibaba.otter.canal.instance.manager.model.CanalParameter.DataSourcing;
+import com.alibaba.otter.canal.instance.manager.model.CanalParameter.HAMode;
+import com.alibaba.otter.canal.instance.manager.model.CanalParameter.IndexMode;
+import com.alibaba.otter.canal.instance.manager.model.CanalParameter.MetaMode;
+import com.alibaba.otter.canal.instance.manager.model.CanalParameter.SourcingType;
+import com.alibaba.otter.canal.instance.manager.model.CanalParameter.StorageMode;
+import com.alibaba.otter.canal.instance.manager.model.CanalParameter.StorageScavengeMode;
+import com.alibaba.otter.canal.meta.FileMixedMetaManager;
import com.alibaba.otter.canal.meta.MemoryMetaManager;
import com.alibaba.otter.canal.meta.PeriodMixedMetaManager;
import com.alibaba.otter.canal.meta.ZooKeeperMetaManager;
@@ -32,7 +38,12 @@ import com.alibaba.otter.canal.parse.inbound.AbstractEventParser;
import com.alibaba.otter.canal.parse.inbound.group.GroupEventParser;
import com.alibaba.otter.canal.parse.inbound.mysql.LocalBinlogEventParser;
import com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser;
-import com.alibaba.otter.canal.parse.index.*;
+import com.alibaba.otter.canal.parse.index.CanalLogPositionManager;
+import com.alibaba.otter.canal.parse.index.FailbackLogPositionManager;
+import com.alibaba.otter.canal.parse.index.MemoryLogPositionManager;
+import com.alibaba.otter.canal.parse.index.MetaLogPositionManager;
+import com.alibaba.otter.canal.parse.index.PeriodMixedLogPositionManager;
+import com.alibaba.otter.canal.parse.index.ZooKeeperLogPositionManager;
import com.alibaba.otter.canal.parse.support.AuthenticationInfo;
import com.alibaba.otter.canal.protocol.position.EntryPosition;
import com.alibaba.otter.canal.sink.entry.EntryEventSink;
@@ -110,7 +121,7 @@ public class CanalInstanceWithManager extends AbstractCanalInstance {
ZooKeeperMetaManager zooKeeperMetaManager = new ZooKeeperMetaManager();
zooKeeperMetaManager.setZkClientx(getZkclientx());
((PeriodMixedMetaManager) metaManager).setZooKeeperMetaManager(zooKeeperMetaManager);
- } else if (mode.isLocalFile()){
+ } else if (mode.isLocalFile()) {
FileMixedMetaManager fileMixedMetaManager = new FileMixedMetaManager();
fileMixedMetaManager.setDataDir(parameters.getDataDir());
fileMixedMetaManager.setPeriod(parameters.getMetaFileFlushPeriod());
diff --git a/instance/manager/src/main/java/com/alibaba/otter/canal/instance/manager/model/CanalParameter.java b/instance/manager/src/main/java/com/alibaba/otter/canal/instance/manager/model/CanalParameter.java
index befc8e2f..40df1485 100644
--- a/instance/manager/src/main/java/com/alibaba/otter/canal/instance/manager/model/CanalParameter.java
+++ b/instance/manager/src/main/java/com/alibaba/otter/canal/instance/manager/model/CanalParameter.java
@@ -93,6 +93,10 @@ public class CanalParameter implements Serializable {
private Boolean filterTableError = Boolean.FALSE; // 是否忽略表解析异常
private String blackFilter = null; // 匹配黑名单,忽略解析
+ private Boolean tsdbEnable = Boolean.FALSE; // 是否开启tableMetaTSDB
+ private String tsdbJdbcUrl;
+ private String tsdbJdbcUserName;
+ private String tsdbJdbcPassword;
// ================================== 兼容字段处理
private InetSocketAddress masterAddress; // 主库信息
private String masterUsername; // 帐号
@@ -246,7 +250,7 @@ public class CanalParameter implements Serializable {
ZOOKEEPER,
/** 混合模式,内存+文件 */
MIXED,
- /** 本地文件存储模式*/
+ /** 本地文件存储模式 */
LOCAL_FILE;
public boolean isMemory() {
@@ -261,7 +265,7 @@ public class CanalParameter implements Serializable {
return this.equals(MetaMode.MIXED);
}
- public boolean isLocalFile(){
+ public boolean isLocalFile() {
return this.equals(MetaMode.LOCAL_FILE);
}
}
@@ -883,6 +887,38 @@ public class CanalParameter implements Serializable {
this.blackFilter = blackFilter;
}
+ public Boolean getTsdbEnable() {
+ return tsdbEnable;
+ }
+
+ public void setTsdbEnable(Boolean tsdbEnable) {
+ this.tsdbEnable = tsdbEnable;
+ }
+
+ public String getTsdbJdbcUrl() {
+ return tsdbJdbcUrl;
+ }
+
+ public void setTsdbJdbcUrl(String tsdbJdbcUrl) {
+ this.tsdbJdbcUrl = tsdbJdbcUrl;
+ }
+
+ public String getTsdbJdbcUserName() {
+ return tsdbJdbcUserName;
+ }
+
+ public void setTsdbJdbcUserName(String tsdbJdbcUserName) {
+ this.tsdbJdbcUserName = tsdbJdbcUserName;
+ }
+
+ public String getTsdbJdbcPassword() {
+ return tsdbJdbcPassword;
+ }
+
+ public void setTsdbJdbcPassword(String tsdbJdbcPassword) {
+ this.tsdbJdbcPassword = tsdbJdbcPassword;
+ }
+
public String toString() {
return ToStringBuilder.reflectionToString(this, CanalToStringStyle.DEFAULT_STYLE);
}
diff --git a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/EventTransactionBuffer.java b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/EventTransactionBuffer.java
index c3c7150f..8034d078 100644
--- a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/EventTransactionBuffer.java
+++ b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/EventTransactionBuffer.java
@@ -80,6 +80,11 @@ public class EventTransactionBuffer extends AbstractCanalLifeCycle {
flush();
}
break;
+ case HEARTBEAT:
+ // master过来的heartbeat,说明binlog已经读完了,是idle状态
+ put(entry);
+ flush();
+ break;
default:
break;
}
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 156d4692..304ec8d7 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
@@ -8,34 +8,38 @@ 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.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.inbound.AbstractEventParser;
import com.alibaba.otter.canal.parse.inbound.BinlogParser;
import com.alibaba.otter.canal.parse.inbound.MultiStageCoprocessor;
import com.alibaba.otter.canal.parse.inbound.mysql.dbsync.LogEventConvert;
+import com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DefaultTableMetaTSDBFactory;
import com.alibaba.otter.canal.parse.inbound.mysql.tsdb.TableMetaTSDB;
-import com.alibaba.otter.canal.parse.inbound.mysql.tsdb.TableMetaTSDBBuilder;
+import com.alibaba.otter.canal.parse.inbound.mysql.tsdb.TableMetaTSDBFactory;
import com.alibaba.otter.canal.protocol.position.EntryPosition;
public abstract class AbstractMysqlEventParser extends AbstractEventParser {
- protected final Logger logger = LoggerFactory.getLogger(this.getClass());
- protected static final long BINLOG_START_OFFEST = 4L;
+ protected final Logger logger = LoggerFactory.getLogger(this.getClass());
+ protected static final long BINLOG_START_OFFEST = 4L;
+
+ protected TableMetaTSDBFactory tableMetaTSDBFactory = new DefaultTableMetaTSDBFactory();
+ protected boolean enableTsdb = false;
+ protected String tsdbSpringXml;
+ protected TableMetaTSDB tableMetaTSDB;
- protected boolean enableTsdb = false;
- protected String tsdbSpringXml;
- protected TableMetaTSDB tableMetaTSDB;
// 编码信息
- protected byte connectionCharsetNumber = (byte) 33;
- protected Charset connectionCharset = Charset.forName("UTF-8");
- protected boolean filterQueryDcl = false;
- protected boolean filterQueryDml = false;
- protected boolean filterQueryDdl = false;
- protected boolean filterRows = false;
- protected boolean filterTableError = false;
- protected boolean useDruidDdlFilter = true;
- private final AtomicLong eventsPublishBlockingTime = new AtomicLong(0L);
+ protected byte connectionCharsetNumber = (byte) 33;
+ protected Charset connectionCharset = Charset.forName("UTF-8");
+ protected boolean filterQueryDcl = false;
+ protected boolean filterQueryDml = false;
+ protected boolean filterQueryDdl = false;
+ protected boolean filterRows = false;
+ protected boolean filterTableError = false;
+ protected boolean useDruidDdlFilter = true;
+ private final AtomicLong eventsPublishBlockingTime = new AtomicLong(0L);
protected BinlogParser buildParser() {
LogEventConvert convert = new LogEventConvert();
@@ -93,8 +97,16 @@ public abstract class AbstractMysqlEventParser extends AbstractEventParser {
public void start() throws CanalParseException {
if (enableTsdb) {
if (tableMetaTSDB == null) {
- // 初始化
- tableMetaTSDB = TableMetaTSDBBuilder.build(destination, tsdbSpringXml);
+ synchronized (CanalEventParser.class) {
+ try {
+ // 设置当前正在加载的通道,加载spring查找文件时会用到该变量
+ System.setProperty("canal.instance.destination", destination);
+ // 初始化
+ tableMetaTSDB = tableMetaTSDBFactory.build(destination, tsdbSpringXml);
+ } finally {
+ System.setProperty("canal.instance.destination", "");
+ }
+ }
}
}
@@ -103,7 +115,7 @@ public abstract class AbstractMysqlEventParser extends AbstractEventParser {
public void stop() throws CanalParseException {
if (enableTsdb) {
- TableMetaTSDBBuilder.destory(destination);
+ tableMetaTSDBFactory.destory(destination);
tableMetaTSDB = null;
}
@@ -177,7 +189,7 @@ public abstract class AbstractMysqlEventParser extends AbstractEventParser {
if (this.enableTsdb) {
if (tableMetaTSDB == null) {
// 初始化
- tableMetaTSDB = TableMetaTSDBBuilder.build(destination, tsdbSpringXml);
+ tableMetaTSDB = tableMetaTSDBFactory.build(destination, tsdbSpringXml);
}
}
}
@@ -187,7 +199,7 @@ public abstract class AbstractMysqlEventParser extends AbstractEventParser {
if (this.enableTsdb) {
if (tableMetaTSDB == null) {
// 初始化
- tableMetaTSDB = TableMetaTSDBBuilder.build(destination, tsdbSpringXml);
+ tableMetaTSDB = tableMetaTSDBFactory.build(destination, tsdbSpringXml);
}
}
}
@@ -195,5 +207,9 @@ public abstract class AbstractMysqlEventParser extends AbstractEventParser {
public AtomicLong getEventsPublishBlockingTime() {
return this.eventsPublishBlockingTime;
}
+
+ public void setTableMetaTSDBFactory(TableMetaTSDBFactory tableMetaTSDBFactory) {
+ this.tableMetaTSDBFactory = tableMetaTSDBFactory;
+ }
}
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 69cf0572..7db700ae 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
@@ -63,7 +63,6 @@ public class MysqlEventParser extends AbstractMysqlEventParser implements CanalE
private String detectingSQL; // 心跳sql
private MysqlConnection metaConnection; // 查询meta信息的链接
private TableMetaCache tableMetaCache; // 对应meta
- // cache
private int fallbackIntervalInSeconds = 60; // 切换回退时间
private BinlogFormat[] supportBinlogFormats; // 支持的binlogFormat,如果设置会执行强校验
private BinlogImage[] supportBinlogImages; // 支持的binlogImage,如果设置会执行强校验
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 09af808f..e21b9d75 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
@@ -10,6 +10,7 @@ import java.util.Arrays;
import java.util.BitSet;
import java.util.List;
+import com.taobao.tddl.dbsync.binlog.event.*;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.slf4j.Logger;
@@ -40,22 +41,7 @@ import com.alibaba.otter.canal.protocol.CanalEntry.Type;
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;
-import com.taobao.tddl.dbsync.binlog.event.RandLogEvent;
-import com.taobao.tddl.dbsync.binlog.event.RowsLogBuffer;
-import com.taobao.tddl.dbsync.binlog.event.RowsLogEvent;
-import com.taobao.tddl.dbsync.binlog.event.RowsQueryLogEvent;
-import com.taobao.tddl.dbsync.binlog.event.TableMapLogEvent;
import com.taobao.tddl.dbsync.binlog.event.TableMapLogEvent.ColumnInfo;
-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.WriteRowsLogEvent;
-import com.taobao.tddl.dbsync.binlog.event.XidLogEvent;
import com.taobao.tddl.dbsync.binlog.event.mariadb.AnnotateRowsEvent;
/**
@@ -144,6 +130,8 @@ public class LogEventConvert extends AbstractCanalLifeCycle implements BinlogPar
return parseRandLogEvent((RandLogEvent) logEvent);
case LogEvent.GTID_LOG_EVENT:
return parseGTIDLogEvent((GtidLogEvent) logEvent);
+ case LogEvent.HEARTBEAT_LOG_EVENT:
+ return parseHeartbeatLogEvent((HeartbeatLogEvent) logEvent);
default:
break;
}
@@ -158,6 +146,15 @@ public class LogEventConvert extends AbstractCanalLifeCycle implements BinlogPar
}
}
+ private Entry parseHeartbeatLogEvent(HeartbeatLogEvent logEvent) {
+ Header.Builder headerBuilder = Header.newBuilder();
+ headerBuilder.setEventType(EventType.MHEARTBEAT);
+ Entry.Builder entryBuilder = Entry.newBuilder();
+ entryBuilder.setHeader(headerBuilder.build());
+ entryBuilder.setEntryType(EntryType.HEARTBEAT);
+ return entryBuilder.build();
+ }
+
private Entry parseGTIDLogEvent(GtidLogEvent logEvent) {
LogHeader logHeader = logEvent.getHeader();
String value = logEvent.getSid().toString() + ":" + logEvent.getGno();
@@ -541,12 +538,16 @@ public class LogEventConvert extends AbstractCanalLifeCycle implements BinlogPar
tableError |= parseOneRow(rowDataBuilder, event, buffer, changeColumns, true, tableMeta);
}
- rowsCount ++;
+ rowsCount++;
rowChangeBuider.addRowDatas(rowDataBuilder.build());
}
TableMapLogEvent table = event.getTable();
- Header header = createHeader(event.getHeader(), table.getDbName(), table.getTableName(), eventType, rowsCount);
+ Header header = createHeader(event.getHeader(),
+ table.getDbName(),
+ table.getTableName(),
+ eventType,
+ rowsCount);
RowChange rowChange = rowChangeBuider.build();
if (tableError) {
@@ -801,12 +802,12 @@ public class LogEventConvert extends AbstractCanalLifeCycle implements BinlogPar
return createEntry(header, EntryType.ROWDATA, rowChangeBuider.build().toByteString());
}
-
private Header createHeader(LogHeader logHeader, String schemaName, String tableName, EventType eventType) {
return createHeader(logHeader, schemaName, tableName, eventType, -1);
}
- private Header createHeader(LogHeader logHeader, String schemaName, String tableName, EventType eventType, Integer rowsCount) {
+ private Header createHeader(LogHeader logHeader, String schemaName, String tableName, EventType eventType,
+ Integer rowsCount) {
// header会做信息冗余,方便以后做检索或者过滤
Header.Builder headerBuilder = Header.newBuilder();
headerBuilder.setVersion(version);
@@ -960,5 +961,4 @@ public class LogEventConvert extends AbstractCanalLifeCycle implements BinlogPar
public void setGtidSet(GTIDSet gtidSet) {
this.gtidSet = gtidSet;
}
-
}
diff --git a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/tsdb/DefaultTableMetaTSDBFactory.java b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/tsdb/DefaultTableMetaTSDBFactory.java
new file mode 100644
index 00000000..00e2744b
--- /dev/null
+++ b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/tsdb/DefaultTableMetaTSDBFactory.java
@@ -0,0 +1,19 @@
+package com.alibaba.otter.canal.parse.inbound.mysql.tsdb;
+
+/**
+ * @author agapple 2017年10月11日 下午8:45:40
+ * @since 1.0.25
+ */
+public class DefaultTableMetaTSDBFactory implements TableMetaTSDBFactory {
+
+ /**
+ * 代理一下tableMetaTSDB的获取,使用隔离的spring定义
+ */
+ public TableMetaTSDB build(String destination, String springXml) {
+ return TableMetaTSDBBuilder.build(destination, springXml);
+ }
+
+ public void destory(String destination) {
+ TableMetaTSDBBuilder.destory(destination);
+ }
+}
diff --git a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/tsdb/TableMetaTSDBBuilder.java b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/tsdb/TableMetaTSDBBuilder.java
index 8e37ef71..107e1013 100644
--- a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/tsdb/TableMetaTSDBBuilder.java
+++ b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/tsdb/TableMetaTSDBBuilder.java
@@ -10,12 +10,15 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.google.common.collect.Maps;
/**
- * @author agapple 2017年10月11日 下午8:45:40
+ * tableMeta构造器
+ *
+ * @author agapple 2018年8月8日 上午11:01:08
* @since 1.0.25
*/
+
public class TableMetaTSDBBuilder {
- protected final static Logger logger = LoggerFactory.getLogger(TableMetaTSDBBuilder.class);
+ protected final static Logger logger = LoggerFactory.getLogger(DefaultTableMetaTSDBFactory.class);
private static ConcurrentMap contexts = Maps.newConcurrentMap();
/**
diff --git a/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/tsdb/TableMetaTSDBFactory.java b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/tsdb/TableMetaTSDBFactory.java
new file mode 100644
index 00000000..950645a8
--- /dev/null
+++ b/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/tsdb/TableMetaTSDBFactory.java
@@ -0,0 +1,18 @@
+package com.alibaba.otter.canal.parse.inbound.mysql.tsdb;
+
+/**
+ * tableMeta构造器,允许重载实现
+ *
+ * @author agapple 2018年8月8日 上午11:01:08
+ * @since 1.0.26
+ */
+
+public interface TableMetaTSDBFactory {
+
+ /**
+ * 代理一下tableMetaTSDB的获取,使用隔离的spring定义
+ */
+ public TableMetaTSDB build(String destination, String springXml);
+
+ public void destory(String destination);
+}
diff --git a/pom.xml b/pom.xml
index 9a14868b..56ac821a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -96,8 +96,8 @@
true
true
- 1.6
- 1.6
+ 1.7
+ 1.7
UTF-8
3.2.9.RELEASE
@@ -247,7 +247,7 @@
com.alibaba.fastsql
fastsql
- 2.0.0_preview_520
+ 2.0.0_preview_540
com.alibaba
@@ -332,7 +332,7 @@
org.apache.maven.plugins
maven-compiler-plugin
- 3.2
+ 3.8.0
${java_source_version}
${java_target_version}
diff --git a/prometheus/pom.xml b/prometheus/pom.xml
index 16cf8acf..b814c7e6 100644
--- a/prometheus/pom.xml
+++ b/prometheus/pom.xml
@@ -14,17 +14,6 @@
1.0.26-SNAPSHOT
canal prometheus module for otter ${project.version}
-
-
- org.aspectj
- aspectjrt
- 1.8.9
-
-
- org.aspectj
- aspectjweaver
- 1.8.9
-
org.jctools
jctools-core
diff --git a/prometheus/src/main/java/com/alibaba/otter/canal/prometheus/impl/EntryCollector.java b/prometheus/src/main/java/com/alibaba/otter/canal/prometheus/impl/EntryCollector.java
index 4aa6ff42..e434bd58 100644
--- a/prometheus/src/main/java/com/alibaba/otter/canal/prometheus/impl/EntryCollector.java
+++ b/prometheus/src/main/java/com/alibaba/otter/canal/prometheus/impl/EntryCollector.java
@@ -7,6 +7,7 @@ import com.alibaba.otter.canal.sink.CanalEventSink;
import com.alibaba.otter.canal.sink.entry.EntryEventSink;
import com.google.common.base.Preconditions;
import io.prometheus.client.Collector;
+import io.prometheus.client.Counter;
import io.prometheus.client.CounterMetricFamily;
import io.prometheus.client.GaugeMetricFamily;
import org.slf4j.Logger;
@@ -26,11 +27,15 @@ import static com.alibaba.otter.canal.prometheus.CanalInstanceExports.DEST_LABEL
*/
public class EntryCollector extends Collector implements InstanceRegistry {
- private static final Logger logger = LoggerFactory.getLogger(SinkCollector.class);
- private static final String DELAY = "canal_instance_traffic_delay";
- private static final String TRANSACTION = "canal_instance_transactions";
- private static final String DELAY_HELP = "Traffic delay of canal instance in milliseconds";
- private static final String TRANSACTION_HELP = "Transactions counter of canal instance";
+ private static final Logger logger = LoggerFactory.getLogger(SinkCollector.class);
+ private static final String DELAY = "canal_instance_traffic_delay";
+ private static final String TRANSACTION = "canal_instance_transactions";
+ private static final String ROW_EVENTS = "canal_instance_row_events";
+ private static final String ROWS_COUNTER = "canal_instance_rows_counter";
+ private static final String DELAY_HELP = "Traffic delay of canal instance in milliseconds";
+ private static final String TRANSACTION_HELP = "Transactions counter of canal instance";
+ private static final String ROW_EVENTS_HELP = "Rowdata events counter of canal instance";
+ private static final String ROWS_COUNTER_HELP = "Rows counter of canal instance";
private final ConcurrentMap instances = new ConcurrentHashMap();
private EntryCollector() {}
@@ -50,16 +55,24 @@ public class EntryCollector extends Collector implements InstanceRegistry {
DELAY_HELP, DEST_LABELS_LIST);
CounterMetricFamily transactions = new CounterMetricFamily(TRANSACTION,
TRANSACTION_HELP, DEST_LABELS_LIST);
+ CounterMetricFamily rowEvents = new CounterMetricFamily(ROW_EVENTS,
+ ROW_EVENTS_HELP, DEST_LABELS_LIST);
+ CounterMetricFamily rowsCounter = new CounterMetricFamily(ROWS_COUNTER,
+ ROWS_COUNTER_HELP, DEST_LABELS_LIST);
for (EntryMetricsHolder emh : instances.values()) {
long now = System.currentTimeMillis();
long latest = emh.latestExecTime.get();
- if (now > latest) {
+ if (now >= latest) {
delay.addMetric(emh.destLabelValues, (now - latest));
}
transactions.addMetric(emh.destLabelValues, emh.transactionCounter.doubleValue());
+ rowEvents.addMetric(emh.destLabelValues, emh.rowEventCounter.doubleValue());
+ rowsCounter.addMetric(emh.destLabelValues, emh.rowsCounter.doubleValue());
}
mfs.add(delay);
mfs.add(transactions);
+ mfs.add(rowEvents);
+ mfs.add(rowsCounter);
return mfs;
}
@@ -76,8 +89,12 @@ public class EntryCollector extends Collector implements InstanceRegistry {
PrometheusCanalEventDownStreamHandler handler = assembleHandler(entrySink);
holder.latestExecTime = handler.getLatestExecuteTime();
holder.transactionCounter = handler.getTransactionCounter();
+ holder.rowEventCounter = handler.getRowEventCounter();
+ holder.rowsCounter = handler.getRowsCounter();
Preconditions.checkNotNull(holder.latestExecTime);
Preconditions.checkNotNull(holder.transactionCounter);
+ Preconditions.checkNotNull(holder.rowEventCounter);
+ Preconditions.checkNotNull(holder.rowsCounter);
EntryMetricsHolder old = instances.put(destination, holder);
if (old != null) {
logger.warn("Remove stale EntryCollector for instance {}.", destination);
@@ -128,6 +145,8 @@ public class EntryCollector extends Collector implements InstanceRegistry {
private class EntryMetricsHolder {
private AtomicLong latestExecTime;
private AtomicLong transactionCounter;
+ private AtomicLong rowEventCounter;
+ private AtomicLong rowsCounter;
private List destLabelValues;
}
diff --git a/prometheus/src/main/java/com/alibaba/otter/canal/prometheus/impl/PrometheusCanalEventDownStreamHandler.java b/prometheus/src/main/java/com/alibaba/otter/canal/prometheus/impl/PrometheusCanalEventDownStreamHandler.java
index ebbbfa00..f81033a4 100644
--- a/prometheus/src/main/java/com/alibaba/otter/canal/prometheus/impl/PrometheusCanalEventDownStreamHandler.java
+++ b/prometheus/src/main/java/com/alibaba/otter/canal/prometheus/impl/PrometheusCanalEventDownStreamHandler.java
@@ -34,7 +34,8 @@ public class PrometheusCanalEventDownStreamHandler extends AbstractCanalEventDow
case ROWDATA: {
long exec = e.getExecuteTime();
if (exec > 0) localExecTime = exec;
- // TODO 当前proto无法直接获得荣威change的变更行数(需要parse),可考虑放到header里面
+ rowEventCounter.incrementAndGet();
+ rowsCounter.addAndGet(e.getRowsCount());
break;
}
case TRANSACTIONEND: {
@@ -44,14 +45,10 @@ public class PrometheusCanalEventDownStreamHandler extends AbstractCanalEventDow
break;
}
case HEARTBEAT:
- // 发现canal自己的heartbeat是带有execTime的
- // TODO 确认一下不是canal自己产生的
CanalEntry.EventType eventType = e.getEventType();
- // TODO utilize MySQL master heartbeat packet to refresh delay if always no more events coming
- // see: https://dev.mysql.com/worklog/task/?id=342
- // heartbeats are sent by the master only if there is no
- // more unsent events in the actual binlog file for a period longer that
- // master_heartbeat_period.
+ if (eventType == CanalEntry.EventType.MHEARTBEAT) {
+ localExecTime = System.currentTimeMillis();
+ }
break;
default:
break;
diff --git a/prometheus/src/main/java/com/alibaba/otter/canal/prometheus/impl/StoreCollector.java b/prometheus/src/main/java/com/alibaba/otter/canal/prometheus/impl/StoreCollector.java
index 8bd39574..3be87c3e 100644
--- a/prometheus/src/main/java/com/alibaba/otter/canal/prometheus/impl/StoreCollector.java
+++ b/prometheus/src/main/java/com/alibaba/otter/canal/prometheus/impl/StoreCollector.java
@@ -87,7 +87,8 @@ public class StoreCollector extends Collector implements InstanceRegistry {
return mfs;
}
- @Override public void register(CanalInstance instance) {
+ @Override
+ public void register(CanalInstance instance) {
final String destination = instance.getDestination();
StoreMetricsHolder holder = new StoreMetricsHolder();
CanalEventStore store = instance.getEventStore();
@@ -115,7 +116,8 @@ public class StoreCollector extends Collector implements InstanceRegistry {
}
}
- @Override public void unregister(CanalInstance instance) {
+ @Override
+ public void unregister(CanalInstance instance) {
final String destination = instance.getDestination();
instances.remove(destination);
}
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 1a0979db..051d8bf6 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,13051 +4,12836 @@
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),
- /**
- * GTIDLOG = 5;
- */
- GTIDLOG(4, 5), ;
-
- /**
- * 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;
- /**
- * GTIDLOG = 5;
- */
- public static final int GTIDLOG_VALUE = 5;
-
- 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;
- 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)
- }
+ 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),
- /**
- * 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), ;
+ 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;
- /**
- * 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;
- }
+ 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;
- case 12:
- return GTID;
- case 13:
- return XASTART;
- case 14:
- return XAEND;
- case 15:
- return XACOMMIT;
- case 16:
- return XAROLLBACK;
- 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 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 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),
+ /**
+ * XACOMMIT = 13;
+ *
+ *
+ ** XA *
+ *
+ */
+ XACOMMIT(12, 13),
+ /**
+ * XAROLLBACK = 14;
+ */
+ XAROLLBACK(13, 14),
+ /**
+ * MHEARTBEAT = 15;
+ *
+ *
+ ** MASTER HEARTBEAT *
+ *
+ */
+ MHEARTBEAT(14, 15),
+ ;
+
/**
- * 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;
+ /**
+ * XACOMMIT = 13;
+ *
+ *
+ ** XA *
+ *
+ */
+ public static final int XACOMMIT_VALUE = 13;
+ /**
+ * XAROLLBACK = 14;
+ */
+ public static final int XAROLLBACK_VALUE = 14;
+ /**
+ * MHEARTBEAT = 15;
+ *
+ *
+ ** MASTER HEARTBEAT *
+ *
+ */
+ public static final int MHEARTBEAT_VALUE = 15;
- /**
- * 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;
+ case 13: return XACOMMIT;
+ case 14: return XAROLLBACK;
+ case 15: return MHEARTBEAT;
+ 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 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 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 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 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;
+ *
+ *
+ **协议头部信息*
+ *
+ */
+ Header getHeader();
+ /**
+ * optional .com.alibaba.otter.canal.protocol.Header header = 1;
+ *
+ *
+ **协议头部信息*
+ *
+ */
+ 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];
+ *
+ *
+ **打散后的事件类型*
+ *
+ */
+ 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;
+ @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: {
+ Header.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ subBuilder = header_.toBuilder();
+ }
+ header_ = input.readMessage(Header.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(header_);
+ header_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000001;
+ break;
+ }
+ case 16: {
+ int rawValue = input.readEnum();
+ EntryType value = 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 CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Entry.class, 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);
+ }
+ };
+
+ @Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ private int bitField0_;
+ public static final int HEADER_FIELD_NUMBER = 1;
+ private 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 Header getHeader() {
+ return header_;
+ }
+ /**
+ * optional .com.alibaba.otter.canal.protocol.Header header = 1;
+ *
+ *
+ **协议头部信息*
+ *
+ */
+ public HeaderOrBuilder getHeaderOrBuilder() {
+ return header_;
+ }
+
+ public static final int ENTRYTYPE_FIELD_NUMBER = 2;
+ private 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 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_ = Header.getDefaultInstance();
+ entryType_ = 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;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static Entry parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static Entry parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static Entry parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static Entry parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static Entry parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static Entry parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static Entry parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static Entry parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static Entry parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static 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(Entry prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ 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 {
+ EntryOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return 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 FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Entry.class, 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(
+ 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_ = Header.getDefaultInstance();
+ } else {
+ headerBuilder_.clear();
}
+ bitField0_ = (bitField0_ & ~0x00000001);
+ entryType_ = 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 CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Entry_descriptor;
+ }
+
+ public Entry getDefaultInstanceForType() {
+ return Entry.getDefaultInstance();
+ }
+
+ public Entry build() {
+ Entry result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public Entry buildPartial() {
+ Entry result = new 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 Entry) {
+ return mergeFrom((Entry)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(Entry other) {
+ if (other == 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 {
+ Entry parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (Entry) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private Header header_ = Header.getDefaultInstance();
+ private com.google.protobuf.SingleFieldBuilder<
+ Header, Header.Builder, 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 Header getHeader() {
+ if (headerBuilder_ == null) {
+ return header_;
+ } else {
+ return headerBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .com.alibaba.otter.canal.protocol.Header header = 1;
+ *
+ *
+ **协议头部信息*
+ *
+ */
+ public Builder setHeader(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(
+ 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(Header value) {
+ if (headerBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) == 0x00000001) &&
+ header_ != Header.getDefaultInstance()) {
+ header_ =
+ 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_ = Header.getDefaultInstance();
+ onChanged();
+ } else {
+ headerBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ return this;
+ }
+ /**
+ * optional .com.alibaba.otter.canal.protocol.Header header = 1;
+ *
+ *
+ **协议头部信息*
+ *
+ */
+ public Header.Builder getHeaderBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getHeaderFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .com.alibaba.otter.canal.protocol.Header header = 1;
+ *
+ *
+ **协议头部信息*
+ *
+ */
+ public 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<
+ Header, Header.Builder, HeaderOrBuilder>
+ getHeaderFieldBuilder() {
+ if (headerBuilder_ == null) {
+ headerBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ Header, Header.Builder, HeaderOrBuilder>(
+ getHeader(),
+ getParentForChildren(),
+ isClean());
+ header_ = null;
+ }
+ return headerBuilder_;
+ }
+
+ private EntryType entryType_ = 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 EntryType getEntryType() {
+ return entryType_;
+ }
+ /**
+ * optional .com.alibaba.otter.canal.protocol.EntryType entryType = 2 [default = ROWDATA];
+ *
+ *
+ **打散后的事件类型*
+ *
+ */
+ public Builder setEntryType(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_ = 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 extends com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> 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();
+ 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 文件名*
+ *
+ */
+ 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;
+ *
+ *
+ ** 变更数据的编码 *
+ *
+ */
+ 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];
+ *
+ *
+ ** 变更数据的来源*
+ *
+ */
+ Type getSourceType();
+
+ /**
+ * optional string schemaName = 8;
+ *
+ *
+ ** 变更数据的schemaname*
+ *
+ */
+ boolean hasSchemaName();
+ /**
+ * optional string schemaName = 8;
+ *
+ *
+ ** 变更数据的schemaname*
+ *
+ */
+ String getSchemaName();
+ /**
+ * optional string schemaName = 8;
+ *
+ *
+ ** 变更数据的schemaname*
+ *
+ */
+ com.google.protobuf.ByteString
+ getSchemaNameBytes();
+
+ /**
+ * optional string tableName = 9;
+ *
+ *
+ **变更数据的tablename*
+ *
+ */
+ boolean hasTableName();
+ /**
+ * optional string tableName = 9;
+ *
+ *
+ **变更数据的tablename*
+ *
+ */
+ 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];
+ *
+ *
+ **数据变更类型*
+ *
+ */
+ EventType getEventType();
+
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Pair props = 12;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ java.util.List
+ getPropsList();
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Pair props = 12;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ 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 extends PairOrBuilder>
+ getPropsOrBuilderList();
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Pair props = 12;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ PairOrBuilder getPropsOrBuilder(int index);
+
+ /**
+ * optional string gtid = 13;
+ *
+ *
+ **当前事务的gitd*
+ *
+ */
+ boolean hasGtid();
+ /**
+ * optional string gtid = 13;
+ *
+ *
+ **当前事务的gitd*
+ *
+ */
+ 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;
+ @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();
+ Type value = 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();
+ EventType value = 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(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 CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Header.class, 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);
+ }
+ };
+
+ @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 Object logfileName_;
+ /**
+ * optional string logfileName = 2;
+ *
+ *
+ **binlog/redolog 文件名*
+ *
+ */
+ public boolean hasLogfileName() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional string logfileName = 2;
+ *
+ *
+ **binlog/redolog 文件名*
+ *
+ */
+ public String getLogfileName() {
+ Object ref = logfileName_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ logfileName_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * optional string logfileName = 2;
+ *
+ *
+ **binlog/redolog 文件名*
+ *
+ */
+ public com.google.protobuf.ByteString
+ getLogfileNameBytes() {
+ Object ref = logfileName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (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 Object serverenCode_;
+ /**
+ * optional string serverenCode = 5;
+ *
+ *
+ ** 变更数据的编码 *
+ *
+ */
+ public boolean hasServerenCode() {
+ return ((bitField0_ & 0x00000010) == 0x00000010);
+ }
+ /**
+ * optional string serverenCode = 5;
+ *
+ *
+ ** 变更数据的编码 *
+ *
+ */
+ public String getServerenCode() {
+ Object ref = serverenCode_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ serverenCode_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * optional string serverenCode = 5;
+ *
+ *
+ ** 变更数据的编码 *
+ *
+ */
+ public com.google.protobuf.ByteString
+ getServerenCodeBytes() {
+ Object ref = serverenCode_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (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 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 Type getSourceType() {
+ return sourceType_;
+ }
+
+ public static final int SCHEMANAME_FIELD_NUMBER = 8;
+ private Object schemaName_;
+ /**
+ * optional string schemaName = 8;
+ *
+ *
+ ** 变更数据的schemaname*
+ *
+ */
+ public boolean hasSchemaName() {
+ return ((bitField0_ & 0x00000080) == 0x00000080);
+ }
+ /**
+ * optional string schemaName = 8;
+ *
+ *
+ ** 变更数据的schemaname*
+ *
+ */
+ public String getSchemaName() {
+ Object ref = schemaName_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ schemaName_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * optional string schemaName = 8;
+ *
+ *
+ ** 变更数据的schemaname*
+ *
+ */
+ public com.google.protobuf.ByteString
+ getSchemaNameBytes() {
+ Object ref = schemaName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ schemaName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TABLENAME_FIELD_NUMBER = 9;
+ private Object tableName_;
+ /**
+ * optional string tableName = 9;
+ *
+ *
+ **变更数据的tablename*
+ *
+ */
+ public boolean hasTableName() {
+ return ((bitField0_ & 0x00000100) == 0x00000100);
+ }
+ /**
+ * optional string tableName = 9;
+ *
+ *
+ **变更数据的tablename*
+ *
+ */
+ public String getTableName() {
+ Object ref = tableName_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ tableName_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * optional string tableName = 9;
+ *
+ *
+ **变更数据的tablename*
+ *
+ */
+ public com.google.protobuf.ByteString
+ getTableNameBytes() {
+ Object ref = tableName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (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 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 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 extends PairOrBuilder>
+ 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 Pair getProps(int index) {
+ return props_.get(index);
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Pair props = 12;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ public PairOrBuilder getPropsOrBuilder(
+ int index) {
+ return props_.get(index);
+ }
+
+ public static final int GTID_FIELD_NUMBER = 13;
+ private Object gtid_;
+ /**
+ * optional string gtid = 13;
+ *
+ *
+ **当前事务的gitd*
+ *
+ */
+ public boolean hasGtid() {
+ return ((bitField0_ & 0x00000800) == 0x00000800);
+ }
+ /**
+ * optional string gtid = 13;
+ *
+ *
+ **当前事务的gitd*
+ *
+ */
+ public String getGtid() {
+ Object ref = gtid_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ gtid_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * optional string gtid = 13;
+ *
+ *
+ **当前事务的gitd*
+ *
+ */
+ public com.google.protobuf.ByteString
+ getGtidBytes() {
+ Object ref = gtid_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (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_ = Type.MYSQL;
+ schemaName_ = "";
+ tableName_ = "";
+ eventLength_ = 0L;
+ eventType_ = 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;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static Header parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static Header parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static Header parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static Header parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static Header parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static Header parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static Header parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static Header parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static Header parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static 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(Header prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ 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;
- }
- 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 extends com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> 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*
- *
- */
- 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();
- }
- gtid_ = "";
- bitField0_ = (bitField0_ & ~0x00001000);
- 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();
- }
- 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 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 extends com.alibaba.otter.canal.protocol.CanalEntry.Pair> 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 extends com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> 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_;
- }
-
- 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)
+ HeaderOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Header.class, Builder.class);
+ }
+
+ // Construct using com.alibaba.otter.canal.protocol.CanalEntry.Header.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ 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_ = Type.MYSQL;
+ bitField0_ = (bitField0_ & ~0x00000040);
+ schemaName_ = "";
+ bitField0_ = (bitField0_ & ~0x00000080);
+ tableName_ = "";
+ bitField0_ = (bitField0_ & ~0x00000100);
+ eventLength_ = 0L;
+ bitField0_ = (bitField0_ & ~0x00000200);
+ eventType_ = 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 CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Header_descriptor;
+ }
+
+ public Header getDefaultInstanceForType() {
+ return Header.getDefaultInstance();
+ }
+
+ public Header build() {
+ Header result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public Header buildPartial() {
+ Header result = new 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 Header) {
+ return mergeFrom((Header)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(Header other) {
+ if (other == 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 {
+ Header parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (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 Object logfileName_ = "";
+ /**
+ * optional string logfileName = 2;
+ *
+ *
+ **binlog/redolog 文件名*
+ *
+ */
+ public boolean hasLogfileName() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional string logfileName = 2;
+ *
+ *
+ **binlog/redolog 文件名*
+ *
+ */
+ public String getLogfileName() {
+ Object ref = logfileName_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ logfileName_ = s;
+ }
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * optional string logfileName = 2;
+ *
+ *
+ **binlog/redolog 文件名*
+ *
+ */
+ public com.google.protobuf.ByteString
+ getLogfileNameBytes() {
+ Object ref = logfileName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ logfileName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * optional string logfileName = 2;
+ *
+ *
+ **binlog/redolog 文件名*
+ *
+ */
+ public Builder setLogfileName(
+ 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 Object serverenCode_ = "";
+ /**
+ * optional string serverenCode = 5;
+ *
+ *
+ ** 变更数据的编码 *
+ *
+ */
+ public boolean hasServerenCode() {
+ return ((bitField0_ & 0x00000010) == 0x00000010);
+ }
+ /**
+ * optional string serverenCode = 5;
+ *
+ *
+ ** 变更数据的编码 *
+ *
+ */
+ public String getServerenCode() {
+ Object ref = serverenCode_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ serverenCode_ = s;
+ }
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * optional string serverenCode = 5;
+ *
+ *
+ ** 变更数据的编码 *
+ *
+ */
+ public com.google.protobuf.ByteString
+ getServerenCodeBytes() {
+ Object ref = serverenCode_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ serverenCode_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * optional string serverenCode = 5;
+ *
+ *
+ ** 变更数据的编码 *
+ *
+ */
+ public Builder setServerenCode(
+ 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 Type sourceType_ = 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 Type getSourceType() {
+ return sourceType_;
+ }
+ /**
+ * optional .com.alibaba.otter.canal.protocol.Type sourceType = 7 [default = MYSQL];
+ *
+ *
+ ** 变更数据的来源*
+ *
+ */
+ public Builder setSourceType(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_ = Type.MYSQL;
+ onChanged();
+ return this;
+ }
+
+ private Object schemaName_ = "";
+ /**
+ * optional string schemaName = 8;
+ *
+ *
+ ** 变更数据的schemaname*
+ *
+ */
+ public boolean hasSchemaName() {
+ return ((bitField0_ & 0x00000080) == 0x00000080);
+ }
+ /**
+ * optional string schemaName = 8;
+ *
+ *
+ ** 变更数据的schemaname*
+ *
+ */
+ public String getSchemaName() {
+ Object ref = schemaName_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ schemaName_ = s;
+ }
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * optional string schemaName = 8;
+ *
+ *
+ ** 变更数据的schemaname*
+ *
+ */
+ public com.google.protobuf.ByteString
+ getSchemaNameBytes() {
+ Object ref = schemaName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ schemaName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * optional string schemaName = 8;
+ *
+ *
+ ** 变更数据的schemaname*
+ *
+ */
+ public Builder setSchemaName(
+ 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 Object tableName_ = "";
+ /**
+ * optional string tableName = 9;
+ *
+ *
+ **变更数据的tablename*
+ *
+ */
+ public boolean hasTableName() {
+ return ((bitField0_ & 0x00000100) == 0x00000100);
+ }
+ /**
+ * optional string tableName = 9;
+ *
+ *
+ **变更数据的tablename*
+ *
+ */
+ public String getTableName() {
+ Object ref = tableName_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ tableName_ = s;
+ }
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * optional string tableName = 9;
+ *
+ *
+ **变更数据的tablename*
+ *
+ */
+ public com.google.protobuf.ByteString
+ getTableNameBytes() {
+ Object ref = tableName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ tableName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * optional string tableName = 9;
+ *
+ *
+ **变更数据的tablename*
+ *
+ */
+ public Builder setTableName(
+ 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 EventType eventType_ = 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 EventType getEventType() {
+ return eventType_;
+ }
+ /**
+ * optional .com.alibaba.otter.canal.protocol.EventType eventType = 11 [default = UPDATE];
+ *
+ *
+ **数据变更类型*
+ *
+ */
+ public Builder setEventType(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_ = 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<
+ Pair, Pair.Builder, 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 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, 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, 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(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, 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(
+ 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, 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(
+ Iterable extends Pair> 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 Pair.Builder getPropsBuilder(
+ int index) {
+ return getPropsFieldBuilder().getBuilder(index);
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Pair props = 12;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ public 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 extends PairOrBuilder>
+ getPropsOrBuilderList() {
+ if (propsBuilder_ != null) {
+ return propsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(props_);
+ }
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Pair props = 12;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ public Pair.Builder addPropsBuilder() {
+ return getPropsFieldBuilder().addBuilder(
+ Pair.getDefaultInstance());
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Pair props = 12;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ public Pair.Builder addPropsBuilder(
+ int index) {
+ return getPropsFieldBuilder().addBuilder(
+ index, Pair.getDefaultInstance());
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Pair props = 12;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ public java.util.List
+ getPropsBuilderList() {
+ return getPropsFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilder<
+ Pair, Pair.Builder, PairOrBuilder>
+ getPropsFieldBuilder() {
+ if (propsBuilder_ == null) {
+ propsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
+ Pair, Pair.Builder, PairOrBuilder>(
+ props_,
+ ((bitField0_ & 0x00000800) == 0x00000800),
+ getParentForChildren(),
+ isClean());
+ props_ = null;
+ }
+ return propsBuilder_;
+ }
+
+ private Object gtid_ = "";
+ /**
+ * optional string gtid = 13;
+ *
+ *
+ **当前事务的gitd*
+ *
+ */
+ public boolean hasGtid() {
+ return ((bitField0_ & 0x00001000) == 0x00001000);
+ }
+ /**
+ * optional string gtid = 13;
+ *
+ *
+ **当前事务的gitd*
+ *
+ */
+ public String getGtid() {
+ Object ref = gtid_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ gtid_ = s;
+ }
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * optional string gtid = 13;
+ *
+ *
+ **当前事务的gitd*
+ *
+ */
+ public com.google.protobuf.ByteString
+ getGtidBytes() {
+ Object ref = gtid_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ gtid_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * optional string gtid = 13;
+ *
+ *
+ **当前事务的gitd*
+ *
+ */
+ public Builder setGtid(
+ 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 extends com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> 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中是没有的*
+ *
+ */
+ 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;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ 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 extends PairOrBuilder>
+ getPropsOrBuilderList();
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Pair props = 7;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ PairOrBuilder getPropsOrBuilder(int index);
+
+ /**
+ * optional string value = 8;
+ *
+ *
+ ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+ *
+ */
+ boolean hasValue();
+ /**
+ * optional string value = 8;
+ *
+ *
+ ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+ *
+ */
+ 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类型*
+ *
+ */
+ 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;
+ @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(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 CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Column.class, 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);
+ }
+ };
+
+ @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 Object name_;
+ /**
+ * optional string name = 3;
+ *
+ *
+ **字段名称(忽略大小写),在mysql中是没有的*
+ *
+ */
+ public boolean hasName() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional string name = 3;
+ *
+ *
+ **字段名称(忽略大小写),在mysql中是没有的*
+ *
+ */
+ public String getName() {
+ Object ref = name_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ name_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * optional string name = 3;
+ *
+ *
+ **字段名称(忽略大小写),在mysql中是没有的*
+ *
+ */
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (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 extends PairOrBuilder>
+ 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 Pair getProps(int index) {
+ return props_.get(index);
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Pair props = 7;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ public PairOrBuilder getPropsOrBuilder(
+ int index) {
+ return props_.get(index);
+ }
+
+ public static final int VALUE_FIELD_NUMBER = 8;
+ private Object value_;
+ /**
+ * optional string value = 8;
+ *
+ *
+ ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+ *
+ */
+ public boolean hasValue() {
+ return ((bitField0_ & 0x00000040) == 0x00000040);
+ }
+ /**
+ * optional string value = 8;
+ *
+ *
+ ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+ *
+ */
+ public String getValue() {
+ Object ref = value_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ value_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * optional string value = 8;
+ *
+ *
+ ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+ *
+ */
+ public com.google.protobuf.ByteString
+ getValueBytes() {
+ Object ref = value_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (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 Object mysqlType_;
+ /**
+ * optional string mysqlType = 10;
+ *
+ *
+ **字段mysql类型*
+ *
+ */
+ public boolean hasMysqlType() {
+ return ((bitField0_ & 0x00000100) == 0x00000100);
+ }
+ /**
+ * optional string mysqlType = 10;
+ *
+ *
+ **字段mysql类型*
+ *
+ */
+ public String getMysqlType() {
+ Object ref = mysqlType_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ mysqlType_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * optional string mysqlType = 10;
+ *
+ *
+ **字段mysql类型*
+ *
+ */
+ public com.google.protobuf.ByteString
+ getMysqlTypeBytes() {
+ Object ref = mysqlType_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (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;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static Column parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static Column parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static Column parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static Column parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static Column parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static Column parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static Column parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static Column parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static Column parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static 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(Column prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ 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 extends com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> 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 extends com.alibaba.otter.canal.protocol.CanalEntry.Pair> 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 extends com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> 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)
+ ColumnOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Column.class, Builder.class);
+ }
+
+ // Construct using com.alibaba.otter.canal.protocol.CanalEntry.Column.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ 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 CanalEntry.internal_static_com_alibaba_otter_canal_protocol_Column_descriptor;
+ }
+
+ public Column getDefaultInstanceForType() {
+ return Column.getDefaultInstance();
+ }
+
+ public Column build() {
+ Column result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public Column buildPartial() {
+ Column result = new 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 Column) {
+ return mergeFrom((Column)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(Column other) {
+ if (other == 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 {
+ Column parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (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 Object name_ = "";
+ /**
+ * optional string name = 3;
+ *
+ *
+ **字段名称(忽略大小写),在mysql中是没有的*
+ *
+ */
+ public boolean hasName() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional string name = 3;
+ *
+ *
+ **字段名称(忽略大小写),在mysql中是没有的*
+ *
+ */
+ public String getName() {
+ Object ref = name_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ name_ = s;
+ }
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * optional string name = 3;
+ *
+ *
+ **字段名称(忽略大小写),在mysql中是没有的*
+ *
+ */
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * optional string name = 3;
+ *
+ *
+ **字段名称(忽略大小写),在mysql中是没有的*
+ *
+ */
+ public Builder setName(
+ 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<
+ Pair, Pair.Builder, 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 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, 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, 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(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, 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(
+ 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, 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(
+ Iterable extends Pair> 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 Pair.Builder getPropsBuilder(
+ int index) {
+ return getPropsFieldBuilder().getBuilder(index);
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Pair props = 7;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ public 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 extends PairOrBuilder>
+ getPropsOrBuilderList() {
+ if (propsBuilder_ != null) {
+ return propsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(props_);
+ }
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Pair props = 7;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ public Pair.Builder addPropsBuilder() {
+ return getPropsFieldBuilder().addBuilder(
+ Pair.getDefaultInstance());
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Pair props = 7;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ public Pair.Builder addPropsBuilder(
+ int index) {
+ return getPropsFieldBuilder().addBuilder(
+ index, Pair.getDefaultInstance());
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Pair props = 7;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ public java.util.List
+ getPropsBuilderList() {
+ return getPropsFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilder<
+ Pair, Pair.Builder, PairOrBuilder>
+ getPropsFieldBuilder() {
+ if (propsBuilder_ == null) {
+ propsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
+ Pair, Pair.Builder, PairOrBuilder>(
+ props_,
+ ((bitField0_ & 0x00000040) == 0x00000040),
+ getParentForChildren(),
+ isClean());
+ props_ = null;
+ }
+ return propsBuilder_;
+ }
+
+ private Object value_ = "";
+ /**
+ * optional string value = 8;
+ *
+ *
+ ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+ *
+ */
+ public boolean hasValue() {
+ return ((bitField0_ & 0x00000080) == 0x00000080);
+ }
+ /**
+ * optional string value = 8;
+ *
+ *
+ ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+ *
+ */
+ public String getValue() {
+ Object ref = value_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ value_ = s;
+ }
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * optional string value = 8;
+ *
+ *
+ ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+ *
+ */
+ public com.google.protobuf.ByteString
+ getValueBytes() {
+ Object ref = value_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ value_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * optional string value = 8;
+ *
+ *
+ ** 字段值,timestamp,Datetime是一个时间格式的文本 *
+ *
+ */
+ public Builder setValue(
+ 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 Object mysqlType_ = "";
+ /**
+ * optional string mysqlType = 10;
+ *
+ *
+ **字段mysql类型*
+ *
+ */
+ public boolean hasMysqlType() {
+ return ((bitField0_ & 0x00000200) == 0x00000200);
+ }
+ /**
+ * optional string mysqlType = 10;
+ *
+ *
+ **字段mysql类型*
+ *
+ */
+ public String getMysqlType() {
+ Object ref = mysqlType_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ mysqlType_ = s;
+ }
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+ /**
+ * optional string mysqlType = 10;
+ *
+ *
+ **字段mysql类型*
+ *
+ */
+ public com.google.protobuf.ByteString
+ getMysqlTypeBytes() {
+ Object ref = mysqlType_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ mysqlType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * optional string mysqlType = 10;
+ *
+ *
+ **字段mysql类型*
+ *
+ */
+ public Builder setMysqlType(
+ 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 extends com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder> 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 extends com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder> 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 extends com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> 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;
+ *
+ *
+ ** 字段信息,增量数据(修改前,删除前) *
+ *
+ */
+ 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 extends ColumnOrBuilder>
+ getBeforeColumnsOrBuilderList();
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1;
+ *
+ *
+ ** 字段信息,增量数据(修改前,删除前) *
+ *
+ */
+ 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;
+ *
+ *
+ ** 字段信息,增量数据(修改后,新增后) *
+ *
+ */
+ 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 extends ColumnOrBuilder>
+ getAfterColumnsOrBuilderList();
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2;
+ *
+ *
+ ** 字段信息,增量数据(修改后,新增后) *
+ *
+ */
+ 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;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ 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 extends PairOrBuilder>
+ getPropsOrBuilderList();
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Pair props = 3;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ 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;
+ @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(Column.PARSER, extensionRegistry));
+ break;
+ }
+ case 18: {
+ if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+ afterColumns_ = new java.util.ArrayList();
+ mutable_bitField0_ |= 0x00000002;
+ }
+ afterColumns_.add(input.readMessage(Column.PARSER, extensionRegistry));
+ break;
+ }
+ case 26: {
+ if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+ props_ = new java.util.ArrayList();
+ mutable_bitField0_ |= 0x00000004;
+ }
+ props_.add(input.readMessage(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 CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ RowData.class, 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);
+ }
+ };
+
+ @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 extends ColumnOrBuilder>
+ 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 Column getBeforeColumns(int index) {
+ return beforeColumns_.get(index);
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1;
+ *
+ *
+ ** 字段信息,增量数据(修改前,删除前) *
+ *
+ */
+ public 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 extends ColumnOrBuilder>
+ 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 Column getAfterColumns(int index) {
+ return afterColumns_.get(index);
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2;
+ *
+ *
+ ** 字段信息,增量数据(修改后,新增后) *
+ *
+ */
+ public 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 extends PairOrBuilder>
+ 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 Pair getProps(int index) {
+ return props_.get(index);
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Pair props = 3;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ public 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;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static RowData parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static RowData parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static RowData parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static RowData parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static RowData parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static RowData parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static RowData parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static RowData parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static RowData parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static 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(RowData prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ 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 extends com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder> 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 extends com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder> 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 extends com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> 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 extends com.alibaba.otter.canal.protocol.CanalEntry.Column> 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 extends com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder> 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 extends com.alibaba.otter.canal.protocol.CanalEntry.Column> 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 extends com.alibaba.otter.canal.protocol.CanalEntry.ColumnOrBuilder> 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 extends com.alibaba.otter.canal.protocol.CanalEntry.Pair> 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 extends com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> 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)
+ RowDataOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ RowData.class, Builder.class);
+ }
+
+ // Construct using com.alibaba.otter.canal.protocol.CanalEntry.RowData.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ 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 CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowData_descriptor;
+ }
+
+ public RowData getDefaultInstanceForType() {
+ return RowData.getDefaultInstance();
+ }
+
+ public RowData build() {
+ RowData result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public RowData buildPartial() {
+ RowData result = new 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 RowData) {
+ return mergeFrom((RowData)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(RowData other) {
+ if (other == 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 {
+ RowData parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (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<
+ Column, Column.Builder, 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 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, 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, 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(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, 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(
+ 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, 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(
+ Iterable extends Column> 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 Column.Builder getBeforeColumnsBuilder(
+ int index) {
+ return getBeforeColumnsFieldBuilder().getBuilder(index);
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1;
+ *
+ *
+ ** 字段信息,增量数据(修改前,删除前) *
+ *
+ */
+ public 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 extends ColumnOrBuilder>
+ getBeforeColumnsOrBuilderList() {
+ if (beforeColumnsBuilder_ != null) {
+ return beforeColumnsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(beforeColumns_);
+ }
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1;
+ *
+ *
+ ** 字段信息,增量数据(修改前,删除前) *
+ *
+ */
+ public Column.Builder addBeforeColumnsBuilder() {
+ return getBeforeColumnsFieldBuilder().addBuilder(
+ Column.getDefaultInstance());
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1;
+ *
+ *
+ ** 字段信息,增量数据(修改前,删除前) *
+ *
+ */
+ public Column.Builder addBeforeColumnsBuilder(
+ int index) {
+ return getBeforeColumnsFieldBuilder().addBuilder(
+ index, Column.getDefaultInstance());
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Column beforeColumns = 1;
+ *
+ *
+ ** 字段信息,增量数据(修改前,删除前) *
+ *
+ */
+ public java.util.List
+ getBeforeColumnsBuilderList() {
+ return getBeforeColumnsFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilder<
+ Column, Column.Builder, ColumnOrBuilder>
+ getBeforeColumnsFieldBuilder() {
+ if (beforeColumnsBuilder_ == null) {
+ beforeColumnsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
+ Column, Column.Builder, 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<
+ Column, Column.Builder, 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 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, 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, 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(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, 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(
+ 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, 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(
+ Iterable extends Column> 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 Column.Builder getAfterColumnsBuilder(
+ int index) {
+ return getAfterColumnsFieldBuilder().getBuilder(index);
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2;
+ *
+ *
+ ** 字段信息,增量数据(修改后,新增后) *
+ *
+ */
+ public 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 extends ColumnOrBuilder>
+ getAfterColumnsOrBuilderList() {
+ if (afterColumnsBuilder_ != null) {
+ return afterColumnsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(afterColumns_);
+ }
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2;
+ *
+ *
+ ** 字段信息,增量数据(修改后,新增后) *
+ *
+ */
+ public Column.Builder addAfterColumnsBuilder() {
+ return getAfterColumnsFieldBuilder().addBuilder(
+ Column.getDefaultInstance());
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2;
+ *
+ *
+ ** 字段信息,增量数据(修改后,新增后) *
+ *
+ */
+ public Column.Builder addAfterColumnsBuilder(
+ int index) {
+ return getAfterColumnsFieldBuilder().addBuilder(
+ index, Column.getDefaultInstance());
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Column afterColumns = 2;
+ *
+ *
+ ** 字段信息,增量数据(修改后,新增后) *
+ *
+ */
+ public java.util.List
+ getAfterColumnsBuilderList() {
+ return getAfterColumnsFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilder<
+ Column, Column.Builder, ColumnOrBuilder>
+ getAfterColumnsFieldBuilder() {
+ if (afterColumnsBuilder_ == null) {
+ afterColumnsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
+ Column, Column.Builder, 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<
+ Pair, Pair.Builder, 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 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, 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, 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(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, 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(
+ 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, 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(
+ Iterable extends Pair> 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 Pair.Builder getPropsBuilder(
+ int index) {
+ return getPropsFieldBuilder().getBuilder(index);
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Pair props = 3;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ public 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 extends PairOrBuilder>
+ getPropsOrBuilderList() {
+ if (propsBuilder_ != null) {
+ return propsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(props_);
+ }
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Pair props = 3;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ public Pair.Builder addPropsBuilder() {
+ return getPropsFieldBuilder().addBuilder(
+ Pair.getDefaultInstance());
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Pair props = 3;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ public Pair.Builder addPropsBuilder(
+ int index) {
+ return getPropsFieldBuilder().addBuilder(
+ index, Pair.getDefaultInstance());
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Pair props = 3;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ public java.util.List
+ getPropsBuilderList() {
+ return getPropsFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilder<
+ Pair, Pair.Builder, PairOrBuilder>
+ getPropsFieldBuilder() {
+ if (propsBuilder_ == null) {
+ propsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
+ Pair, Pair.Builder, 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 extends com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder> 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 extends com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> 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];
+ *
+ *
+ **数据变更类型*
+ *
+ */
+ 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语句 *
+ *
+ */
+ 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;
+ *
+ *
+ ** 一次数据库变更可能存在多行 *
+ *
+ */
+ 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 extends RowDataOrBuilder>
+ getRowDatasOrBuilderList();
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;
+ *
+ *
+ ** 一次数据库变更可能存在多行 *
+ *
+ */
+ 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;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ 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 extends PairOrBuilder>
+ getPropsOrBuilderList();
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Pair props = 13;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ 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 *
+ *
+ */
+ 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;
+ @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();
+ EventType value = 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(RowData.PARSER, extensionRegistry));
+ break;
+ }
+ case 106: {
+ if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
+ props_ = new java.util.ArrayList();
+ mutable_bitField0_ |= 0x00000020;
+ }
+ props_.add(input.readMessage(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 CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return CanalEntry.internal_static_com_alibaba_otter_canal_protocol_RowChange_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ RowChange.class, 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);
+ }
+ };
+
+ @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 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 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 Object sql_;
+ /**
+ * optional string sql = 11;
+ *
+ *
+ ** ddl/query的sql语句 *
+ *
+ */
+ public boolean hasSql() {
+ return ((bitField0_ & 0x00000008) == 0x00000008);
+ }
+ /**
+ * optional string sql = 11;
+ *
+ *
+ ** ddl/query的sql语句 *
+ *
+ */
+ public String getSql() {
+ Object ref = sql_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ sql_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * optional string sql = 11;
+ *
+ *
+ ** ddl/query的sql语句 *
+ *
+ */
+ public com.google.protobuf.ByteString
+ getSqlBytes() {
+ Object ref = sql_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (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 extends RowDataOrBuilder>
+ 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 RowData getRowDatas(int index) {
+ return rowDatas_.get(index);
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.RowData rowDatas = 12;
+ *
+ *
+ ** 一次数据库变更可能存在多行 *
+ *
+ */
+ public 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 extends PairOrBuilder>
+ 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 Pair getProps(int index) {
+ return props_.get(index);
+ }
+ /**
+ * repeated .com.alibaba.otter.canal.protocol.Pair props = 13;
+ *
+ *
+ **预留扩展*
+ *
+ */
+ public PairOrBuilder getPropsOrBuilder(
+ int index) {
+ return props_.get(index);
+ }
+
+ public static final int DDLSCHEMANAME_FIELD_NUMBER = 14;
+ private 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 String getDdlSchemaName() {
+ Object ref = ddlSchemaName_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ 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() {
+ Object ref = ddlSchemaName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (String) ref);
+ ddlSchemaName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private void initFields() {
+ tableId_ = 0L;
+ eventType_ = 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;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static RowChange parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static RowChange parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static RowChange parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static RowChange parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static RowChange parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static RowChange parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static RowChange parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static RowChange parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static RowChange parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static 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(RowChange prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ 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 extends com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder> 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 extends com.alibaba.otter.canal.protocol.CanalEntry.PairOrBuilder> 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 extends com.alibaba.otter.canal.protocol.CanalEntry.RowData> 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 extends com.alibaba.otter.canal.protocol.CanalEntry.RowDataOrBuilder> 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();
- }
- }
-
- /**
- *