GitHub user linghengqian added a comment to the discussion: In java binding, how to know what `Construct operator` requires?
> For example, https://docs.rs/opendal/latest/opendal/services/struct.S3.html > will tell you the options that can be used for constructing an S3 operator. - I quickly compared the differences between https://docs.rs/opendal/latest/opendal/services/struct.Fs.html and https://opendal.apache.org/docs/quickstart#java-binding . So Rust's functional programming code, ```rust let mut builder = Fs::default() .root("/tmp"); ``` - Corresponding to, ```java final Map<String, String> conf = new HashMap<>(); conf.put("root", "/tmp"); final Operator op = Operator.of("fs", conf); ``` - Similarly, https://docs.rs/opendal/latest/opendal/services/struct.S3.html#basic-setup , ```rust let mut builder = S3::default() .root("/path/to/dir") .bucket("test") .region("us-east-1") .endpoint("https://s3.amazonaws.com") .access_key_id("access_key_id") .secret_access_key("secret_access_key"); ``` - Can it correspond to? ```java final Map<String, String> conf = new HashMap<>(); conf.put("root", "/path/to/dir"); conf.put("bucket", "test"); conf.put("region", "us-east-1"); conf.put("endpoint", "https://s3.amazonaws.com"); conf.put("access_key_id", "access_key_id"); conf.put("secret_access_key", "secret_access_key"); final Operator op = Operator.of("s3", conf); ``` - If this is a reasonable way to convert code across languages, it might be better to give some examples at https://opendal.apache.org/docs/binding-java . - I must admit that I am actually a S3 novice, and Amazon China restricts individual developer account registration. GitHub link: https://github.com/apache/opendal/discussions/5402#discussioncomment-11487180 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
