Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengchenyu committed Oct 18, 2023
1 parent b0f0bfc commit bb37769
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ public void merge(List<MapOutput> inputs) throws IOException, InterruptedExcepti
} else {
runCombineProcessor(rIter, writer);
}
// The compressed length of writer is calculated when called Writer::close, we must
// update the counter after Writer::close. Counter should be updated in normal
// execution flow, so do not update counter in finally block.
writer.close();
additionalBytesWritten.increment(writer.getCompressedLength());
writer = null;
Expand Down

0 comments on commit bb37769

Please sign in to comment.