arhxam opened a new pull request, #8662: URL: https://github.com/apache/hadoop/pull/8662
### Description of PR Fixes [HADOOP-17214](https://issues.apache.org/jira/browse/HADOOP-17214). `FileSystem.get(URI, Configuration)` currently supports disabling the filesystem instance cache only one scheme at a time through `fs.SCHEME.impl.disable.cache`. Deployments that use many schemes must enumerate every implementation and can miss dynamically introduced schemes. This patch adds the global `fs.impl.disable.cache` configuration, defaulting to `false`. When enabled, `FileSystem.get` creates a fresh instance for every scheme. Existing per-scheme switches remain supported and either the global or scheme-specific value can disable caching. The setting is exposed in `CommonConfigurationKeysPublic` and documented in `core-default.xml`. ### How was this patch tested? On macOS with OpenJDK 17.0.20 and Maven Wrapper 3.9.15: ```text ./mvnw -pl hadoop-common-project/hadoop-common -am -DskipShade \ -Dtest=TestFileSystemCaching \ -Dsurefire.failIfNoSpecifiedTests=false test Tests run: 18, Failures: 0, Errors: 0, Skipped: 0 BUILD SUCCESS ``` The new regression test requests the same URI twice with the global switch enabled and verifies distinct instances are returned. Before the implementation change it fails because the same cached instance is returned. The existing tests also verify that caching remains enabled by default and that scheme-specific disabling still works. ### For code changes: - [x] Does the title of this PR start with the corresponding JIRA issue id? - [ ] Object storage: N/A - [ ] If adding new dependencies: no new dependencies - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, `NOTICE-binary` files? N/A ### AI Tooling Contains content generated by Codex. - [x] The PR includes the phrase "Contains content generated by Codex" - [x] My use of AI contributions follows the ASF legal policy https://www.apache.org/legal/generative-tooling.html -- 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]
