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 glob;
35pub(crate) mod hdfs;
36#[cfg(any(feature = "integration-test", feature = "benchmark"))]
37pub mod minidfs;
38pub(crate) mod proto;
39pub(crate) mod security;
40
41pub use client::WriteOptions;
42pub use client::{Client, ClientBuilder};
43pub use error::HdfsError;
44pub use error::Result;
45
46// Module for testing hooks into non-test code
47#[cfg(feature = "integration-test")]
48pub mod test;