Introduce Hns and Flat strategy and integrate with GcsFileSystem - #311
Introduce Hns and Flat strategy and integrate with GcsFileSystem#311suni72 wants to merge 23 commits into
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Code Review
This pull request introduces a bucket capabilities caching layer and namespace strategy resolution to support Hierarchical Namespace (HNS) routing and optimization. Key changes include adding BucketCapabilities, defining NamespaceStrategy with flat and hierarchical implementations, and integrating a Caffeine-backed cache with TTL in AnalyticsCacheManager. Feedback focuses on improving encapsulation and API design, specifically by removing testing-only methods from the public GcsFileSystem interface, making internal methods package-private, converting BucketCapabilities to an @AutoValue class, and simplifying a lambda expression to a method reference.
c507032 to
c58a027
Compare
70c1223 to
98f664d
Compare
…spaceStrategy interface
…ent.isHnsBucket method
…ectory and listing operations
- rename HNS configuration key to hierarchical.namespace.enable - Update test names for clarity - Reverted unrelated changes in FakeGcsFileSystemImpl Updated tests to use constants instead of hardcoded strings
dheerajsngh
left a comment
There was a problem hiding this comment.
Added some comments. PTAL
Other things look good.
…follow AAA structure
…resolution in GcsFileSystemImpl
Type of Change
feat: A new featurefix: A bug fixdocs: Documentation only changesstyle: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)refactor: A code change that neither fixes a bug nor adds a featureperf: A code change that improves performancetest: Adding missing tests or correcting existing testschore: Changes to the build process or auxiliary tools and libraries such as documentation generationDescription
What?
NamespaceStrategyinterface alongsideFlatNamespaceStrategyImplandHierarchicalNamespaceStrategyImplimplementations.GcsFileSystemImplto integrate NamespaceStrategy based on bucket HNS configuration and HNS API enable flag in core.GcsFileSystemOptionsto configure HNS API usage.Why?
Dynamically routes folder commands based on the bucket's namespace configuration (flat vs. hierarchical).
Checklist
feat(core): ...)Generated/Assisted by Agent? [Yes/No]