Skip to content

Commit 8c5e99e

Browse files
authored
Fix doc test (#13)
1 parent 48ac28e commit 8c5e99e

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

src/lib.rs

+3-12
Original file line numberDiff line numberDiff line change
@@ -62,23 +62,14 @@ impl HdfsObjectStore {
6262

6363
/// Creates a new HdfsObjectStore using the specified URL
6464
///
65-
/// Connect to a single NameNode
65+
/// Connect to a NameNode
6666
/// ```rust
6767
/// # use hdfs_native_object_store::HdfsObjectStore;
6868
/// # fn main() -> object_store::Result<()> {
6969
/// let store = HdfsObjectStore::with_url("hdfs://127.0.0.1:9000")?;
7070
/// # Ok(())
7171
/// # }
7272
/// ```
73-
///
74-
/// Connect to a NameService
75-
/// ```rust
76-
/// # use hdfs_native_object_store::HdfsObjectStore;
77-
/// # fn main() -> object_store::Result<()> {
78-
/// let store = HdfsObjectStore::with_url("hdfs://ns")?;
79-
/// # Ok(())
80-
/// # }
81-
/// ```
8273
pub fn with_url(url: &str) -> Result<Self> {
8374
Ok(Self::new(Arc::new(Client::new(url).to_object_store_err()?)))
8475
}
@@ -92,8 +83,8 @@ impl HdfsObjectStore {
9283
/// # fn main() -> object_store::Result<()> {
9384
/// let config = HashMap::from([
9485
/// ("dfs.ha.namenodes.ns".to_string(), "nn1,nn2".to_string()),
95-
/// ("dfs.namenode.rpc-address.nn1".to_string(), "nn1.example.com:9000".to_string()),
96-
/// ("dfs.namenode.rpc-address.nn2".to_string(), "nn2.example.com:9000".to_string()),
86+
/// ("dfs.namenode.rpc-address.ns.nn1".to_string(), "nn1.example.com:9000".to_string()),
87+
/// ("dfs.namenode.rpc-address.ns.nn2".to_string(), "nn2.example.com:9000".to_string()),
9788
/// ]);
9889
/// let store = HdfsObjectStore::with_config("hdfs://ns", config)?;
9990
/// # Ok(())

0 commit comments

Comments
 (0)