序列化表格


软件包 net.neoremind.fountain.changedata.pb

类 net.neoremind.fountain.changedata.pb.DataUnitDef.ColumnMeta 继承 com.google.protobuf.GeneratedMessage 实现 Serializable

serialVersionUID: 0L

序列化方法

writeReplace

protected Object writeReplace()
                       throws ObjectStreamException
抛出:
ObjectStreamException
序列化字段

unknownFields

com.google.protobuf.UnknownFieldSet unknownFields

bitField0_

int bitField0_

dataType_

int dataType_

name_

Object name_

isPrimay_

boolean isPrimay_

isNull_

boolean isNull_

isUnsiged_

boolean isUnsiged_

memoizedIsInitialized

byte memoizedIsInitialized

memoizedSerializedSize

int memoizedSerializedSize

类 net.neoremind.fountain.changedata.pb.DataUnitDef.ColumnValue 继承 com.google.protobuf.GeneratedMessage 实现 Serializable

serialVersionUID: 0L

序列化方法

writeReplace

protected Object writeReplace()
                       throws ObjectStreamException
抛出:
ObjectStreamException
序列化字段

unknownFields

com.google.protobuf.UnknownFieldSet unknownFields

bitField0_

int bitField0_

valueOneofCase_

int valueOneofCase_

valueOneof_

Object valueOneof_

memoizedIsInitialized

byte memoizedIsInitialized

memoizedSerializedSize

int memoizedSerializedSize

类 net.neoremind.fountain.changedata.pb.DataUnitDef.DataSet 继承 com.google.protobuf.GeneratedMessage 实现 Serializable

serialVersionUID: 0L

序列化方法

writeReplace

protected Object writeReplace()
                       throws ObjectStreamException
抛出:
ObjectStreamException
序列化字段

unknownFields

com.google.protobuf.UnknownFieldSet unknownFields

bitField0_

int bitField0_

gtId_

long gtId_

tables_

List<E> tables_

memoizedIsInitialized

byte memoizedIsInitialized

memoizedSerializedSize

int memoizedSerializedSize

类 net.neoremind.fountain.changedata.pb.DataUnitDef.RowData 继承 com.google.protobuf.GeneratedMessage 实现 Serializable

serialVersionUID: 0L

序列化方法

writeReplace

protected Object writeReplace()
                       throws ObjectStreamException
抛出:
ObjectStreamException
序列化字段

unknownFields

com.google.protobuf.UnknownFieldSet unknownFields

bitField0_

int bitField0_

beforeValues_

List<E> beforeValues_

afterValues_

List<E> afterValues_

optype_

int optype_

memoizedIsInitialized

byte memoizedIsInitialized

memoizedSerializedSize

int memoizedSerializedSize

类 net.neoremind.fountain.changedata.pb.DataUnitDef.TableData 继承 com.google.protobuf.GeneratedMessage 实现 Serializable

serialVersionUID: 0L

序列化方法

writeReplace

protected Object writeReplace()
                       throws ObjectStreamException
抛出:
ObjectStreamException
序列化字段

unknownFields

com.google.protobuf.UnknownFieldSet unknownFields

bitField0_

int bitField0_

name_

Object name_

columnMeta_

List<E> columnMeta_

rows_

List<E> rows_

memoizedIsInitialized

byte memoizedIsInitialized

memoizedSerializedSize

int memoizedSerializedSize

软件包 net.neoremind.fountain.event

类 net.neoremind.fountain.event.BaseLogEvent 继承 Object 实现 Serializable

serialVersionUID: -2028542279856096302L

序列化字段

eventHeader

EventHeader eventHeader

软件包 net.neoremind.fountain.exception

类 net.neoremind.fountain.exception.DataErrorException 继承 RuntimeException 实现 Serializable

serialVersionUID: 4467092659706397673L

类 net.neoremind.fountain.exception.DataSourceInvalidException 继承 RuntimeException 实现 Serializable

