Java Code Examples for com.taobao.tddl.dbsync.binlog.LogBuffer#getFullString()
The following examples show how to use
com.taobao.tddl.dbsync.binlog.LogBuffer#getFullString() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HeartbeatLogEvent.java From canal-1.1.3 with Apache License 2.0 | 5 votes |
public HeartbeatLogEvent(LogHeader header, LogBuffer buffer, FormatDescriptionLogEvent descriptionEvent){ super(header); final int commonHeaderLen = descriptionEvent.commonHeaderLen; identLen = buffer.limit() - commonHeaderLen; if (identLen > FN_REFLEN - 1) { identLen = FN_REFLEN - 1; } logIdent = buffer.getFullString(commonHeaderLen, identLen, LogBuffer.ISO_8859_1); }
Example 2
Source File: RowsQueryLogEvent.java From canal-1.1.3 with Apache License 2.0 | 5 votes |
public RowsQueryLogEvent(LogHeader header, LogBuffer buffer, FormatDescriptionLogEvent descriptionEvent){ super(header, buffer, descriptionEvent); final int commonHeaderLen = descriptionEvent.commonHeaderLen; final int postHeaderLen = descriptionEvent.postHeaderLen[header.type - 1]; /* * m_rows_query length is stored using only one byte, but that length is * ignored and the complete query is read.m_rows_query长度只使用一个字节存储,但是这个长度是 *被忽略,然后读取完整的查询。 */ int offset = commonHeaderLen + postHeaderLen + 1; int len = buffer.limit() - offset; rowsQuery = buffer.getFullString(offset, len, LogBuffer.ISO_8859_1); }
Example 3
Source File: AnnotateRowsEvent.java From canal-1.1.3 with Apache License 2.0 | 5 votes |
public AnnotateRowsEvent(LogHeader header, LogBuffer buffer, FormatDescriptionLogEvent descriptionEvent){ super(header, buffer, descriptionEvent); final int commonHeaderLen = descriptionEvent.getCommonHeaderLen(); final int postHeaderLen = descriptionEvent.getPostHeaderLen()[header.getType() - 1]; int offset = commonHeaderLen + postHeaderLen; int len = buffer.limit() - offset; rowsQuery = buffer.getFullString(offset, len, LogBuffer.ISO_8859_1); }
Example 4
Source File: HeartbeatLogEvent.java From canal with Apache License 2.0 | 5 votes |
public HeartbeatLogEvent(LogHeader header, LogBuffer buffer, FormatDescriptionLogEvent descriptionEvent){ super(header); final int commonHeaderLen = descriptionEvent.commonHeaderLen; identLen = buffer.limit() - commonHeaderLen; if (identLen > FN_REFLEN - 1) { identLen = FN_REFLEN - 1; } logIdent = buffer.getFullString(commonHeaderLen, identLen, LogBuffer.ISO_8859_1); }
Example 5
Source File: RowsQueryLogEvent.java From canal with Apache License 2.0 | 5 votes |
public RowsQueryLogEvent(LogHeader header, LogBuffer buffer, FormatDescriptionLogEvent descriptionEvent){ super(header, buffer, descriptionEvent); final int commonHeaderLen = descriptionEvent.commonHeaderLen; final int postHeaderLen = descriptionEvent.postHeaderLen[header.type - 1]; /* * m_rows_query length is stored using only one byte, but that length is * ignored and the complete query is read. */ int offset = commonHeaderLen + postHeaderLen + 1; int len = buffer.limit() - offset; rowsQuery = buffer.getFullString(offset, len, LogBuffer.ISO_8859_1); }
Example 6
Source File: AnnotateRowsEvent.java From canal with Apache License 2.0 | 5 votes |
public AnnotateRowsEvent(LogHeader header, LogBuffer buffer, FormatDescriptionLogEvent descriptionEvent){ super(header, buffer, descriptionEvent); final int commonHeaderLen = descriptionEvent.getCommonHeaderLen(); final int postHeaderLen = descriptionEvent.getPostHeaderLen()[header.getType() - 1]; int offset = commonHeaderLen + postHeaderLen; int len = buffer.limit() - offset; rowsQuery = buffer.getFullString(offset, len, LogBuffer.ISO_8859_1); }