本文整理了Java中com.github.shyiko.mysql.binlog.event.WriteRowsEventData.getRows()
方法的一些代码示例,展示了WriteRowsEventData.getRows()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WriteRowsEventData.getRows()
方法的具体详情如下:
包路径:com.github.shyiko.mysql.binlog.event.WriteRowsEventData
类名称:WriteRowsEventData
方法名:getRows
暂无
代码示例来源:origin: apache/nifi
public InsertRowsEventInfo(TableInfo tableInfo, Long timestamp, String binlogFilename, Long binlogPosition, WriteRowsEventData data) {
super(tableInfo, INSERT_EVENT, timestamp, binlogFilename, binlogPosition, data.getIncludedColumns(), data.getRows());
this.data = data;
}
}
代码示例来源:origin: apache/rocketmq-externals
private void processWriteEvent(Event event) {
WriteRowsEventData data = event.getData();
Long tableId = data.getTableId();
List<Serializable[]> list = data.getRows();
for (Serializable[] row : list) {
addRow("WRITE", tableId, row);
}
}
代码示例来源:origin: debezium/debezium
protected void assertRows(WriteRowsEventData eventData, int numRowsInEvent, Serializable... expectedValuesInRows) {
assertThat(eventData.getRows().size()).isEqualTo(numRowsInEvent);
int valuePosition = 0;
for (Serializable[] row : eventData.getRows()) {
for (Serializable value : row) {
assertThat(value).isEqualTo(expectedValuesInRows[valuePosition++]);
}
}
}
代码示例来源:origin: debezium/debezium
protected void assertRows(WriteRowsEventData eventData, RowBuilder rows) {
assertThat(eventData.getRows().size()).isEqualTo(rows.rows().size());
for (Serializable[] removedRow : eventData.getRows()) {
if (!rows.findInsertedRow(removedRow)) {
fail("Failed to find inserted row: " + eventData);
}
}
}
代码示例来源:origin: debezium/debezium
RecordsForTable recordMaker = recordMakers.forTable(tableNumber, includedColumns, super::enqueueRecord);
if (recordMaker != null) {
List<Serializable[]> rows = write.getRows();
Long ts = context.getClock().currentTimeInMillis();
int count = 0;
代码示例来源:origin: zendesk/maxwell
case WRITE_ROWS:
case EXT_WRITE_ROWS:
for ( Serializable[] data : writeRowsData().getRows() ) {
list.add(buildRowMap("insert", position, nextPosition, data, table, writeRowsData().getIncludedColumns(), rowQuery));
代码示例来源:origin: eventuate-local/eventuate-local
private Serializable getValue(WriteRowsEventData eventData, String columnName) {
if(columnOrders.containsKey(columnName)) {
return eventData.getRows().get(0)[columnOrders.get(columnName) - 1];
}
throw new RuntimeException("Column with name [" + columnName + "] not found");
}
代码示例来源:origin: networknt/light-eventuate-4j
private Serializable getValue(WriteRowsEventData eventData, String columnName) {
if(columnOrders.containsKey(columnName)) {
return eventData.getRows().get(0)[columnOrders.get(columnName) - 1];
}
throw new RuntimeException("Column with name [" + columnName + "] not found");
}
代码示例来源:origin: io.eventuate.tram.core/eventuate-tram-cdc-mysql-connector
private Serializable getValue(WriteRowsEventData eventData, String columnName) {
if(columnOrders.containsKey(columnName)) {
return eventData.getRows().get(0)[columnOrders.get(columnName) - 1];
}
throw new RuntimeException("Column with name [" + columnName + "] not found. Have " + columnOrders.keySet());
}
代码示例来源:origin: eventuate-tram/eventuate-tram-core
private Serializable getValue(WriteRowsEventData eventData, String columnName) {
if(columnOrders.containsKey(columnName)) {
return eventData.getRows().get(0)[columnOrders.get(columnName) - 1];
}
throw new RuntimeException("Column with name [" + columnName + "] not found. Have " + columnOrders.keySet());
}
代码示例来源:origin: org.apache.nifi/nifi-cdc-mysql-processors
public InsertRowsEventInfo(TableInfo tableInfo, Long timestamp, String binlogFilename, Long binlogPosition, WriteRowsEventData data) {
super(tableInfo, INSERT_EVENT, timestamp, binlogFilename, binlogPosition, data.getIncludedColumns(), data.getRows());
this.data = data;
}
}
代码示例来源:origin: io.debezium/debezium-connector-mysql
protected void assertRows(WriteRowsEventData eventData, int numRowsInEvent, Serializable... expectedValuesInRows) {
assertThat(eventData.getRows().size()).isEqualTo(numRowsInEvent);
int valuePosition = 0;
for (Serializable[] row : eventData.getRows()) {
for (Serializable value : row) {
assertThat(value).isEqualTo(expectedValuesInRows[valuePosition++]);
}
}
}
代码示例来源:origin: io.debezium/debezium-connector-mysql
protected void assertRows(WriteRowsEventData eventData, RowBuilder rows) {
assertThat(eventData.getRows().size()).isEqualTo(rows.rows().size());
for (Serializable[] removedRow : eventData.getRows()) {
if (!rows.findInsertedRow(removedRow)) {
fail("Failed to find inserted row: " + eventData);
}
}
}
代码示例来源:origin: perfectsense/dari
d.getRows().forEach(row -> {
if (LOGGER.isInfoEnabled()) {
LOGGER.debug("Pending write: {}", StringUtils.hex((byte[]) row[0]));
代码示例来源:origin: perfectsense/dari
for (Serializable[] row : ((WriteRowsEventData) eventData).getRows()) {
byte[] data = row[2] instanceof byte[] ? (byte[]) row[2]
: row[2] instanceof String ? ((String) row[2]).getBytes(Charsets.UTF_8)
内容来源于网络,如有侵权,请联系作者删除!