-
Notifications
You must be signed in to change notification settings - Fork 218
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
Extend FileIOFactory to Improve Customization #724
Extend FileIOFactory to Improve Customization #724
Conversation
057bd17
to
836d3f1
Compare
836d3f1
to
0a10632
Compare
Thanks for your contribution @XJDKC! |
service/common/src/main/java/org/apache/polaris/service/catalog/BasePolarisCatalog.java
Outdated
Show resolved
Hide resolved
88bc1af
to
6ff8f2b
Compare
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.
Thanks for the update @XJDKC ! Overall, the new code looks good to me :) A few minor comments below.
service/common/src/main/java/org/apache/polaris/service/catalog/io/FileIOFactory.java
Outdated
Show resolved
Hide resolved
service/common/src/main/java/org/apache/polaris/service/catalog/io/DefaultFileIOFactory.java
Outdated
Show resolved
Hide resolved
service/common/src/main/java/org/apache/polaris/service/catalog/BasePolarisCatalog.java
Outdated
Show resolved
Hide resolved
service/common/src/main/java/org/apache/polaris/service/catalog/io/FileIOFactory.java
Outdated
Show resolved
Hide resolved
service/common/src/main/java/org/apache/polaris/service/catalog/io/DefaultFileIOFactory.java
Outdated
Show resolved
Hide resolved
service/common/src/main/java/org/apache/polaris/service/catalog/io/DefaultFileIOFactory.java
Outdated
Show resolved
Hide resolved
service/common/src/main/java/org/apache/polaris/service/catalog/io/DefaultFileIOFactory.java
Outdated
Show resolved
Hide resolved
service/common/src/main/java/org/apache/polaris/service/catalog/io/DefaultFileIOFactory.java
Show resolved
Hide resolved
service/common/src/main/java/org/apache/polaris/service/catalog/io/DefaultFileIOFactory.java
Outdated
Show resolved
Hide resolved
service/common/src/main/java/org/apache/polaris/service/catalog/io/DefaultFileIOFactory.java
Outdated
Show resolved
Hide resolved
service/common/src/main/java/org/apache/polaris/service/catalog/io/DefaultFileIOFactory.java
Outdated
Show resolved
Hide resolved
service/common/src/main/java/org/apache/polaris/service/catalog/io/DefaultFileIOFactory.java
Outdated
Show resolved
Hide resolved
...service/src/test/java/org/apache/polaris/service/quarkus/catalog/BasePolarisCatalogTest.java
Outdated
Show resolved
Hide resolved
service/common/src/main/java/org/apache/polaris/service/catalog/io/FileIOFactory.java
Outdated
Show resolved
Hide resolved
00a9ae4
to
decc5b8
Compare
...service/src/test/java/org/apache/polaris/service/quarkus/catalog/BasePolarisCatalogTest.java
Outdated
Show resolved
Hide resolved
service/common/src/main/java/org/apache/polaris/service/catalog/BasePolarisCatalog.java
Outdated
Show resolved
Hide resolved
service/common/src/main/java/org/apache/polaris/service/catalog/io/FileIOFactory.java
Outdated
Show resolved
Hide resolved
service/common/src/main/java/org/apache/polaris/service/task/TaskFileIOSupplier.java
Outdated
Show resolved
Hide resolved
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.
LGTM
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.
Sorry about the delay. The latest changes LGTM with one remaining concern about WasbTranslatingFileIOFactory
(which I'd like to clarity) and a few nit comments (which are optional).
service/common/src/main/java/org/apache/polaris/service/catalog/io/FileIOFactory.java
Show resolved
Hide resolved
service/common/src/main/java/org/apache/polaris/service/catalog/io/FileIOFactory.java
Outdated
Show resolved
Hide resolved
service/common/src/main/java/org/apache/polaris/service/catalog/BasePolarisCatalog.java
Outdated
Show resolved
Hide resolved
...common/src/main/java/org/apache/polaris/service/catalog/io/WasbTranslatingFileIOFactory.java
Show resolved
Hide resolved
service/common/src/main/java/org/apache/polaris/service/catalog/io/DefaultFileIOFactory.java
Outdated
Show resolved
Hide resolved
service/common/src/main/java/org/apache/polaris/service/catalog/io/FileIOUtil.java
Show resolved
Hide resolved
service/common/src/test/java/org/apache/polaris/service/catalog/io/FileIOFactoryTest.java
Outdated
Show resolved
Hide resolved
...s/service/src/test/java/org/apache/polaris/service/quarkus/catalog/io/TestFileIOFactory.java
Outdated
Show resolved
Hide resolved
Recent changes LGTM - deferring to @dimas-b |
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 believe @XJDKC mentioned making a few minor follow-up changes... otherwise LGTM.
9fd3482
to
f3a5ef0
Compare
service/common/src/main/java/org/apache/polaris/service/catalog/BasePolarisCatalog.java
Outdated
Show resolved
Hide resolved
Hi folks, I think this PR is ready to be merged into main branch. Also I have updated the PR desc to clarify the purposes of this PR. |
service/common/src/main/java/org/apache/polaris/service/catalog/io/FileIOUtil.java
Show resolved
Hide resolved
…vel for FileIOUtil
Context
Currently, we have three places where a
FileIO
is constructed:PolarisBaseCatalog::loadFileIO
: Used as the defaultFileIO
across the entire catalog during testing.PolarisBaseCatalog::refreshIOWithCredential
: Refreshes storage credentials and constructs a newFileIO
.TaskFileIOSupplier::apply
: Fetches subscoped credentials and usesFileIOFactory
to create aFileIO
for cleanup tasks.We’ve identified an issue where not all properties required by
FileIO
are generated by theFileIOFactory
. For instance, subscoped credentials are retrieved outside theFileIOFactory
and then passed to it. Additionally, the currentFileIOFactory
interface has limited access to contextual information.To enhance the ability to customize
FileIOFactory
, we plan to extend it by passing additional information. This improvement will enable developers to implement custom logic such as auditing, proxy, and more.Some code pointers: