com.github.shyiko.mysql.binlog.BinaryLogClient.getBinlogFilename()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(104)

本文整理了Java中com.github.shyiko.mysql.binlog.BinaryLogClient.getBinlogFilename()方法的一些代码示例,展示了BinaryLogClient.getBinlogFilename()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BinaryLogClient.getBinlogFilename()方法的具体详情如下:
包路径:com.github.shyiko.mysql.binlog.BinaryLogClient
类名称:BinaryLogClient
方法名:getBinlogFilename

BinaryLogClient.getBinlogFilename介绍

暂无

代码示例

代码示例来源:origin: debezium/debezium

@Override
public String getBinlogFilename() {
  return this.client.getBinlogFilename();
}

代码示例来源:origin: debezium/debezium

private void logReaderState(Level severity) {
  final Object position = client == null ? "N/A" : client.getBinlogFilename() + "/" + client.getBinlogPosition();
  final String message = "Error during binlog processing. Last offset stored = {}, binlog reader near position = {}";
  switch (severity) {
  case WARN:
    logger.warn(message, lastOffset, position);
    break;
  case DEBUG:
    logger.debug(message, lastOffset, position);
    break;
  default:
    logger.error(message, lastOffset, position);
  }
}

代码示例来源:origin: apache/nifi

@Override
  public void onEvent(Event event) {
    while (!stopNow.get()) {
      RawBinlogEvent ep = new RawBinlogEvent(event, client.getBinlogFilename());
      try {
        if (queue.offer(ep, QUEUE_OFFER_TIMEOUT_MSEC, TimeUnit.MILLISECONDS)) {
          return;
        } else {
          throw new RuntimeException("Unable to add event to the queue");
        }
      } catch (InterruptedException e) {
        throw new RuntimeException("Interrupted while adding event to the queue");
      }
    }
  }
}

代码示例来源:origin: debezium/debezium

public BinlogPosition getCurrentBinlogPosition() {
    return new BinlogPosition(client.getBinlogFilename(), client.getBinlogPosition());
  }
}

代码示例来源:origin: zendesk/maxwell

BinlogConnectorEvent ep = new BinlogConnectorEvent(event, client.getBinlogFilename(), client.getGtidSet(), gtid, outputConfig);

代码示例来源:origin: zendesk/maxwell

private void ensureReplicatorThread() throws Exception {
  checkCommErrors();
  if ( !client.isConnected() && !stopOnEOF ) {
    if (this.gtidPositioning) {
      // When using gtid positioning, reconnecting should take us to the top
      // of the gtid event.  We throw away any binlog position we have
      // (other than GTID) and bail out of getTransactionRows()
      LOGGER.warn("replicator stopped at position: {} -- restarting", client.getGtidSet());
      client.setBinlogFilename("");
      client.setBinlogPosition(4L);
      client.connect(5000);
      throw new ClientReconnectedException();
    } else {
      // standard binlog positioning is a lot easier; we can really reconnect anywhere
      // we like, so we don't have to bail out of the middle of an event.
      LOGGER.warn("replicator stopped at position: {} -- restarting", client.getBinlogFilename() + ":" + client.getBinlogPosition());
      client.connect(5000);
    }
  }
}

代码示例来源:origin: apache/rocketmq-externals

private void processXidEvent(Event event) {
  EventHeaderV4 header = event.getHeader();
  XidEventData data = event.getData();
  String binlogFilename = binaryLogClient.getBinlogFilename();
  Long position = header.getNextPosition();
  Long xid = data.getXid();
  BinlogPosition binlogPosition = new BinlogPosition(binlogFilename, position);
  transaction.setNextBinlogPosition(binlogPosition);
  transaction.setXid(xid);
  replicator.commit(transaction, true);
  transaction = new Transaction(config);
}

代码示例来源:origin: org.apache.nifi/nifi-cdc-mysql-processors

@Override
  public void onEvent(Event event) {
    while (!stopNow.get()) {
      RawBinlogEvent ep = new RawBinlogEvent(event, client.getBinlogFilename());
      try {
        if (queue.offer(ep, QUEUE_OFFER_TIMEOUT_MSEC, TimeUnit.MILLISECONDS)) {
          return;
        } else {
          throw new RuntimeException("Unable to add event to the queue");
        }
      } catch (InterruptedException e) {
        throw new RuntimeException("Interrupted while adding event to the queue");
      }
    }
  }
}

相关文章