HDFS file system.
More...
#include <hdfs_filesys.h>
Inherits dmlc::io::FileSystem.
|
|
virtual | ~HDFSFileSystem () |
| | destructor
|
| |
| virtual FileInfo | GetPathInfo (const URI &path) |
| | get information about a path
|
| |
| virtual void | ListDirectory (const URI &path, std::vector< FileInfo > *out_list) |
| | list files in a directory
|
| |
| virtual SeekStream * | Open (const URI &path, const char *const flag, bool allow_null) |
| | open a stream, will report error and exit if bad thing happens NOTE: the Stream can continue to work even when filesystem was destructed
|
| |
| virtual SeekStream * | OpenForRead (const URI &path, bool allow_null) |
| | open a seekable stream for read
|
| |
◆ GetInstance()
| static HDFSFileSystem * dmlc::io::HDFSFileSystem::GetInstance |
( |
const std::string & |
namenode = "default" | ) |
|
|
inlinestatic |
get a singleton of HDFSFileSystem when needed
- Returns
- a singleton instance
◆ GetPathInfo()
| FileInfo dmlc::io::HDFSFileSystem::GetPathInfo |
( |
const URI & |
path | ) |
|
|
virtual |
get information about a path
- Parameters
-
- Returns
- the information about the file
◆ ListDirectory()
| void dmlc::io::HDFSFileSystem::ListDirectory |
( |
const URI & |
path, |
|
|
std::vector< FileInfo > * |
out_list |
|
) |
| |
|
virtual |
list files in a directory
- Parameters
-
| path | to the file |
| out_list | the output information about the files |
◆ Open()
| SeekStream * dmlc::io::HDFSFileSystem::Open |
( |
const URI & |
path, |
|
|
const char *const |
flag, |
|
|
bool |
allow_null |
|
) |
| |
|
virtual |
open a stream, will report error and exit if bad thing happens NOTE: the Stream can continue to work even when filesystem was destructed
- Parameters
-
| path | path to file |
| uri | the uri of the input, can contain hdfs prefix |
| flag | can be "w", "r", "a" |
| allow_null | whether NULL can be returned, or directly report error |
- Returns
- the created stream, can be NULL when allow_null == true and file do not exist
◆ OpenForRead()
| SeekStream * dmlc::io::HDFSFileSystem::OpenForRead |
( |
const URI & |
path, |
|
|
bool |
allow_null |
|
) |
| |
|
virtual |
open a seekable stream for read
- Parameters
-
| path | the path to the file |
| allow_null | whether NULL can be returned, or directly report error |
- Returns
- the created stream, can be NULL when allow_null == true and file do not exist
The documentation for this class was generated from the following files:
- External/xgboost/dmlc-core/src/io/hdfs_filesys.h
- External/xgboost/dmlc-core/src/io/hdfs_filesys.cc