-
Notifications
You must be signed in to change notification settings - Fork 17
Introduce Hns and Flat strategy and integrate with GcsFileSystem #311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
suni72
wants to merge
24
commits into
GoogleCloudPlatform:main
Choose a base branch
from
suni72:dir-metadata-ops-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
32609b8
feat: Strategy Interface Definition and Implementation
suni72 daaeb1a
feat: File System Integration and Routing Mechanics
suni72 e53dea2
refactor: fix import paths and rmeove redundant gcsFilesystemOptions
suni72 1d36799
refactor: remove unused filesystem operations from GcsFileSystem
suni72 1ca0bed
test: add HNS support validation tests
suni72 b4f8daa
refactor: encapsulate namespace strategy accessors
suni72 d7ccf9c
refactor: migrate BucketCapabilities to an AutoValue class
suni72 7890c16
refactor: replace BucketCapabilities with BucketProperties
suni72 58c3cf1
refactor: Move NamespaceStrategy to client package and functionally i…
suni72 c5316b6
doc: add HNS API configuration in doc and annotate resolveStrategy wi…
suni72 8903dd0
refactor: inject GcsClient into namespace strategies and improve code…
suni72 55a147a
feat: optimize namespace strategy resolution and add javadoc for name…
suni72 62864bd
Merge branch 'main' into dir-metadata-ops-2
suni72 6a44024
refactor: remove BucketPropertiesLoader dependency in favor of GcsCli…
suni72 5d37642
refactor: update NamespaceStrategy interface methods for improved dir…
suni72 04c50da
Merge branch 'main' into dir-metadata-ops-2
suni72 bf608db
test: add unit tests for GcsClientImpl.isHnsBucket method
suni72 b2185df
Merge branch 'main' into dir-metadata-ops-2
suni72 102fbfd
address reviewer comments:
suni72 b2a3c6f
test: refactor GcsFileSystemImplTest to improve test readability and …
suni72 21def19
Merge branch 'main' into dir-metadata-ops-2
suni72 5e53b88
fix: wrap IOException in UncheckedIOException during bucket property …
suni72 fa451d6
feat: enable HNS API by default in GcsFileSystemOptions
suni72 6e2ea01
Merge branch 'main' into dir-metadata-ops-2
suni72 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...nt/src/main/java/com/google/cloud/gcs/analyticscore/client/FlatNamespaceStrategyImpl.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| /* | ||
| * Copyright 2026 Google LLC | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| package com.google.cloud.gcs.analyticscore.client; | ||
|
|
||
| final class FlatNamespaceStrategyImpl implements NamespaceStrategy { | ||
| private final GcsClient gcsClient; | ||
|
|
||
| FlatNamespaceStrategyImpl(GcsClient gcsClient) { | ||
| this.gcsClient = gcsClient; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...ain/java/com/google/cloud/gcs/analyticscore/client/HierarchicalNamespaceStrategyImpl.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| /* | ||
| * Copyright 2026 Google LLC | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| package com.google.cloud.gcs.analyticscore.client; | ||
|
|
||
| final class HierarchicalNamespaceStrategyImpl implements NamespaceStrategy { | ||
| private final GcsClient gcsClient; | ||
|
|
||
| HierarchicalNamespaceStrategyImpl(GcsClient gcsClient) { | ||
| this.gcsClient = gcsClient; | ||
| } | ||
| } |
34 changes: 34 additions & 0 deletions
34
client/src/main/java/com/google/cloud/gcs/analyticscore/client/NamespaceStrategy.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| /* | ||
| * Copyright 2026 Google LLC | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| package com.google.cloud.gcs.analyticscore.client; | ||
|
|
||
| /** | ||
| * Strategy interface for handling directory operations across different namespace models (Flat vs. | ||
| * HNS). | ||
| * | ||
| * <p>Methods for directory operations will be added in follow-up PRs. These methods will include: | ||
| * | ||
| * <ul> | ||
| * <li>{@code GcsItemInfo getFileInfo(GcsItemId id, PathType pathType) throws IOException;} | ||
| * <li>{@code void createDirectory(GcsItemId id) throws IOException;} | ||
| * <li>{@code boolean isDirectoryEmpty(GcsItemId id) throws IOException;} | ||
| * <li>{@code void renameDirectory(GcsItemId src, GcsItemId dst) throws IOException;} | ||
| * <li>{@code java.util.List<GcsItemInfo> listObjectInfo(GcsItemId id) throws IOException;} | ||
| * <li>{@code java.util.List<GcsItemInfo> listRecursive(GcsItemId id) throws IOException;} | ||
| * </ul> | ||
| */ | ||
| interface NamespaceStrategy {} | ||
|
dheerajsngh marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.