webhdfs/
lib.rs

1//! Hadoop WebHDFS API for Rust
2//! 
3//! Quick start: 
4//! 
5//! ```no_run
6//! use webhdfs::*;
7//! use webhdfs::sync_client::ReadHdfsFile;
8//! use std::io::Read;
9//! 
10//! let cx = SyncHdfsClientBuilder::new("http://namenode:50070".parse().unwrap())
11//!     .user_name("johnd".to_owned())
12//!     .build().unwrap();
13//! 
14//! let mut file = ReadHdfsFile::open(cx, "/user/johnd/in.txt".to_owned()).unwrap();
15//! let mut buf = [0u8; 100];
16//! let _ = file.read(&mut buf).unwrap();
17//! 
18//! ```
19
20#[macro_use] 
21mod error;
22mod https;
23mod rest_client;
24mod natmap;
25mod uri_tools;
26mod op;
27pub mod config;
28pub mod datatypes;
29pub mod async_client;
30pub mod sync_client;
31
32pub use natmap::NatMap;
33pub use error::{Error, Result};
34pub use datatypes::*;
35pub use op::*;
36pub use async_client::{HdfsClient, HdfsClientBuilder};
37pub use sync_client::{SyncHdfsClient, SyncHdfsClientBuilder};
38pub use http::Uri;