Expand description
hdrs is a HDFS Native Client in Rust based on hdfs-sys.
Examples
use std::io::{Read, Write};
use hdrs::Client;
let fs = Client::connect("default")?;
let mut f = fs.open_file().write(true).create(true).open("/tmp/hello.txt")?;
let n = f.write("Hello, World!".as_bytes())?;
let mut f = fs.open_file().read(true).open("/tmp/hello.txt")?;
let mut buf = vec![0; 1024];
let n = f.read(&mut buf)?;
let _ = fs.remove_file("/tmp/hello.txt")?;