serialVersionUID: -6354824241862111440L

类 net.neoremind.fountain.exception.EOFException 继承 RuntimeException 实现 Serializable

serialVersionUID: -5756919868588957107L

类 net.neoremind.fountain.exception.GtIdInvalidException 继承 RuntimeException 实现 Serializable

类 net.neoremind.fountain.exception.HalfDataSocketTimeoutException 继承 SocketTimeoutException 实现 Serializable

serialVersionUID: 1L

类 net.neoremind.fountain.exception.LengthEncodedIntegerEOFExp 继承 RuntimeException 实现 Serializable

serialVersionUID: 1L

类 net.neoremind.fountain.exception.LengthEncodedIntegerErrExp 继承 RuntimeException 实现 Serializable

serialVersionUID: 1L

类 net.neoremind.fountain.exception.LengthEncodedIntegerNullExp 继承 RuntimeException 实现 Serializable

serialVersionUID: 1L

类 net.neoremind.fountain.exception.ParamErrorException 继承 RuntimeException 实现 Serializable

serialVersionUID: -219817271534193116L


软件包 net.neoremind.fountain.pack.impl

类 net.neoremind.fountain.pack.impl.InvalidUnpackType 继承 RuntimeException 实现 Serializable

serialVersionUID: 1L


软件包 net.neoremind.fountain.packet

类 net.neoremind.fountain.packet.ClientAuthPacket 继承 MysqlPacket 实现 Serializable

serialVersionUID: 8370460395899023539L

序列化字段

username

String username
用户名


password

String password
密码

为空表示不需要密码验证登陆


databaseName

String databaseName
数据库名


charsetNumber

byte charsetNumber
字符编码


scrumbleBuff

byte[] scrumbleBuff
20-byte random challenge,用于密码加密使用,加密算法详细见Encrypter

类 net.neoremind.fountain.packet.CommandPacket 继承 MysqlPacket 实现 Serializable

serialVersionUID: -2746732761827410994L

序列化字段

command

byte command
基本上目前就是固定使用CommandTypeConstant.COM_QUERY


sql

String sql
待执行SQL,可以是insert、update、delete

类 net.neoremind.fountain.packet.EOFPacket 继承 MysqlPacket 实现 Serializable

serialVersionUID: -4501952768725151045L

序列化字段

eofFlag

byte eofFlag

warningCount

int warningCount

statusFlags

byte[] statusFlags

类 net.neoremind.fountain.packet.ErrorPacket 继承 MysqlPacket 实现 Serializable

serialVersionUID: -8788492242358140571L

序列化字段

errorFlag

byte errorFlag
[ff] header of the ERR packet

另请参见:
ErrorPacket.ERROR_FLAG

errorCode

int errorCode
error-code


sqlstateMarker

byte sqlstateMarker
marker of the SQL State


sqlstate

byte[] sqlstate
SQL State


message

String message
human readable error message

类 net.neoremind.fountain.packet.FieldDescriptionPacket 继承 MysqlPacket 实现 Serializable

serialVersionUID: 1585203012794038075L

序列化字段

catalog

String catalog
catalog (always "def")


dbName

String dbName
schema-name


tableAlias

String tableAlias
virtual table-name


tableName

String tableName
physical table-name


columnAlias

String columnAlias
virtual column name


columnName

String columnName
physical column name


character

int character
字符编码


length

long length
maximum length of the field


type

byte type
值采用ColumnTypeEnum

另请参见:
column-type

flags

int flags
flags


decimal

byte decimal
max shown decimal digits

0x00 for integers and static strings

0x1f for dynamic strings, double, float

0x00 to 0x51 for decimals


defaultExtra

byte[] defaultExtra
其他字段,目前仅在COM_FIELD_LIST使用

类 net.neoremind.fountain.packet.HandshakePacket 继承 MysqlPacket 实现 Serializable

serialVersionUID: 6362408117953514233L

序列化字段

protocolVersion

byte protocolVersion
0x0a protocol_version


