You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "Xuanwo (via GitHub)" <gi...@apache.org> on 2023/03/21 14:57:39 UTC

[GitHub] [incubator-opendal] Xuanwo commented on a diff in pull request #1720: feat(bindings/java): add java binding mvp

Xuanwo commented on code in PR #1720:
URL: https://github.com/apache/incubator-opendal/pull/1720#discussion_r1143515375


##########
bindings/java/src/main/rust/opendal-java/Cargo.toml:
##########
@@ -0,0 +1,14 @@
+[package]
+name = "opendal-java"
+version = "0.1.0"
+edition = "2021"
+
+
+[lib]
+crate-type = ["cdylib"]
+doc = false
+
+
+[dependencies]
+jni = "0.21.1"
+opendal = { version = "0.30.2", path = "../../../../../.." }

Review Comment:
   :cry: :cry: :cry: :cry: :cry: :cry: 



##########
bindings/java/src/test/java/org/apache/opendal/operator/FileSystemOperatorTest.java:
##########
@@ -0,0 +1,24 @@
+package org.apache.opendal.operator;
+
+
+import org.apache.opendal.FileSystemOperator;
+import org.apache.opendal.Operator;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class FileSystemOperatorTest {
+
+    @Test
+    public void testBuilder() {
+
+        Operator op = new FileSystemOperator("/tmp");

Review Comment:
   I expect to see something like `Operator("fs", "/tmp")` instead of different operators for different services.



##########
bindings/java/src/main/java/org/apache/opendal/FileSystemOperator.java:
##########
@@ -0,0 +1,58 @@
+package org.apache.opendal;
+
+import io.questdb.jar.jni.JarJniLoader;
+
+
+public class FileSystemOperator implements Operator {
+

Review Comment:
   I think we should introduce a java code formatter. But this can be done in another PR.



##########
Cargo.toml:
##########
@@ -26,6 +26,7 @@ members = [
   "bindings/nodejs",
   "bindings/object_store",
   "bindings/python",
+  "bindings/java/src/main/rust/opendal-java",

Review Comment:
   Is it possible that we keep the rust project at `bindings/java`?



-- 
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