zhangshenghang commented on PR #10331:
URL: https://github.com/apache/seatunnel/pull/10331#issuecomment-3754790715

   <!-- code-pr-reviewer -->
   Thanks!
   
   This PR has a few **blocking** issues that should be addressed:
   
   **1. Resource leak risk in `HdfsFileCheckStrategy`**  
   
`org/apache/seatunnel/connectors/seatunnel/hive/source/config/HiveSourceConfig.java:348`
  
   The `FileSystem fs = path.getFileSystem(conf);` is opened in a loop but 
never closed. This may leak file system resources. Consider using 
`try-with-resources` or explicitly closing `fs` in a `finally` block.
   
   **2. Potential NPE in `HdfsFileCheckStrategy`**  
   
`org/apache/seatunnel/connectors/seatunnel/hive/source/config/HiveSourceConfig.java:349`
  
   `listStatus` can return `null` when the directory is deleted between 
existence check and listing. The code assumes non-null result and calls 
`result.length` without null-check, which may cause `NullPointerException`. Add 
a null check before accessing `result`.
   
   **3. Test flakiness due to external dependencies**  
   `org/apache/seatunnel/e2e/connector/hive/HiveIT.java:742-756`  
   `testHiveEmptyParquetFileToHive` writes directly into `/tmp` without cleanup 
and depends on shared container directories. Concurrent runs may interfere and 
cause flaky results. Use `@TempDir` (JUnit 5) or create temp directories with 
proper cleanup.


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

Reply via email to