DBZ-2066 Add logs when the table snapshot is taken and when emitting a kafka message for a single record/mutation

This commit is contained in:
xuans 2020-05-15 16:06:38 -07:00 committed by Gunnar Morling
parent 11d9a34a16
commit a3de9c8c10
2 changed files with 3 additions and 0 deletions

View File

@ -52,7 +52,9 @@ public KafkaRecordEmitter(String kafkaTopicPrefix, String heartbeatPrefix, Prope
public void emit(Record record) {
synchronized (lock) {
ProducerRecord<byte[], byte[]> producerRecord = toProducerRecord(record);
LOGGER.debug("Sending the record '{}'", record.toString());
Future<RecordMetadata> future = producer.send(producerRecord);
LOGGER.debug("The record '{}' has been sent", record.toString());
futures.put(record, future);
maybeFlushAndMarkOffset();
}

View File

@ -155,6 +155,7 @@ private void takeTableSnapshot(TableMetadata tableMetadata) throws IOException {
LOGGER.info("Executing snapshot query '{}' with consistency level {}", statement.getQueryString(), statement.getConsistencyLevel());
ResultSet resultSet = cassandraClient.execute(statement);
processResultSet(tableMetadata, resultSet);
LOGGER.debug("The snapshot of table '{}' has been taken", tableName(tableMetadata));
}
/**