-
Notifications
You must be signed in to change notification settings - Fork 594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc(java-binding): add docs for running java-binding unit test #10304
Conversation
Codecov Report
@@ Coverage Diff @@
## main #10304 +/- ##
==========================================
- Coverage 70.48% 70.47% -0.01%
==========================================
Files 1260 1260
Lines 215152 215152
==========================================
- Hits 151643 151637 -6
- Misses 63509 63515 +6
Flags with carried forward coverage won't be shown. Click here to find out more. see 7 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM
java/connector-node/run.sh
Outdated
@@ -0,0 +1,7 @@ | |||
RISINGWAVE_ROOT=$(git rev-parse --show-toplevel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have a script to start the connector node service. java/connector-node/assembly/scripts/start-service.sh
java/connector-node/README.md
Outdated
@@ -34,6 +34,7 @@ Sometimes, you need to specify the shared library path. For example, when progra | |||
|
|||
``` | |||
RISINGWAVE_ROOT=$(git rev-parse --show-toplevel) | |||
JAVA_ROOT=$RISINGWAVE_ROOT/java | |||
CONNECTOR_ROOT=$JAVA_ROOT/connector-node | |||
# Build shared library file | |||
cd $RISINGWAVE_ROOT && cargo build -p risingwave_java_binding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the latest main, we don't need to explicit build the rust java_binding. Could you help to update this doc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you mean we do not need cargo build -p risingwave_java_binding
? I thought we need to make sure shared library exist and specify at Djava.library.path
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we don't need it. In #10229, the shared library will be built and added to the jar during maven build, and the shared library can be loaded from the java, so the we don't need to set the java.library.path
now.
Downloading and launching MinIO is a straightforward process. For PostgreSQL, I recommend launching it using Docker. When setting up PostgreSQL, please ensure that the values for `POSTGRES_PASSWORD`, `POSTGRES_DB`, and `POSTGRES_USER` match the corresponding settings in the `integration_tests.py` file. | ||
|
||
```shell | ||
docker run --name my-postgres -e POSTGRES_PASSWORD=connector -e POSTGRES_DB=test -e POSTGRES_USER=test -d -p 5432:5432 postgres |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may include a sample SQL that can create a sink to the pg instance launched from this command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes.
d18e8e5
to
e99fa67
Compare
java/connector-node/README.md
Outdated
|
||
If you encounter an error stating that the program cannot access the library, it may be due to merging new features or outdated documentation. In such cases, you will need to manually build the corresponding Java shared library file. | ||
|
||
After building the shared library file, move it into the `java/connector-node/assembly/target directory`, make sure to specify the shared library path using the `-Djava.library.path=java/connector-node/assembly/target` flag. This tells Java where to find the required shared library files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These paragraph is unnecessary. Anyone successfully build the maven project should be able to run. We don't need explicitly building the shared library any more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.