cetindogu opened a new issue, #3000:
URL: https://github.com/apache/parquet-java/issues/3000

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   java 21, 
   Apache Parquet Hadoop 1.14.1 
   windows 11
   
   
   after successfully pass the try block, my inputs(.parquet files) are still 
used by another process. so i can't delete the inputs (the parquet files)
   
   java.nio.file.FileSystemException: 
test\sample\dayhour-150-0-6a57c328-8610-46f8-bf7e-311f8605def0.parquet: This 
process cannot access the file because the file is being used by another process
   
           try (ParquetRewriter rewriter = new ParquetRewriter(rewriteOptions)) 
{
               rewriter.processBlocks();
           } catch (IOException e) {
               logger.error("Cannot merge parquet files", e);
               return Optional.empty();
           }
   
           if (config.isDeleteOriginalParquetsAfterMerge()) {
               deleteMergedParquets(inputs);
           }
           
           
        private void deleteMergedParquets(List<String> inputs) {
           for (String input : inputs) {
               try {
                   Files.delete(Paths.get(input));
                   Files.delete(Paths.get(input + 
ParquetMappingsWriter.MAPPINGS_SUFFIX));
                   logger.info("Deleting {} and its mapping file since this 
file is merged with another one", input);
               } catch (IOException e) {
                   logger.error("Cannot remove files for {}", input, e);
               }
           }
       }
   
   ### Component(s)
   
   _No response_


-- 
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]

Reply via email to