hdfs_native/
lib.rs

1// #![warn(missing_docs)]
2//! Native HDFS client implementation in Rust
3//!
4//! # Usage
5//!
6//! Create a client to a single NameNode
7//! ```rust
8//! use hdfs_native::ClientBuilder;
9//! let client = ClientBuilder::new().with_url("hdfs://localhost:9000").build().unwrap();
10//! ```
11//!
12//! Create a client for a Name Service
13//! ```rust
14//! use hdfs_native::ClientBuilder;
15//! let client = ClientBuilder::new()
16//!     .with_url("hdfs://ns")
17//!     .with_config(vec![
18//!         ("dfs.ha.namenodes.ns", "nn-1,nn-2"),
19//!         ("dfs.namenode.rpc-address.ns.nn-1", "nn-1:9000"),
20//!         ("dfs.namenode.rpc-address.ns.nn-2", "nn-2:9000"),
21//!     ])
22//!     .build()
23//!     .unwrap();
24//! ```
25pub mod acl;
26pub mod client;
27pub(crate) mod common;
28#[cfg(feature = "benchmark")]
29pub mod ec;
30#[cfg(not(feature = "benchmark"))]
31pub(crate) mod ec;
32pub(crate) mod error;
33pub mod file;
34pub(crate) mod hdfs;
35#[cfg(any(feature = "integration-test", feature = "benchmark"))]
36pub mod minidfs;
37pub(crate) mod proto;
38pub(crate) mod security;
39
40pub use client::WriteOptions;
41pub use client::{Client, ClientBuilder};
42pub use error::HdfsError;
43pub use error::Result;
44
45// Module for testing hooks into non-test code
46#[cfg(feature = "integration-test")]
47pub mod test;