public UpdateRowsEventInfo(TableInfo tableInfo, Long timestamp, String binlogFilename, Long binlogPosition, UpdateRowsEventData data) { super(tableInfo, UPDATE_EVENT, timestamp, binlogFilename, binlogPosition, data.getIncludedColumns(), data.getRows()); includedColumnsBeforeUpdate = data.getIncludedColumnsBeforeUpdate(); }
BitSet includedColumns = update.getIncludedColumns();
private List<Map.Entry<Serializable[], Serializable[]>> deserializeRows(UpdateRowsEventData eventData, ByteArrayInputStream inputStream) throws IOException { long tableId = eventData.getTableId(); BitSet includedColumnsBeforeUpdate = eventData.getIncludedColumnsBeforeUpdate(), includedColumns = eventData.getIncludedColumns(); List<Map.Entry<Serializable[], Serializable[]>> rows = new ArrayList<Map.Entry<Serializable[], Serializable[]>>(); while (inputStream.available() > 0) { rows.add(new AbstractMap.SimpleEntry<Serializable[], Serializable[]>( deserializeRow(tableId, includedColumnsBeforeUpdate, inputStream), deserializeRow(tableId, includedColumns, inputStream) )); } return rows; }
Serializable[] oldData = e.getKey(); RowMap r = buildRowMap("update", position, nextPosition, data, table, updateRowsData().getIncludedColumns(), rowQuery); writeOldData(table, r, oldData, updateRowsData().getIncludedColumnsBeforeUpdate()); list.add(r);
public UpdateRowsEventInfo(TableInfo tableInfo, Long timestamp, String binlogFilename, Long binlogPosition, UpdateRowsEventData data) { super(tableInfo, UPDATE_EVENT, timestamp, binlogFilename, binlogPosition, data.getIncludedColumns(), data.getRows()); includedColumnsBeforeUpdate = data.getIncludedColumnsBeforeUpdate(); }
private List<Map.Entry<Serializable[], Serializable[]>> deserializeRows(UpdateRowsEventData eventData, ByteArrayInputStream inputStream) throws IOException { long tableId = eventData.getTableId(); BitSet includedColumnsBeforeUpdate = eventData.getIncludedColumnsBeforeUpdate(), includedColumns = eventData.getIncludedColumns(); List<Map.Entry<Serializable[], Serializable[]>> rows = new ArrayList<Map.Entry<Serializable[], Serializable[]>>(); while (inputStream.available() > 0) { rows.add(new AbstractMap.SimpleEntry<Serializable[], Serializable[]>( deserializeRow(tableId, includedColumnsBeforeUpdate, inputStream), deserializeRow(tableId, includedColumns, inputStream) )); } return rows; }