cubefs/java
Shuoran Liu 6c4bb8f874 feature: add method related to dir and rename
Signed-off-by: Shuoran Liu <shuoranliu@gmail.com>
2021-01-28 14:37:33 +08:00
..
src/main/java/io/chubao/fs feature: add method related to dir and rename 2021-01-28 14:37:33 +08:00
.gitignore add libsdk compilation to project Makefile 2021-01-28 14:37:33 +08:00
pom.xml feature: introduce java sdk 2021-01-28 14:37:33 +08:00
README.md feature: introduce java sdk 2021-01-28 14:37:33 +08:00

Usage

Build shared library

cd libsdk
sh build.sh
sudo cp libcfs.so /usr/lib/libcfs.so

Build jar with dependencies

cd java
mvn clean package

Deploy single-node cluster using docker

cd docker
./run_docker.sh -r

Run the java test program

java -cp target/libchubaofs-1.0-SNAPSHOT-jar-with-dependencies.jar io.chubao.fs.TestCfsClient ls <dirpath>
java -cp target/libchubaofs-1.0-SNAPSHOT-jar-with-dependencies.jar io.chubao.fs.TestCfsClient read <filepath>
java -cp target/libchubaofs-1.0-SNAPSHOT-jar-with-dependencies.jar io.chubao.fs.TestCfsClient write <filepath>