HenryCaiHaiying commented on code in PR #17025:
URL: https://github.com/apache/iceberg/pull/17025#discussion_r3556915638
##########
kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/channel/Channel.java:
##########
@@ -117,27 +117,36 @@ protected void send(List<Event> events,
Map<TopicPartition, Offset> sourceOffset
protected abstract boolean receive(Envelope envelope);
protected void consumeAvailable(Duration pollDuration) {
- ConsumerRecords<String, byte[]> records = consumer.poll(pollDuration);
- while (!records.isEmpty()) {
- records.forEach(
- record -> {
- // the consumer stores the offsets that corresponds to the next
record to consume,
- // so increment the record offset by one
- controlTopicOffsets.put(record.partition(), record.offset() + 1);
-
- Event event = AvroUtil.decode(record.value());
-
- if (event.groupId().equals(connectGroupId)) {
- LOG.debug("Received event of type: {}", event.type().name());
- if (receive(new Envelope(event, record.partition(),
record.offset()))) {
- LOG.info("Handled event of type: {}", event.type().name());
+ long start = System.currentTimeMillis();
Review Comment:
Good catch, will change to System.nanoTime().
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]