I'd like to extend the KnoxShell environment to have a Custom Command for interacting with Hadoop FileSystems that support the WebHDFS REST API. We will wrap the use of the KnoxShell HDFS classes for posix like commands in the shell environment.
In order to interact with multiple webhdfs filesystems we introduce the notion of mounting a webhdfs service from a Knox topology URL. For instance, see the following mount command to mount such a service to a mount point:
The above mounts a Hadoop filesystem to a mount point called "retail".
Given this mounted filesystem we are able to interact with it through the mountpoint as the root.
The above will list the contents of my home directory from the mounted filesystem as well as return the listing as a KnoxShellTable that can be sorted, selected, filtered, etc as any other KnoxShellTable.