You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "geruh (via GitHub)" <gi...@apache.org> on 2025/05/26 02:21:19 UTC
[PR] feat(bindings/java): Add WriteOptions support for new options API [opendal]
geruh opened a new pull request, #6219:
URL: https://github.com/apache/opendal/pull/6219
# Which issue does this PR close?
Related to #6214.
# Rationale for this change
This PR implements WriteOptions support in Java bindings as part of the migration to the new options API outlined in RFC-6213 (#6213). This is the first step in migrating Java bindings to use the new options APIs, starting with write operations. Although if you rather have all options migrated in one go we can close.
# What changes are included in this PR?
Added a complete mapping of the`opendal::options::WriteOptions` in the Java options api for all write operations.
# Are there any user-facing changes?
no, but I added the ability to handle chunking, and concurrency options to match opt api.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(bindings/java): Add WriteOptions support for new options API [opendal]
Posted by "geruh (via GitHub)" <gi...@apache.org>.
geruh commented on code in PR #6219:
URL: https://github.com/apache/opendal/pull/6219#discussion_r2106411995
##########
bindings/java/src/lib.rs:
##########
@@ -202,3 +202,44 @@ fn make_entry<'a>(env: &mut JNIEnv<'a>, entry: Entry) -> Result<JObject<'a>> {
&[JValue::Object(&path), JValue::Object(&metadata)],
)?)
}
+
+fn make_write_options<'a>(
+ env: &mut JNIEnv<'a>,
+ options: &JObject,
+) -> Result<opendal::options::WriteOptions> {
+ let concurrent = match convert::read_int_field(env, options, "concurrent")? {
Review Comment:
Added input validation to prevent negative values that would cause capacity overflow when casting to usize. negative i32/i64 values wrap to huge positive usize values
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(bindings/java): Add WriteOptions support for new options API [opendal]
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun merged PR #6219:
URL: https://github.com/apache/opendal/pull/6219
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org