version

String version
human-readable server version


threadId

int threadId
connection id


seed

byte[] seed
auth_plugin_data_part_1 (string.fix_len) -- [len=8] first 8 bytes of the auth-plugin data


serverCapabilities

int serverCapabilities
lower 2 bytes of the Protocol::CapabilityFlags (optional)


serverCharsetNumber

byte serverCharsetNumber
default server character-set, only the lower 8-bits Protocol::CharacterSet (optional)


serverStatus

int serverStatus
Protocol::StatusFlags


restOfScrambleBuff

byte[] restOfScrambleBuff
auth-plugin-data-part-2

类 net.neoremind.fountain.packet.MysqlPacket 继承 Object 实现 Serializable

serialVersionUID: -3279108465303346515L

类 net.neoremind.fountain.packet.OKPacket 继承 MysqlPacket 实现 Serializable

serialVersionUID: 939916149041573794L

序列化字段

okflag

byte okflag

affectRows

byte[] affectRows

insertId

byte[] insertId

serverStatus

int serverStatus

warningStatus

int warningStatus

message

String message

类 net.neoremind.fountain.packet.QueryCommandPacket 继承 CommandPacket 实现 Serializable

serialVersionUID: -4938658438038905663L

类 net.neoremind.fountain.packet.ResultSetHeaderPacket 继承 MysqlPacket 实现 Serializable

serialVersionUID: 541189365386345721L

序列化字段

columnCount

long columnCount

extra

byte[] extra

类 net.neoremind.fountain.packet.ResultSetPacket 继承 MysqlPacket 实现 Serializable

serialVersionUID: -293398433691579613L

序列化字段

fieldDescriptionList

List<E> fieldDescriptionList

rowValueList

List<E> rowValueList

类 net.neoremind.fountain.packet.RowValuePacket 继承 MysqlPacket 实现 Serializable

serialVersionUID: -7343791353841856383L

序列化字段

fieldValueList

List<E> fieldValueList

软件包 net.neoremind.fountain.rowbaselog.event

类 net.neoremind.fountain.rowbaselog.event.FormatDescriptionEvent 继承 BaseLogEvent 实现 Serializable

serialVersionUID: -2282983822156668425L

序列化字段

binlogVersion

int binlogVersion
2 bytes. The binary log format version. This is 4 in MySQL 5.0 and up.


serverVersion

String serverVersion
50 bytes. The MySQL server's version (example: 5.0.14-debug-log), padded with 0x00 bytes on the right.


binlogCreateTime

int binlogCreateTime
4 bytes. Timestamp in seconds when this event was created (this is the moment when the binary log was created). This value is redundant; the same value occurs in the timestamp header field.


eventHeaderLength

byte eventHeaderLength
1 byte. The header length. This length - 19 gives the size of the extra headers field at the end of the header for other events.


eventDataFixedPartLength

byte[] eventDataFixedPartLength
(string.EOF) a array indexed by Binlog Event Type - 1 to extract the length of the event specific header.

Variable-sized. An array that indicates the post-header lengths for all event types. There is one byte per event type that the server knows about.

event type header length这个字段,它保存了不同event的post-header长度, 实际是一个bitmap,这对每个event的type - 1就是对应的值的索引就存储了post header length


callback

FormatInfoCallback callback
在调用者线程的使用的回调


extraHeaderLen

int extraHeaderLen
event header length - 常规的FormatDescriptionEvent.NORMAL_HEADER_LENGTH

对于百度的MySQL用于存储gloabl transaction id

类 net.neoremind.fountain.rowbaselog.event.GtidEvent 继承 BaseLogEvent 实现 Serializable

serialVersionUID: 3904701082535625594L

序列化字段

sid

byte[] sid
MySQL Master的server uuid

目前是16个byte。例如:31a25a80-eee5-11e4-9dfd-90a380967173,按照16进制解析,去掉“-”,例如31代表0x31。

