client/dragonfly-client-backend/examples/plugin
Gaius 3959bb9330
feat: rename --log-to-stdout to --console (#1163)
Signed-off-by: Gaius <gaius.qi@gmail.com>
2025-05-27 15:31:14 +08:00
..
src refactor: change comments to rust style (#742) 2024-09-20 20:15:51 +08:00
Cargo.toml chore: exclude hdfs for building 2024-12-04 16:21:04 +08:00
README.md feat: rename --log-to-stdout to --console (#1163) 2025-05-27 15:31:14 +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 --console
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