sv2000 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_r342926449
 
 

 ##########
 File path: 
gobblin-modules/gobblin-kafka-common/src/main/java/org/apache/gobblin/source/extractor/extract/kafka/KafkaExtractor.java
 ##########
 @@ -392,112 +303,16 @@ public long getExpectedRecordCount() {
 
   @Override
   public void close() throws IOException {
-    if (currentPartitionIdx != INITIAL_PARTITION_IDX) {
-      updateStatisticsForCurrentPartition();
+    if (!allPartitionsFinished()) {
 
 Review comment:
   Yes, the current implementation is confusing when end of partitions is 
reached. It calls updateStatisticsForCurrentPartition(), but essentially does 
nothing inside the method, since recordCount == 0. The change IMO is more 
readable.  

----------------------------------------------------------------
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

Reply via email to