Files opened by ParquetFileWriter’s appendFile method should to be closed correctly
- Langage dominant
- Java
- Étoiles
- 3.1k
- Forks
- 1.6k
- Merge moyen
- 3 j 12 h
- PR mergées (30 j)
- 33
Description
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.*
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez par ParquetFileWriter.appendFile et sa méthode end, comme indiqué dans l’issue. Reproduisez le merge sous Windows et vérifiez que les fichiers Parquet plus petits peuvent être supprimés ou renommés après son achèvement ; la pull request liée indique que le travail est déjà en cours.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java
- Domaine
- backend
- Type d'issue
- Bug
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 25/100