You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@parquet.apache.org by "Deng An (Jira)" <ji...@apache.org> on 2024/05/18 12:53:00 UTC

[jira] [Created] (PARQUET-2477) Files opened by ParquetFileWriter’s appendFile method should to be closed correctly

Deng An created PARQUET-2477:
--------------------------------

             Summary: Files opened by ParquetFileWriter’s appendFile method should to be closed correctly
                 Key: PARQUET-2477
                 URL: https://issues.apache.org/jira/browse/PARQUET-2477
             Project: Parquet
          Issue Type: Bug
          Components: parquet-hadoop
    Affects Versions: 1.13.1
            Reporter: Deng An


I try to use the `appendFile` method of `ParquetFileWriter` to merge some smaller Parquet files into one large parquet file. After I finished the merge, I tried deleting the smaller files, but couldn't actually delete them.

After reading the ParquetFileWriter source code, I found that the file he opened was not closed in the end method, which seemed unreasonable.

 

When testing on `Windows`, it was found that these implicitly opened files cannot be deleted or renamed. This seems to be related to Windows file handles. But it's worked fine on macOS.

Anyway, I will submit a patch to ensure that files opened through the appendFile function are closed correctly.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org