Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class SizeAwareFSDataOutputStream extends FSDataOutputStream {

public SizeAwareFSDataOutputStream(Path path, FSDataOutputStream out, ConsistencyGuard consistencyGuard,
Runnable closeCallback) throws IOException {
super(out, null);
super(out, null, out.getPos());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even for correctness, we should pass the right start position (out.getPos()). Without this, does it overwrite the existing log blocks from the position of 0 when trying to append new log blocks on HDFS?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After digging into the code, the start position passed in here is only used by FSDataOutputStream.PositionCache to track the current position. So this is okay.

this.path = path;
this.closeCallback = closeCallback;
this.consistencyGuard = consistencyGuard;
Expand Down