GitHub user Denovo1998 added a comment to the discussion: Replacing Apache JClouds with Apache OpenDAL in the tiered-storage module
@Xuanwo @tisonkun **When you have free time, could you help take a look if my summary is correct? I'm looking forward to some guidance.** --- ### Goal Similar to jclouds, validate the data object's format version during each range read (refill buffer), preferably by "simultaneously obtaining metadata in the same GET(range) to complete validation" without adding extra remote calls. ### Current Status 1: read/range read does not return metadata The OpenDAL core's RpRead response currently only contains size/range without Metadata (core/core/src/raw/rps.rs:100), so range read only gets the data stream/bytes and cannot, like jclouds' getBlob(range), "get payload + metadata/userMetadata in a single GET". ### Current Status 2: Java binding's Metadata does not expose user metadata The Rust core's Metadata supports user_metadata() (core/core/src/types/metadata.rs:420), but Java org.apache.opendal.Metadata has no userMetadata field (bindings/java/src/main/java/org/apache/opendal/Metadata.java:29), and JNI make_metadata also does not map (bindings/java/src/lib.rs:143). Result: Even if an extra stat() (HEAD) is performed before each refill, the Java side cannot obtain user metadata for version validation. ### Current Status 3: Java ReadOptions are too limited, lacking conditional read/version binding capabilities Rust ReadOptions have version/if_match/... (core/core/src/types/options.rs:60), but Java ReadOptions only have offset/length (bindings/java/src/main/java/org/apache/opendal/ReadOptions.java:25). This makes the alternative solution of "first stat once to get etag/version, then use If-Match/version to bind to the same object version in subsequent range reads" incomplete. ### Conclusion With v0.55.0 + current Java binding, it is not possible to achieve jclouds' "validate (single request) conveniently during each range GET(refill)"; reverting to stat + read dual calls also fails to validate due to Java's inability to obtain user metadata. GitHub link: https://github.com/apache/pulsar/discussions/25093#discussioncomment-15385889 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
