-
Notifications
You must be signed in to change notification settings - Fork 409
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
[#5582] improvement(hadoop3-filesystem): Remove configuration fs.gvfs.filesystem.providers
from GVFS client.
#5634
Conversation
...ogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/fs/FileSystemUtils.java
Outdated
Show resolved
Hide resolved
...ogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/fs/FileSystemUtils.java
Outdated
Show resolved
Hide resolved
I think we should not simply delete this configuration, it would be better to 1) make it deprecated; 2) keep the compatible if user set this configuration; 3) warn user that this configuration is deprecated. |
I'm not 100% clear on why we only need to deprecate it. The change in PR is a compatibility modification, and the previous one was not very elegant in design. for the user which uses |
Can you please explain more why it is compatible? |
In 0.7.0, If the user does not specify After this PR is merged, if users:
The only difference is that if users put Please correct me if I'm wrong, thanks. |
I see, thanks for the explanation. |
@@ -41,12 +41,27 @@ public static Map<String, FileSystemProvider> getFileSystemProviders(String file | |||
ServiceLoader<FileSystemProvider> allFileSystemProviders = | |||
ServiceLoader.load(FileSystemProvider.class); | |||
|
|||
if (null == fileSystemProviders) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we already removed this fileSystemProviders
configuration, why do we still need to pass in this argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can simplify this method since we load all the fs providers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method will be also utilized by Gravitino server, in the server side, file system providers are required if we want to access cloud storage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest you to figure out a better way, use null
value to check and differentiate different code path is not a good way.
} | ||
resultMap.put(fileSystemProvider.scheme(), fileSystemProvider); | ||
}); | ||
return resultMap; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we also need to add HDFS and local FS provider here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ServiceLoader<FileSystemProvider> allFileSystemProviders =
ServiceLoader.load(FileSystemProvider.class);
The code above will load HDFS and Local FS automatically.
|
|
Yeah, this looks reasonable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall lgtm.
...ogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/fs/FileSystemUtils.java
Outdated
Show resolved
Hide resolved
implementation(project(":common")) { | ||
exclude(group = "*") | ||
} | ||
|
||
implementation(project(":catalogs:hadoop-common")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this alphabetically ordered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -26,7 +26,8 @@ plugins { | |||
dependencies { | |||
compileOnly(project(":clients:client-java-runtime", configuration = "shadow")) | |||
compileOnly(libs.hadoop3.common) | |||
implementation(project(":catalogs:catalog-hadoop")) { | |||
|
|||
implementation(project(":catalogs:hadoop-common")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
What changes were proposed in this pull request?
Configuration
fs.gvfs.filesystem.providers
is redundant, so we'd better remove this configuation.Why are the changes needed?
This configuration is redundant.
Fix: #5582
Does this PR introduce any user-facing change?
N/A
How was this patch tested?
Existing tests.