Module webhdfs::config [−][src]
File-based configuration.
- Confiuration is read from one of the configuration files when
HdfsClientBuilder::from_config
orHdfsClientBuilder::from_config
is called. The configuration files are never read or used unless explicitly requested. - There are 3 locations where the library looks for the configuration information, in the order as
listed below. The search is stopped on first file found, and this solely file is used. No configuration
merging is currently supported.
- If 'WEBHDFS_CONFIG' environment variable is set, then the location specfied by it is opened (must be a full file path). The library panics if there is no file at that path.
- A file named 'webhdfs.toml' in the CWD.
- A file named '.webhdfs.toml' in the user's home directory.
- If a file is found but is either unreadable or unparseable, then the library panics.
- All the configuration fields are optional, except for the entrypoint.
- Use
write_sample_config
to get config sample
Structs
Config | |
HttpsConfig | |
UriW |
Functions
read_config | |
read_config_opt | |
read_kv_file | |
read_kv_lines | Reads an object consisting of "key=value" pairs |
split_kv | Splits a "key=value" string in two parts |
write_config |