Skip to content

Commit

Permalink
Dont call hsync() and hflush()
Browse files Browse the repository at this point in the history
hflush and hsync are only needed for special cases and are overkill here
  • Loading branch information
CZuegner committed Oct 14, 2024
1 parent d4384d3 commit 7ec03c3
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ public void write(byte[] b, int off, int len) throws IOException {
wrapped.write(b, off, len);
}

@Deprecated
public void sync() throws IOException {
wrapped.hsync();
// sync is not necessary for Parquet use cases.
}

@Override
Expand All @@ -61,8 +62,6 @@ public void flush() throws IOException {

@Override
public void close() throws IOException {
try (FSDataOutputStream fdos = wrapped) {
fdos.hflush();
}
wrapped.close();
}
}

0 comments on commit 7ec03c3

Please sign in to comment.