doki23 commented on code in PR #2951:
URL: https://github.com/apache/parquet-java/pull/2951#discussion_r1677117449
##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileWriter.java:
##########
@@ -1658,11 +1659,15 @@ public void end(Map<String, String> extraMetaData)
throws IOException {
@Override
public void close() throws IOException {
+ if (closed) {
+ return;
+ }
try (PositionOutputStream temp = out) {
temp.flush();
if (crcAllocator != null) {
crcAllocator.close();
}
+ closed = true;
Review Comment:
I notice that `try {} finally { closed = true; }` is common in parquet
writer code base, so it' ok to follow up.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]