BTW this jira should be in hadoop common, not hdfs.
See attached patch which provides an implementation of the mount table called ViewFs. See the JavaDoc for ViewFs.
ViewFs extends AbstractFileSystem which implements the mount table in memory in the client side. It reads the
mountable from the config. This allows the mount table to be passed to jobs easily.
I still need to implement ViewFileSystem which extends FileSystem - this will allow one to have mount tables with the old file system.
The mount table is implemented as in-memory inode tree (see InodeTreeImpl<T> where T is AbstractFileSystem or FileSystem
- ie both can shared the core impl). The ViewFs javadoc gives some config examples.
As part of this I have implemented Chrooted file system - see ChRootedFs; it is used to represent the target of a mount link.
1) Why didn't you use symbolic links?
1a) We (Yahoo) need an impl for FileSystem that we plan to use for release 20.x FileSystem does not have sym links.
1b) Symlinks would require all resolutions to go through a central HDFS making it a central point of failure even when the target
file systems are up.