MySQL Master上的查看的SQL语句如下:

 mysql> show global variables like '%uuid%';
 +---------------+--------------------------------------+
 | Variable_name | Value                                |
 +---------------+--------------------------------------+
 | server_uuid   | 31a25a80-eee5-11e4-9dfd-90a380967173 |
 +---------------+--------------------------------------+
 


gtId

long gtId
GTID(Global Transaction Identifiers)即全局事务标识,是MySQL Master基于事务粒度生成的一个递增的id。

当使用GTIDS时,在主库上提交的每一个事务都会被识别和跟踪,并且运用到所有从MySQL,而且配置主从或者主从切换时不再需要指定 binlog_filename和binlog_position。

类 net.neoremind.fountain.rowbaselog.event.QueryLogEvent 继承 BaseLogEvent 实现 Serializable

serialVersionUID: -1567353892593172493L

序列化字段

threadId

int threadId
Query_log_event/QUERY_EVENT Fixed data part: 4 bytes. The ID of the thread that issued this statement. Needed for temporary tables. This is also useful for a DBA for knowing who did what on the master. 4 bytes. The time in seconds that the statement took to execute. Only useful for inspection by the DBA. 1 byte. The length of the name of the database which was the default database when the statement was executed. This name appears later, in the variable data part. It is necessary for statements such as INSERT INTO t VALUES(1) that don't specify the database and rely on the default database previously selected by USE. 2 bytes. The error code resulting from execution of the statement on the master. Error codes are defined in include/mysqld_error.h. 0 means no error. How come statements with a nonzero error code can exist in the binary log? This is mainly due to the use of nontransactional tables within transactions. For example, if an INSERT ... SELECT fails after inserting 1000 rows into a MyISAM table (for example, with a duplicate-key violation), we have to write this statement to the binary log, because it truly modified the MyISAM table. For transactional tables, there should be no event with a nonzero error code (though it can happen, for example if the connection was interrupted (Control-C)). The slave checks the error code: After executing the statement itself, it compares the error code it got with the error code in the event, and if they are different it stops replicating (unless --slave-skip-errors was used to ignore the error). 2 bytes (not present in v1, v3). The length of the status variable block. Variable part: Zero or more status variables (not present in v1, v3). Each status variable consists of one byte code identifying the variable stored, followed by the value of the variable. The format of the value is variable-specific, as described later. The default database name (null-terminated). The SQL statement. The slave knows the size of the other fields in the variable part (the sizes are given in the fixed data part), so by subtraction it can know the size of the statement. Each entry in the status variable block has a code and a value, where the value format is as indicated in the following list. The list provides basic information about each variable. For additional details, see log_event.h. --------------------------------------------- Q_FLAGS2_CODE = 0. Value is a 4-byte bit-field. This variable is written only as of MySQL 5.0. Q_SQL_MODE_CODE = 1. Value is an 8-byte SQL mode value. Q_CATALOG_CODE = 2. Value is the catalog name: a length byte followed by that many bytes, plus a terminating null byte. This variable is present only in MySQL 5.0.0 to 5.0.3. It was replaced with Q_CATALOG_NZ_CODE in MySQL 5.0.4 because the terminating null is unnecessary. Q_AUTO_INCREMENT = 3. Value is two 2-byte unsigned integers representing the auto_increment_increment and auto_increment_offset system variables. This variable is present only if auto_increment is greater than 1. Q_CHARSET_CODE = 4. Value is three 2-byte unsigned integers representing the character_set_client, collation_connection, and collation_server system variables. Q_TIME_ZONE_CODE = 5. Value is the time zone name: a length byte followed by that many bytes. This variable is present only if the time zone string is non-empty. Q_CATALOG_NZ_CODE = 6. Value is the catalog name: a length byte followed by that many bytes. Value is always std. This variable is present only if the catalog name is non-empty. Q_LC_TIME_NAMES_CODE = 7. Value is a 2-byte unsigned integer representing the lc_time_names number. This variable is present only if the value is not 0 (that is, not en_US). Q_CHARSET_DATABASE_CODE = 8. Value is a 2-byte unsigned integer representing the collation_database system variable. Q_TABLE_MAP_FOR_UPDATE_CODE = 9. Value is 8 bytes representing the table map to be updated by a multiple-table update statement. Each bit of this variable represents a table, and is set to 1 if the corresponding table is to be updated by the statement. Table_map_for_update is used to evaluate the filter rules specified by --replicate-do-table / --replicate-ignore-table.


