client/dragonfly-client-backend/examples/plugin
Gaius 6f4fbdd47d
chore: exclude hdfs for building
Signed-off-by: Gaius <gaius.qi@gmail.com>
2024-12-04 16:21:04 +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: 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