client/dragonfly-client-backend/examples/plugin
Gaius e2209a8e61
refactor: change comments to rust style (#742)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2024-09-20 20:15:51 +08:00
..
src refactor: change comments to rust style (#742) 2024-09-20 20:15:51 +08:00
Cargo.toml chore: set publish false in examples Cargo.yaml 2024-04-18 20:29:17 +08:00
README.md feat: add HDFS plugin examples for backend (#402) 2024-04-18 14:41:11 +08:00

README.md

Example of Backend Plugin

An example of HDFS plugin for the Dragonfly client backend.

Build Plugin

Build the plugin and move it to the plugin directory. If use plugin in MacOS, you should replace libhdfs.so with libhdfs.dylib.

cargo build --all && mv target/debug/libhdfs.so {plugin_dir}/backend/libhdfs.so

Run Client with Plugin

$ cargo run --bin dfdaemon -- --config {config_dir}/config.yaml -l info --verbose
INFO  load [http]  builtin backend
INFO  load [https] builtin backend
INFO  load [hdfs]  plugin backend

Download Task with Plugin

cargo run --bin dfget hdfs://example.com/file -O file