Skip to content

hoslo/alluxio-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

alluxio-rs

Rust Crate for the Alluxio File System API

Usage/Examples

use std::time::Duration;

use alluxio_rs::{client, option};
use tokio::io::BufReader;

#[tokio::main]
async fn main() {
    let path = "/test_path";
    let c = client::Client::new("localhost".to_string(), 39999, Duration::from_secs(10)).unwrap();

    let r = c.exists(path, option::Exists).await.unwrap();
    let s = "123";
    let d = s.as_bytes();
    let buf = BufReader::new(d);
    let id = c
        .create_file(path, option::CreateFile::default())
        .await
        .unwrap();
    c.write(id, BufReader::new(buf)).await.unwrap();
    c.close(id).await.unwrap();
    println!("{} {}", r, id);
}

Acknowledgements

About

rust client for alluxio rest api

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages