To use arbitrary client classes in the HdfsCLI, you must first make them discoverable by specifying their location in the [global] section of the HdfsCLI configuration file.
You can use two options to tell the CLI where to load clients from:
autoload.modules: A comma-separated list of Python modules (must be on Python's path).autoload.paths: A comma-separated list of paths to Python files.
Example: making hdfs.ext.kerberos.KerberosClient available:
[global]
autoload.modules = hdfs.ext.kerberos
Example: loading a custom client from a specific file path and defining an alias:
[global]
autoload.paths = /etc/hdfscli.py
[prod.alias]
client = SecureClient
url = https://host:port
cert = /etc/server.crt, /etc/key
Note: Options passed to clients from the CLI (via hdfs.client.Client.from_options) are always passed as strings. You may need to implement parsing logic in your custom client's __init__ method.
[global]
autoload.modules = hdfs.ext.kerberos