pub struct HdfsClient { /* private fields */ }
Expand description
Asynchronous WebHDFS client
Implementations§
Source§impl HdfsClient
impl HdfsClient
Sourcepub async fn dir(
&self,
fostate: FOState,
path: &str,
) -> FOResult<ListStatusResponse>
pub async fn dir( &self, fostate: FOState, path: &str, ) -> FOResult<ListStatusResponse>
Get directory listing
Sourcepub async fn stat(
&self,
fostate: FOState,
path: &str,
) -> FOResult<FileStatusResponse>
pub async fn stat( &self, fostate: FOState, path: &str, ) -> FOResult<FileStatusResponse>
Get status
Sourcepub async fn open(
&self,
fostate: FOState,
path: &str,
opts: OpenOptions,
) -> FOResult<Box<dyn Stream<Item = Result<Bytes>> + Unpin>>
pub async fn open( &self, fostate: FOState, path: &str, opts: OpenOptions, ) -> FOResult<Box<dyn Stream<Item = Result<Bytes>> + Unpin>>
Read file data
Sourcepub async fn create<'t>(
&'t self,
fostate: FOState,
path: &'t str,
data: Data,
opts: CreateOptions,
) -> FODResult<()>
pub async fn create<'t>( &'t self, fostate: FOState, path: &'t str, data: Data, opts: CreateOptions, ) -> FODResult<()>
Create a HDFS file and write some data
Sourcepub async fn append<'t>(
&'t self,
fostate: FOState,
path: &'t str,
data: Data,
opts: AppendOptions,
) -> FODResult<()>
pub async fn append<'t>( &'t self, fostate: FOState, path: &'t str, data: Data, opts: AppendOptions, ) -> FODResult<()>
Append to a HDFS file
Sourcepub async fn concat(
&self,
fostate: FOState,
path: &str,
paths: Vec<String>,
) -> FOResult<()>
pub async fn concat( &self, fostate: FOState, path: &str, paths: Vec<String>, ) -> FOResult<()>
Concatenate files
Sourcepub async fn mkdirs(
&self,
fostate: FOState,
path: &str,
opts: MkdirsOptions,
) -> FOResult<bool>
pub async fn mkdirs( &self, fostate: FOState, path: &str, opts: MkdirsOptions, ) -> FOResult<bool>
Make a directory
Sourcepub async fn rename(
&self,
fostate: FOState,
path: &str,
destination: String,
) -> FOResult<bool>
pub async fn rename( &self, fostate: FOState, path: &str, destination: String, ) -> FOResult<bool>
Rename a file/directory
Sourcepub async fn create_symlink(
&self,
fostate: FOState,
path: &str,
destination: String,
opts: CreateSymlinkOptions,
) -> FOResult<()>
pub async fn create_symlink( &self, fostate: FOState, path: &str, destination: String, opts: CreateSymlinkOptions, ) -> FOResult<()>
Create a Symbolic Link
Auto Trait Implementations§
impl !Freeze for HdfsClient
impl RefUnwindSafe for HdfsClient
impl !Send for HdfsClient
impl !Sync for HdfsClient
impl Unpin for HdfsClient
impl UnwindSafe for HdfsClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more