Tabnine Logo
DeleteRowsEventData
Code IndexAdd Tabnine to your IDE (free)

How to use
DeleteRowsEventData
in
com.github.shyiko.mysql.binlog.event

Best Java code snippets using com.github.shyiko.mysql.binlog.event.DeleteRowsEventData (Showing top 13 results out of 315)

origin: debezium/debezium

long tableNumber = deleted.getTableId();
BitSet includedColumns = deleted.getIncludedColumns();
RecordsForTable recordMaker = recordMakers.forTable(tableNumber, includedColumns, super::enqueueRecord);
if (recordMaker != null) {
  List<Serializable[]> rows = deleted.getRows();
  Long ts = context.getClock().currentTimeInMillis();
  int count = 0;
origin: shyiko/mysql-binlog-connector-java

@Override
public DeleteRowsEventData deserialize(ByteArrayInputStream inputStream) throws IOException {
  DeleteRowsEventData eventData = new DeleteRowsEventData();
  eventData.setTableId(inputStream.readLong(6));
  inputStream.readInteger(2); // reserved
  if (mayContainExtraInformation) {
    int extraInfoLength = inputStream.readInteger(2);
    inputStream.skip(extraInfoLength - 2);
  }
  int numberOfColumns = inputStream.readPackedInteger();
  eventData.setIncludedColumns(inputStream.readBitSet(numberOfColumns, true));
  eventData.setRows(deserializeRows(eventData.getTableId(), eventData.getIncludedColumns(), inputStream));
  return eventData;
}
origin: apache/nifi

  public DeleteRowsEventInfo(TableInfo tableInfo, Long timestamp, String binlogFilename, Long binlogPosition, DeleteRowsEventData data) {
    super(tableInfo, DELETE_EVENT, timestamp, binlogFilename, binlogPosition, data.getIncludedColumns(), data.getRows());
  }
}
origin: apache/rocketmq-externals

private void processDeleteEvent(Event event) {
  DeleteRowsEventData data = event.getData();
  Long tableId = data.getTableId();
  List<Serializable[]> list = data.getRows();
  for (Serializable[] row : list) {
    addRow("DELETE", tableId, row);
  }
}
origin: debezium/debezium

protected void assertRows(DeleteRowsEventData eventData, RowBuilder rows) {
  assertThat(eventData.getRows().size()).isEqualTo(rows.rows().size());
  for (Serializable[] removedRow : eventData.getRows()) {
    if (!rows.findDeletedRow(removedRow)) {
      fail("Failed to find removed row: " + eventData);
    }
  }
}
origin: zendesk/maxwell

public Long getTableID() {
  EventData data = event.getData();
  switch ( event.getHeader().getEventType() ) {
    case EXT_WRITE_ROWS:
    case WRITE_ROWS:
      return ((WriteRowsEventData) data).getTableId();
    case EXT_UPDATE_ROWS:
    case UPDATE_ROWS:
      return ((UpdateRowsEventData) data).getTableId();
    case EXT_DELETE_ROWS:
    case DELETE_ROWS:
      return ((DeleteRowsEventData) data).getTableId();
    case TABLE_MAP:
      return ((TableMapEventData) data).getTableId();
  }
  return null;
}
origin: zendesk/maxwell

case DELETE_ROWS:
case EXT_DELETE_ROWS:
  for ( Serializable[] data : deleteRowsData().getRows() ) {
    list.add(buildRowMap("delete", position, nextPosition, data, table, deleteRowsData().getIncludedColumns(), rowQuery));
origin: perfectsense/dari

DeleteRowsEventData d = (DeleteRowsEventData) eventData;
if (d.getTableId() == recordTableId) {
  d.getRows().forEach(row -> {
    if (LOGGER.isInfoEnabled()) {
      LOGGER.debug("Pending delete: {}", StringUtils.hex((byte[]) row[0]));
origin: io.debezium/debezium-connector-mysql

protected void assertRows(DeleteRowsEventData eventData, RowBuilder rows) {
  assertThat(eventData.getRows().size()).isEqualTo(rows.rows().size());
  for (Serializable[] removedRow : eventData.getRows()) {
    if (!rows.findDeletedRow(removedRow)) {
      fail("Failed to find removed row: " + eventData);
    }
  }
}
origin: perfectsense/dari

  tableId = ((UpdateRowsEventData) eventData).getTableId();
} else if (EventType.isDelete(eventType)) {
  tableId = ((DeleteRowsEventData) eventData).getTableId();
} else {
  LOGGER.info("[{}] event type isn't valid!", eventType);
origin: perfectsense/dari

@Override
public DeleteRowsEventData deserialize(ByteArrayInputStream inputStream) throws IOException {
  DeleteRowsEventData eventData = new DeleteRowsEventData();
  eventData.setTableId(inputStream.readLong(6));
  inputStream.readInteger(2); // reserved
  if (mayContainExtraInformation) {
    int extraInfoLength = inputStream.readInteger(2);
    inputStream.skip(extraInfoLength - 2);
  }
  int numberOfColumns = inputStream.readPackedInteger();
  eventData.setIncludedColumns(inputStream.readBitSet(numberOfColumns, true));
  eventData.setRows(deserializeRows(eventData.getTableId(), eventData.getIncludedColumns(), inputStream));
  return eventData;
}
origin: org.apache.nifi/nifi-cdc-mysql-processors

  public DeleteRowsEventInfo(TableInfo tableInfo, Long timestamp, String binlogFilename, Long binlogPosition, DeleteRowsEventData data) {
    super(tableInfo, DELETE_EVENT, timestamp, binlogFilename, binlogPosition, data.getIncludedColumns(), data.getRows());
  }
}
origin: perfectsense/dari

for (Serializable[] row : ((DeleteRowsEventData) eventData).getRows()) {
  invalidateCache((byte[]) row[0]);
com.github.shyiko.mysql.binlog.eventDeleteRowsEventData

Most used methods

  • getRows
  • getTableId
  • getIncludedColumns
  • <init>
  • setIncludedColumns
  • setRows
  • setTableId

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (Timer)
  • addToBackStack (FragmentTransaction)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now