Skip to content

Commit 7ec03c3

Browse files
committed
Dont call hsync() and hflush()
hflush and hsync are only needed for special cases and are overkill here
1 parent d4384d3 commit 7ec03c3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

parquet-hadoop/src/main/java/org/apache/parquet/hadoop/util/HadoopPositionOutputStream.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ public void write(byte[] b, int off, int len) throws IOException {
5050
wrapped.write(b, off, len);
5151
}
5252

53+
@Deprecated
5354
public void sync() throws IOException {
54-
wrapped.hsync();
55+
// sync is not necessary for Parquet use cases.
5556
}
5657

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

6263
@Override
6364
public void close() throws IOException {
64-
try (FSDataOutputStream fdos = wrapped) {
65-
fdos.hflush();
66-
}
65+
wrapped.close();
6766
}
6867
}

0 commit comments

Comments
 (0)