-
Notifications
You must be signed in to change notification settings - Fork 702
feat: add additional layers support #7128
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
base: main
Are you sure you want to change the base?
Conversation
This commit adds support for additional layers to the Java bindings: - MimeGuessLayer: automatically set Content-Type based on file extension - TimeoutLayer: add timeout for operations - LoggingLayer: add structured logging for operations - HotpathLayer: add hotpath profiling for operations These layers were already supported in Python and Node.js bindings but were missing in Java, causing API inconsistency across language bindings. Closes apache#6738
This commit fixes Java code formatting issues detected by spotless.
|
for toml format , u can use |
753383a to
05fddba
Compare
| /** | ||
| * This layer adds structured logging for every operation. | ||
| * | ||
| * <p>Note: This layer requires proper logging setup (e.g., log4j2, java.util.logging) to work. |
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.
Hi, please understand your changes first. LoggingLayer integrate rust's log crate and thus requires we to provide a set_logger call. Users can't configure that through log4j2 or java.util.logging.
Maybe we can start a discussion thread on how we do that.
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 for rough pr.
Honestly I'm not that familiar with this binding layer, and just think this can be implemented with ai just because it has other language implementation as reference.
I'll do some research to understand what the binding layer is for and then do discussion about implementation.
Thanks for kindly review.
Summary
This PR adds support for additional layers to the Java bindings to align with Python and Node.js bindings.
Added Layers
Changes
bindings/java/src/main/java/org/apache/opendal/layer/bindings/java/src/layer.rsbindings/java/Cargo.tomlto enable required featuresbindings/java/src/test/java/org/apache/opendal/test/LayerTest.javaTesting
All 7 layer tests pass:
testOperatorWithRetryLayertestOperatorWithConcurrentLimitLayertestOperatorWithMimeGuessLayertestOperatorWithTimeoutLayertestOperatorWithLoggingLayertestOperatorWithThrottleLayertestOperatorWithHotpathLayerIssue
Closes #6738