autumnust commented on a change in pull request #2795: GOBBLIN-945: Refactor Kafka extractor statistics tracking to allow co… URL: https://github.com/apache/incubator-gobblin/pull/2795#discussion_r342734740
########## File path: gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/source/extractor/extract/kafka/KafkaExtractor.java ########## @@ -216,25 +176,18 @@ public D readRecordImpl(D reuse) throws DataRecordException, IOException { D record = decodeKafkaMessage(nextValidMessage); - this.currentPartitionDecodeRecordTime += System.nanoTime() - decodeStartTime; - this.currentPartitionRecordCount++; - this.currentPartitionTotalSize += nextValidMessage.getValueSizeInBytes(); - this.currentPartitionReadRecordTime += System.nanoTime() - readStartTime; + this.statsTracker.onDecodeableRecord(this.currentPartitionIdx, readStartTime, decodeStartTime, nextValidMessage.getValueSizeInBytes()); Review comment: Seems there are some difference in terms of the intention for these two catch blocks, the former one indicates that there are exceptions thrown when current partition is drained and need to move to the next one, while the latter indicates "undecodability". Shall we preserve original intention here? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services