Class ViewDistributedFileSystem

java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.fs.FileSystem
org.apache.hadoop.hdfs.DistributedFileSystem
org.apache.hadoop.hdfs.ViewDistributedFileSystem
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.conf.Configurable, org.apache.hadoop.crypto.key.KeyProviderTokenIssuer, org.apache.hadoop.fs.BatchListingOperations, org.apache.hadoop.fs.BulkDeleteSource, org.apache.hadoop.fs.LeaseRecoverable, org.apache.hadoop.fs.PathCapabilities, org.apache.hadoop.fs.SafeMode, org.apache.hadoop.fs.WithErasureCoding, org.apache.hadoop.security.token.DelegationTokenIssuer

@Private @Unstable public class ViewDistributedFileSystem extends DistributedFileSystem
The ViewDistributedFileSystem is an extended class to DistributedFileSystem with additional mounting functionality. The goal is to have better API compatibility for HDFS users when using mounting filesystem(ViewFileSystemOverloadScheme). The ViewFileSystemOverloadSchemeViewFileSystemOverloadScheme is a new filesystem with inherited mounting functionality from ViewFileSystem. For the user who is using ViewFileSystemOverloadScheme by setting fs.hdfs.impl=org.apache.hadoop.fs.viewfs.ViewFileSystemOverloadScheme, now they can set fs.hdfs.impl=org.apache.hadoop.hdfs.ViewDistributedFileSystem. So, that the hdfs users will get closely compatible API with mount functionality. For the rest of all other schemes can continue to use ViewFileSystemOverloadScheme class directly for mount functionality. Please note that ViewFileSystemOverloadScheme provides only ViewFileSystemViewFileSystem APIs. If user configured this class but no mount point configured? Then it will simply work as existing DistributedFileSystem class. If user configured both fs.hdfs.impl to this class and mount configurations, then users will be able to make calls the APIs available in this class, they are nothing but DFS APIs, but they will be delegated to viewfs functionality. Please note, APIs without any path in arguments( ex: isInSafeMode), will be delegated to default filesystem only, that is the configured fallback link. If you want to make these API calls on specific child filesystem, you may want to initialize them separately and call. In ViewDistributedFileSystem, we strongly recommend to configure linkFallBack when you add mount links and it's recommended to point be to your base cluster, usually your current fs.defaultFS if that's pointing to hdfs.