Files opened by ParquetFileWriter’s appendFile method should to be closed correctly
- Lingua principale
- Java
- Stelle
- 3.1k
- Fork
- 1.6k
- Merge medio
- 3g 12h
- PR unite (30g)
- 33
Descrizione
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.
**Reporter**: [Deng An](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=packyan)
#### PRs and other links:
- [GitHub Pull Request #1351](https://github.com/apache/parquet-java/pull/1351)
- [GitHub Pull Request #1351](https://github.com/apache/parquet-mr/pull/1351)
**Note**: *This issue was originally created as [PARQUET-2477](https://issues.apache.org/jira/browse/PARQUET-2477). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia con ParquetFileWriter.appendFile e il suo metodo end, come indicato nell’issue. Riproduci il merge su Windows e verifica che i file Parquet più piccoli possano essere eliminati o rinominati dopo il completamento; la pull request collegata indica che il lavoro è già in corso.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- backend
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 25/100