ricky2129 opened a new pull request, #12369: URL: https://github.com/apache/seatunnel/pull/12369
### Purpose of this pull request `HadoopFileSystemProxy#close()` closes the underlying `FileSystem` but leaves the field set. `getFileSystem()` only re-initializes when the field is `null`, so any use of the proxy after `close()` hands back a closed `FileSystem` and fails with `IOException: Filesystem closed` rather than reconnecting. It also makes a second `close()` call operate on an already-closed instance. ### Changes Clear the `fileSystem` field after closing it, so a later `getFileSystem()` re-initializes. The assignment is in a `finally` block so it happens even if `close()` throws. ### Does this PR introduce _user-facing_ change? No. ### How was this patch tested? New `testCloseClearsFileSystemSoProxyCanBeReused` in `HadoopFileSystemProxyTest` asserts that `getFileSystem()` returns a different instance after `close()`. Fails before the change, passes after. -- 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]