executeTime

long executeTime

dbNameLength

byte dbNameLength

errorCode

int errorCode

statusVariableLength

int statusVariableLength

variableMap

Map<K,V> variableMap

dbName

String dbName

query

String query

类 net.neoremind.fountain.rowbaselog.event.RotateEvent 继承 BaseLogEvent 实现 Serializable

serialVersionUID: -3183442443627836016L

序列化字段

nextLogEventPos

long nextLogEventPos
下一个binlog事件的position


nextLogFileName

String nextLogFileName
下一个binglog文件名

类 net.neoremind.fountain.rowbaselog.event.RowsLogEvent 继承 BaseLogEvent 实现 Serializable

serialVersionUID: 1434103941591941107L

序列化字段

dataLen

int dataLen

tableId

long tableId

reserved

int reserved

columnsLength

int columnsLength

columnUsedBitSet

BitSet columnUsedBitSet

columnUpdateUsedBitSet

BitSet columnUpdateUsedBitSet

rowDataList

List<E> rowDataList

headerLen

int headerLen

eventType

byte eventType

tableInfoCallback

TableInfoCallback tableInfoCallback

columnParserFactory

ColumnDataParserFactory columnParserFactory

tableMeta

TableMeta tableMeta

类 net.neoremind.fountain.rowbaselog.event.RowsLogEventV1 继承 RowsLogEvent 实现 Serializable

serialVersionUID: 1L

类 net.neoremind.fountain.rowbaselog.event.RowsLogEventV2 继承 RowsLogEventV1 实现 Serializable

serialVersionUID: 1L

序列化字段

extraDataLen

int extraDataLen

extraData

byte[] extraData

类 net.neoremind.fountain.rowbaselog.event.StopEvent 继承 BaseLogEvent 实现 Serializable

serialVersionUID: 1025559648323251322L

类 net.neoremind.fountain.rowbaselog.event.TableMapEvent 继承 BaseLogEvent 实现 Serializable

serialVersionUID: -1326376560309798269L

序列化字段

tableId

long tableId
Fixed data part:

6 bytes. The table ID.

2 bytes. Reserved for future use.

Variable data part:

1 byte. The length of the database name.

Variable-sized. The database name (null-terminated).

1 byte. The length of the table name.

Variable-sized. The table name (null-terminated).

Packed integer. The number of columns in the table.

Variable-sized. An array of column types, one byte per column.

Packed integer. The length of the metadata block.

Variable-sized. The metadata block; see log_event.h for contents and format.

Variable-sized. Bit-field indicating whether each column can be NULL, one bit per column. For this field, the amount of storage required for N columns is INT((N+7)/8) bytes.


reserved

byte[] reserved

dbNameLength

byte dbNameLength

dbName

String dbName

tableNameLength

byte tableNameLength

tableName

String tableName

columnsLength

int columnsLength

columnInfoArray

TableMapEvent.ColumnInfo[] columnInfoArray

columnNullMap

BitSet columnNullMap

callback

TableEventCallback callback

类 net.neoremind.fountain.rowbaselog.event.UnkownBinlogEvent 继承 BaseLogEvent 实现 Serializable

serialVersionUID: 1L

类 net.neoremind.fountain.rowbaselog.event.XidLogEvent 继承 BaseLogEvent 实现 Serializable

serialVersionUID: 4904701088535615594L

序列化字段

xid

long xid



Copyright © 2016 neoremind. All rights reserved.