feat: add additional layers support#7128
Draft
Retrospection wants to merge 6 commits intoapache:mainfrom
Draft
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.
Member
|
for toml format , u can use |
Xuanwo
reviewed
Jan 2, 2026
753383a to
05fddba
Compare
Xuanwo
reviewed
Jan 4, 2026
| /** | ||
| * This layer adds structured logging for every operation. | ||
| * | ||
| * <p>Note: This layer requires proper logging setup (e.g., log4j2, java.util.logging) to work. |
Member
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
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.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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