ViewFs (Apache Hadoop Main 3.5.0 API)
Description: declaration: package: org.apache.hadoop.fs.viewfs, class: ViewFs

Package org.apache.hadoop.fs.viewfs

# Class ViewFs

java.lang.Object
org.apache.hadoop.fs.AbstractFileSystem
org.apache.hadoop.fs.viewfs.ViewFs

All Implemented Interfaces:
  `org.apache.hadoop.fs.PathCapabilities`

@Public @Evolving public class ViewFs extends AbstractFileSystem
ViewFs (extends the AbstractFileSystem interface) implements a client-side mount table. The viewFs file system is implemented completely in memory on the client side. The client-side mount table allows a client to provide a customized view of a file system namespace that is composed from one or more individual file systems (a localFs or Hdfs, S3fs, etc). For example one could have a mount table that provides links such as

- /user -> hdfs://nnContainingUserDir/user
- /project/foo -> hdfs://nnProject1/projects/foo
- /project/bar -> hdfs://nnProject2/projects/bar
- /tmp -> hdfs://nnTmp/privateTmpForUserXXX

ViewFs is specified with the following URI: viewfs:///

To use viewfs one would typically set the default file system in the config (i.e. fs.defaultFS < = viewfs:///) along with the mount table config variables as described below.

** Config variables to specify the mount table entries **

The file system is initialized from the standard Hadoop config through config variables. See `FsConstants` for URI and Scheme constants; See `Constants` for config var constants; see `ConfigUtil` for convenient lib.

All the mount table config entries for view fs are prefixed by fs.viewfs.mounttable. For example the above example can be specified with the following config variables:

- fs.viewfs.mounttable.default.link./user= hdfs://nnContainingUserDir/user
- fs.viewfs.mounttable.default.link./project/foo= hdfs://nnProject1/projects/foo
- fs.viewfs.mounttable.default.link./project/bar= hdfs://nnProject2/projects/bar
- fs.viewfs.mounttable.default.link./tmp= hdfs://nnTmp/privateTmpForUserXXX

The default mount table (when no authority is specified) is from config variables prefixed by fs.viewFs.mounttable.default The authority component of a URI can be used to specify a different mount table. For example,

- viewfs://sanjayMountable/

is initialized from fs.viewFs.mounttable.sanjayMountable.* config variables.

**** Merge Mounts **** (NOTE: merge mounts are not implemented yet.)

One can also use "MergeMounts" to merge several directories (this is sometimes called union-mounts or junction-mounts in the literature. For example of the home directories are stored on say two file systems (because they do not fit on one) then one could specify a mount entry such as following merges two dirs:

- /user -> hdfs://nnUser1/user,hdfs://nnUser2/user

Such a mergeLink can be specified with the following config var where "," is used as the separator for each of links to be merged:

- fs.viewfs.mounttable.default.linkMerge./user= hdfs://nnUser1/user,hdfs://nnUser1/user

A special case of the merge mount is where mount table's root is merged with the root (slash) of another file system:

- fs.viewfs.mounttable.default.linkMergeSlash=hdfs://nn99/

In this cases the root of the mount table is merged with the root of hdfs://nn99/

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `org.apache.hadoop.fs.viewfs.ViewFs.MountPoint`

- ## Field Summary

  ### Fields inherited from class org.apache.hadoop.fs.AbstractFileSystem

  `statistics`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ViewFs(Configuration conf)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `access(Path path, FsAction mode)`
  The specification of this method matches that of `FileContext.access(Path, FsAction)` except that an UnresolvedLinkException may be thrown if a symlink is encountered in the path.
  `FSDataOutputStream`
  `createInternal(Path f, EnumSet<CreateFlag> flag, FsPermission absolutePermission, int bufferSize, short replication, long blockSize, Progressable progress, org.apache.hadoop.fs.Options.ChecksumOpt checksumOpt, boolean createParent)`
  The specification of this method matches that of `AbstractFileSystem.create(Path, EnumSet, Options.CreateOpts...)` except that the opts have been declared explicitly.
  `Path`
  `createSnapshot(Path path, String snapshotName)`
  The specification of this method matches that of `FileContext.createSnapshot(Path, String)`.
  `void`
  `createSymlink(Path target, Path link, boolean createParent)`
  The specification of this method matches that of `FileContext.createSymlink(Path, Path, boolean)`;
  `boolean`
  `delete(Path f, boolean recursive)`
  The specification of this method matches that of `FileContext.delete(Path, boolean)` except that Path f must be for this file system.
  `void`
  `deleteSnapshot(Path path, String snapshotName)`
  The specification of this method matches that of `FileContext.deleteSnapshot(Path, String)`.
  `AclStatus`
  `getAclStatus(Path path)`
  Gets the ACLs of files and directories.
  `List<Token<?>>`
  `getDelegationTokens(String renewer)`
  Get one or more delegation tokens associated with the filesystem.
  `BlockLocation[]`
  `getFileBlockLocations(Path f, long start, long len)`
  The specification of this method matches that of `FileContext.getFileBlockLocations(Path, long, long)` except that Path f must be for this file system.
  `FileChecksum`
  `getFileChecksum(Path f)`
  The specification of this method matches that of `FileContext.getFileChecksum(Path)` except that Path f must be for this file system.
  `FileStatus`
  `getFileLinkStatus(Path f)`
  The specification of this method matches that of `FileContext.getFileLinkStatus(Path)` except that an UnresolvedLinkException may be thrown if a symlink is encountered in the path leading up to the final path component.
  `FileStatus`
  `getFileStatus(Path f)`
  The specification of this method matches that of `FileContext.getFileStatus(Path)` except that an UnresolvedLinkException may be thrown if a symlink is encountered in the path.
  `FsStatus`
  `getFsStatus()`
  The specification of this method matches that of `FileContext.getFsStatus(Path)`.
  `Path`
  `getHomeDirectory()`
  Return the current user's home directory in this file system.
  `Path`
  `getLinkTarget(Path f)`
  Partially resolves the path.
  `org.apache.hadoop.fs.viewfs.ViewFs.MountPoint[]`
  `getMountPoints()`
  `FsServerDefaults`
  `getServerDefaults()`
  Deprecated.
  `FsServerDefaults`
  `getServerDefaults(Path f)`
  Return a set of server default configuration values based on path.
  `BlockStoragePolicySpi`
  `getStoragePolicy(Path src)`
  Retrieve the storage policy for a given file or directory.
  `int`
  `getUriDefaultPort()`
  The default port of this file system.
  `byte[]`
  `getXAttr(Path path, String name)`
  Get an xattr for a file or directory.
  `Map<String,byte[]>`
  `getXAttrs(Path path)`
  Get all of the xattrs for a file or directory.
  `Map<String,byte[]>`
  `getXAttrs(Path path, List<String> names)`
  Get all of the xattrs for a file or directory.
  `boolean`
  `isValidName(String src)`
  Returns true if the specified string is considered valid in the path part of a URI by this file system.
  `org.apache.hadoop.fs.RemoteIterator<LocatedFileStatus>`
  `listLocatedStatus(Path f)`
  The specification of this method matches that of `FileContext.listLocatedStatus(Path)` except that Path f must be for this file system.
  `FileStatus[]`
  `listStatus(Path f)`
  The specification of this method matches that of `FileContext.Util.listStatus(Path)` except that Path f must be for this file system.
  `org.apache.hadoop.fs.RemoteIterator<FileStatus>`
  `listStatusIterator(Path f)`
  The specification of this method matches that of `FileContext.listStatus(Path)` except that Path f must be for this file system.
  `List<String>`
  `listXAttrs(Path path)`
  Get all of the xattr names for a file or directory.
  `void`
  `mkdir(Path dir, FsPermission permission, boolean createParent)`
  The specification of this method matches that of `FileContext.mkdir(Path, FsPermission, boolean)` except that the Path f must be fully qualified and the permission is absolute (i.e.
  `void`
  `modifyAclEntries(Path path, List<AclEntry> aclSpec)`
  Modifies ACL entries of files and directories.
  `FSDataInputStream`
  `open(Path f, int bufferSize)`
  The specification of this method matches that of `FileContext.open(Path, int)` except that Path f must be for this file system.
  `void`
  `removeAcl(Path path)`
  Removes all but the base ACL entries of files and directories.
  `void`
  `removeAclEntries(Path path, List<AclEntry> aclSpec)`
  Removes ACL entries from files and directories.
  `void`
  `removeDefaultAcl(Path path)`
  Removes all default ACL entries from files and directories.
  `void`
  `removeXAttr(Path path, String name)`
  Remove an xattr of a file or directory.
  `void`
  `renameInternal(Path src, Path dst)`
  The specification of this method matches that of `FileContext.rename(Path, Path, Options.Rename...)` except that Path f must be for this file system and NO OVERWRITE is performed.
  `void`
  `renameInternal(Path src, Path dst, boolean overwrite)`
  The specification of this method matches that of `FileContext.rename(Path, Path, Options.Rename...)` except that Path f must be for this file system.
  `void`
  `renameSnapshot(Path path, String snapshotOldName, String snapshotNewName)`
  The specification of this method matches that of `FileContext.renameSnapshot(Path, String, String)`.
  `Path`
  `resolvePath(Path f)`
  Return the fully-qualified path of path f resolving the path through any internal symlinks or mount point
  `void`
  `satisfyStoragePolicy(Path path)`
  Set the source path to satisfy storage policy.
  `void`
  `setAcl(Path path, List<AclEntry> aclSpec)`
  Fully replaces ACL of files and directories, discarding all existing entries.
  `void`
  `setOwner(Path f, String username, String groupname)`
  The specification of this method matches that of `FileContext.setOwner(Path, String, String)` except that Path f must be for this file system.
  `void`
  `setPermission(Path f, FsPermission permission)`
  The specification of this method matches that of `FileContext.setPermission(Path, FsPermission)` except that Path f must be for this file system.
  `boolean`
  `setReplication(Path f, short replication)`
  The specification of this method matches that of `FileContext.setReplication(Path, short)` except that Path f must be for this file system.
  `void`
  `setStoragePolicy(Path path, String policyName)`
  Set the storage policy for a given file or directory.
  `void`
  `setTimes(Path f, long mtime, long atime)`
  The specification of this method matches that of `FileContext.setTimes(Path, long, long)` except that Path f must be for this file system.
  `void`
  `setVerifyChecksum(boolean verifyChecksum)`
  The specification of this method matches that of `FileContext.setVerifyChecksum(boolean, Path)` except that Path f must be for this file system.
  `void`
  `setXAttr(Path path, String name, byte[] value, EnumSet<XAttrSetFlag> flag)`
  Set an xattr of a file or directory.
  `boolean`
  `supportsSymlinks()`
  Returns true if the file system supports symlinks, false otherwise.
  `boolean`
  `truncate(Path f, long newLength)`
  The specification of this method matches that of `FileContext.truncate(Path, long)` except that Path f must be for this file system.
  `void`
  `unsetStoragePolicy(Path src)`
  Unset the storage policy set for a given file or directory.

  ### Methods inherited from class org.apache.hadoop.fs.AbstractFileSystem

  `checkPath, checkScheme, clearStatistics, create, createFileSystem, createMultipartUploader, equals, get, getAllStatistics, getAllStoragePolicies, getCanonicalServiceName, getEnclosingRoot, getFsStatus, getInitialWorkingDirectory, getStatistics, getStatistics, getUri, getUriPath, hashCode, hasPathCapability, listCorruptFileBlocks, makeQualified, methodNotSupported, msync, open, openFileWithOptions, printStatistics, rename, setXAttr`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ViewFs

    public ViewFs(Configuration conf) throws IOException, URISyntaxException
    Throws:
      `IOException`
      `URISyntaxException`

- ## Method Details

  - ### getServerDefaults

    @Deprecated public FsServerDefaults getServerDefaults() throws IOException
    Deprecated.
    Description copied from class: `AbstractFileSystem`
    Return a set of server default configuration values.
    Specified by:
      `getServerDefaults` in class `AbstractFileSystem`
    Returns:
      server default configuration values
    Throws:
      `IOException` - an I/O error occurred

  - ### getServerDefaults

    public FsServerDefaults getServerDefaults(Path f) throws IOException
    Description copied from class: `AbstractFileSystem`
    Return a set of server default configuration values based on path.
    Overrides:
      `getServerDefaults` in class `AbstractFileSystem`
    Parameters:
      `f` - path to fetch server defaults
    Returns:
      server default configuration values for path
    Throws:
      `IOException` - an I/O error occurred

  - ### getUriDefaultPort

    public int getUriDefaultPort()
    Description copied from class: `AbstractFileSystem`
    The default port of this file system.
    Specified by:
      `getUriDefaultPort` in class `AbstractFileSystem`
    Returns:
      default port of this file system's Uri scheme A uri with a port of -1 => default port;

  - ### getHomeDirectory

    public Path getHomeDirectory()
    Description copied from class: `AbstractFileSystem`
    Return the current user's home directory in this file system. The default implementation returns "/user/$USER/".
    Overrides:
      `getHomeDirectory` in class `AbstractFileSystem`
    Returns:
      current user's home directory.

  - ### resolvePath

    public Path resolvePath(Path f) throws FileNotFoundException, AccessControlException, org.apache.hadoop.fs.UnresolvedLinkException, IOException
    Description copied from class: `AbstractFileSystem`
    Return the fully-qualified path of path f resolving the path through any internal symlinks or mount point
    Overrides:
      `resolvePath` in class `AbstractFileSystem`
    Parameters:
      `f` - path to be resolved
    Returns:
      fully qualified path
    Throws:
      `FileNotFoundException` - when file not find throw.
      `AccessControlException` - when accees control error throw.
      `org.apache.hadoop.fs.UnresolvedLinkException` - if symbolic link on path cannot be resolved internally
      `IOException` - raised on errors performing I/O.

  - ### createInternal

    public FSDataOutputStream createInternal(Path f, EnumSet<CreateFlag> flag, FsPermission absolutePermission, int bufferSize, short replication, long blockSize, Progressable progress, org.apache.hadoop.fs.Options.ChecksumOpt checksumOpt, boolean createParent) throws AccessControlException, FileAlreadyExistsException, FileNotFoundException, ParentNotDirectoryException, UnsupportedFileSystemException, org.apache.hadoop.fs.UnresolvedLinkException, IOException
    Description copied from class: `AbstractFileSystem`
    The specification of this method matches that of `AbstractFileSystem.create(Path, EnumSet, Options.CreateOpts...)` except that the opts have been declared explicitly.
    Specified by:
      `createInternal` in class `AbstractFileSystem`
    Parameters:
      `f` - the path.
      `flag` - create flag.
      `absolutePermission` - absolute permission.
      `bufferSize` - buffer size.
      `replication` - replications.
      `blockSize` - block size.
      `progress` - progress.
      `checksumOpt` - check sum opt.
      `createParent` - create parent.
    Returns:
      output stream.
    Throws:
      `AccessControlException` - access control exception.
      `FileAlreadyExistsException` - file already exists exception.
      `FileNotFoundException` - file not found exception.
      `ParentNotDirectoryException` - parent not directory exception.
      `UnsupportedFileSystemException` - unsupported filesystem exception.
      `org.apache.hadoop.fs.UnresolvedLinkException` - unresolved link exception.
      `IOException` - raised on errors performing I/O.

  - ### delete

    public boolean delete(Path f, boolean recursive) throws AccessControlException, FileNotFoundException, org.apache.hadoop.fs.UnresolvedLinkException, IOException
    Description copied from class: `AbstractFileSystem`
    The specification of this method matches that of `FileContext.delete(Path, boolean)` except that Path f must be for this file system.
    Specified by:
      `delete` in class `AbstractFileSystem`
    Parameters:
      `f` - the path.
      `recursive` - recursive flag.
    Returns:
      if successfully deleted success true, not false.
    Throws:
      `AccessControlException` - access control exception.
      `FileNotFoundException` - file not found exception.
      `org.apache.hadoop.fs.UnresolvedLinkException` - unresolved link exception.
      `IOException` - raised on errors performing I/O.

  - ### getFileBlockLocations

    public BlockLocation[] getFileBlockLocations(Path f, long start, long len) throws AccessControlException, FileNotFoundException, org.apache.hadoop.fs.UnresolvedLinkException, IOException
    Description copied from class: `AbstractFileSystem`
    The specification of this method matches that of `FileContext.getFileBlockLocations(Path, long, long)` except that Path f must be for this file system.
    Specified by:
      `getFileBlockLocations` in class `AbstractFileSystem`
    Parameters:
      `f` - the path.
      `start` - start.
      `len` - length.
    Returns:
      BlockLocation Array.
    Throws:
      `AccessControlException` - access control exception.
      `FileNotFoundException` - file not found exception.
      `org.apache.hadoop.fs.UnresolvedLinkException` - unresolved link exception.
      `IOException` - raised on errors performing I/O.

  - ### getFileChecksum

    public FileChecksum getFileChecksum(Path f) throws AccessControlException, FileNotFoundException, org.apache.hadoop.fs.UnresolvedLinkException, IOException
    Description copied from class: `AbstractFileSystem`
    The specification of this method matches that of `FileContext.getFileChecksum(Path)` except that Path f must be for this file system.
    Specified by:
      `getFileChecksum` in class `AbstractFileSystem`
    Parameters:
      `f` - the path.
    Returns:
      File Check sum.
    Throws:
      `AccessControlException` - access control exception.
      `FileNotFoundException` - file not found exception.
      `org.apache.hadoop.fs.UnresolvedLinkException` - unresolved link exception.
      `IOException` - raised on errors performing I/O.

  - ### getFileStatus

    public FileStatus getFileStatus(Path f) throws AccessControlException, FileNotFoundException, org.apache.hadoop.fs.UnresolvedLinkException, IOException
    The specification of this method matches that of `FileContext.getFileStatus(Path)` except that an UnresolvedLinkException may be thrown if a symlink is encountered in the path. If the given path is a symlink(mount link), the path will be resolved to a target path and it will get the resolved path's FileStatus object. It will not be represented as a symlink and isDirectory API returns true if the resolved path is a directory, false otherwise.
    Specified by:
      `getFileStatus` in class `AbstractFileSystem`
    Parameters:
      `f` - the path.
    Returns:
      File Status
    Throws:
      `AccessControlException` - access control exception.
      `FileNotFoundException` - file not found exception.
      `org.apache.hadoop.fs.UnresolvedLinkException` - unresolved link exception.
      `IOException` - raised on errors performing I/O.

  - ### access

    public void access(Path path, FsAction mode) throws AccessControlException, FileNotFoundException, org.apache.hadoop.fs.UnresolvedLinkException, IOException
    Description copied from class: `AbstractFileSystem`
    The specification of this method matches that of `FileContext.access(Path, FsAction)` except that an UnresolvedLinkException may be thrown if a symlink is encountered in the path.
    Parameters:
      `path` - the path.
      `mode` - fsaction mode.
    Throws:
      `AccessControlException` - access control exception.
      `FileNotFoundException` - file not found exception.
      `org.apache.hadoop.fs.UnresolvedLinkException` - unresolved link exception.
      `IOException` - raised on errors performing I/O.

  - ### getFileLinkStatus

    public FileStatus getFileLinkStatus(Path f) throws AccessControlException, FileNotFoundException, UnsupportedFileSystemException, IOException
    Description copied from class: `AbstractFileSystem`
    The specification of this method matches that of `FileContext.getFileLinkStatus(Path)` except that an UnresolvedLinkException may be thrown if a symlink is encountered in the path leading up to the final path component. If the file system does not support symlinks then the behavior is equivalent to `AbstractFileSystem.getFileStatus(Path)`.
    Overrides:
      `getFileLinkStatus` in class `AbstractFileSystem`
    Parameters:
      `f` - the path.
    Returns:
      file status.
    Throws:
      `AccessControlException` - access control exception.
      `FileNotFoundException` - file not found exception.
      `UnsupportedFileSystemException` - UnSupported File System Exception.
      `IOException` - raised on errors performing I/O.

  - ### getFsStatus

    public FsStatus getFsStatus() throws AccessControlException, FileNotFoundException, IOException
    Description copied from class: `AbstractFileSystem`
    The specification of this method matches that of `FileContext.getFsStatus(Path)`.
    Specified by:
      `getFsStatus` in class `AbstractFileSystem`
    Returns:
      Fs Status.
    Throws:
      `AccessControlException` - access control exception.
      `FileNotFoundException` - file not found exception.
      `IOException` - raised on errors performing I/O.

  - ### listStatusIterator

    public org.apache.hadoop.fs.RemoteIterator<FileStatus> listStatusIterator(Path f) throws AccessControlException, FileNotFoundException, org.apache.hadoop.fs.UnresolvedLinkException, IOException
    Description copied from class: `AbstractFileSystem`
    The specification of this method matches that of `FileContext.listStatus(Path)` except that Path f must be for this file system.
    Overrides:
      `listStatusIterator` in class `AbstractFileSystem`
    Parameters:
      `f` - path.
    Returns:
      FileStatus Iterator.
    Throws:
      `AccessControlException` - access control exception.
      `FileNotFoundException` - file not found exception.
      `org.apache.hadoop.fs.UnresolvedLinkException` - unresolved link exception.
      `IOException` - raised on errors performing I/O.

  - ### listLocatedStatus

    public org.apache.hadoop.fs.RemoteIterator<LocatedFileStatus> listLocatedStatus(Path f) throws AccessControlException, FileNotFoundException, org.apache.hadoop.fs.UnresolvedLinkException, IOException
    Description copied from class: `AbstractFileSystem`
    The specification of this method matches that of `FileContext.listLocatedStatus(Path)` except that Path f must be for this file system. In HDFS implementation, the BlockLocation of returned LocatedFileStatus will have different formats for replicated and erasure coded file. Please refer to `FileSystem.getFileBlockLocations(FileStatus, long, long)` for more details.
    Overrides:
      `listLocatedStatus` in class `AbstractFileSystem`
    Parameters:
      `f` - the path.
    Returns:
      FileStatus Iterator.
    Throws:
      `AccessControlException` - access control exception.
      `FileNotFoundException` - file not found exception.
      `org.apache.hadoop.fs.UnresolvedLinkException` - unresolved link exception.
      `IOException` - raised on errors performing I/O.

  - ### listStatus

    public FileStatus[] listStatus(Path f) throws AccessControlException, FileNotFoundException, org.apache.hadoop.fs.UnresolvedLinkException, IOException
    The specification of this method matches that of `FileContext.Util.listStatus(Path)` except that Path f must be for this file system. Note: listStatus considers listing from fallbackLink if available. If the same directory path is present in configured mount path as well as in fallback fs, then only the fallback path will be listed in the returned result except for link. If any of the the immediate children of the given path f is a symlink(mount link), the returned FileStatus object of that children would be represented as a symlink. It will not be resolved to the target path and will not get the target path FileStatus object. The target path will be available via getSymlink on that children's FileStatus object. Since it represents as symlink, isDirectory on that children's FileStatus will return false. This behavior can be changed by setting an advanced configuration fs.viewfs.mount.links.as.symlinks to false. In this case, mount points will be represented as non-symlinks and all the file/directory attributes like permissions, isDirectory etc will be assigned from it's resolved target directory/file. If you want to get the FileStatus of target path for that children, you may want to use GetFileStatus API with that children's symlink path. Please see `getFileStatus(Path f)` Note: In ViewFs, by default the mount links are represented as symlinks.
    Specified by:
      `listStatus` in class `AbstractFileSystem`
    Parameters:
      `f` - the path.
    Returns:
      FileStatus Iterator.
    Throws:
      `AccessControlException` - access control exception.
      `FileNotFoundException` - file not found exception.
      `org.apache.hadoop.fs.UnresolvedLinkException` - unresolved link exception.
      `IOException` - raised on errors performing I/O.

  - ### mkdir

    public void mkdir(Path dir, FsPermission permission, boolean createParent) throws AccessControlException, FileAlreadyExistsException, FileNotFoundException, org.apache.hadoop.fs.UnresolvedLinkException, IOException
    Description copied from class: `AbstractFileSystem`
    The specification of this method matches that of `FileContext.mkdir(Path, FsPermission, boolean)` except that the Path f must be fully qualified and the permission is absolute (i.e. umask has been applied).
    Specified by:
      `mkdir` in class `AbstractFileSystem`
    Parameters:
      `dir` - directory.
      `permission` - permission.
      `createParent` - create parent flag.
    Throws:
      `AccessControlException` - access control exception.
      `FileAlreadyExistsException` - file already exists exception.
      `FileNotFoundException` - file not found exception.
      `org.apache.hadoop.fs.UnresolvedLinkException` - unresolved link exception.
      `IOException` - raised on errors performing I/O.

  - ### open

    public FSDataInputStream open(Path f, int bufferSize) throws AccessControlException, FileNotFoundException, org.apache.hadoop.fs.UnresolvedLinkException, IOException
    Description copied from class: `AbstractFileSystem`
    The specification of this method matches that of `FileContext.open(Path, int)` except that Path f must be for this file system.
    Specified by:
      `open` in class `AbstractFileSystem`
    Parameters:
      `f` - the path.
      `bufferSize` - buffer size.
    Returns:
      if successfully open success true, not false.
    Throws:
      `AccessControlException` - access control exception.
      `FileNotFoundException` - file not found exception.
      `org.apache.hadoop.fs.UnresolvedLinkException` - unresolved link exception.
      `IOException` - raised on errors performing I/O.

  - ### truncate

    public boolean truncate(Path f, long newLength) throws AccessControlException, FileNotFoundException, org.apache.hadoop.fs.UnresolvedLinkException, IOException
    Description copied from class: `AbstractFileSystem`
    The specification of this method matches that of `FileContext.truncate(Path, long)` except that Path f must be for this file system.
    Overrides:
      `truncate` in class `AbstractFileSystem`
    Parameters:
      `f` - the path.
      `newLength` - new length.
    Returns:
      if successfully truncate success true, not false.
    Throws:
      `AccessControlException` - access control exception.
      `FileNotFoundException` - file not found exception.
      `org.apache.hadoop.fs.UnresolvedLinkException` - unresolved link exception.
      `IOException` - raised on errors performing I/O.

  - ### renameInternal

    public void renameInternal(Path src, Path dst, boolean overwrite) throws IOException, org.apache.hadoop.fs.UnresolvedLinkException
    Description copied from class: `AbstractFileSystem`
    The specification of this method matches that of `FileContext.rename(Path, Path, Options.Rename...)` except that Path f must be for this file system.
    Overrides:
      `renameInternal` in class `AbstractFileSystem`
    Parameters:
      `src` - src.
      `dst` - dst.
      `overwrite` - overwrite flag.
    Throws:
      `AccessControlException` - access control exception.
      `FileAlreadyExistsException` - file already exists exception.
      `FileNotFoundException` - file not found exception.
      `ParentNotDirectoryException` - parent not directory exception.
      `org.apache.hadoop.fs.UnresolvedLinkException` - unresolved link exception.
      `IOException` - raised on errors performing I/O.

  - ### renameInternal

    public void renameInternal(Path src, Path dst) throws AccessControlException, FileAlreadyExistsException, FileNotFoundException, ParentNotDirectoryException, org.apache.hadoop.fs.UnresolvedLinkException, IOException
    Description copied from class: `AbstractFileSystem`
    The specification of this method matches that of `FileContext.rename(Path, Path, Options.Rename...)` except that Path f must be for this file system and NO OVERWRITE is performed. File systems that do not have a built in overwrite need implement only this method and can take advantage of the default impl of the other `AbstractFileSystem.renameInternal(Path, Path, boolean)`
    Specified by:
      `renameInternal` in class `AbstractFileSystem`
    Parameters:
      `src` - src.
      `dst` - dst.
    Throws:
      `AccessControlException` - access control exception.
      `FileAlreadyExistsException` - file already exists exception.
      `FileNotFoundException` - file not found exception.
      `ParentNotDirectoryException` - parent not directory exception.
      `org.apache.hadoop.fs.UnresolvedLinkException` - unresolved link exception.
      `IOException` - raised on errors performing I/O.

  - ### supportsSymlinks

    public boolean supportsSymlinks()
    Description copied from class: `AbstractFileSystem`
    Returns true if the file system supports symlinks, false otherwise.
    Overrides:
      `supportsSymlinks` in class `AbstractFileSystem`
    Returns:
      true if filesystem supports symlinks

  - ### createSymlink

    public void createSymlink(Path target, Path link, boolean createParent) throws IOException, org.apache.hadoop.fs.UnresolvedLinkException
    Description copied from class: `AbstractFileSystem`
    The specification of this method matches that of `FileContext.createSymlink(Path, Path, boolean)`;
    Overrides:
      `createSymlink` in class `AbstractFileSystem`
    Parameters:
      `target` - target.
      `link` - link.
      `createParent` - create parent.
    Throws:
      `IOException` - raised on errors performing I/O.
      `org.apache.hadoop.fs.UnresolvedLinkException` - unresolved link exception.

  - ### getLinkTarget

    public Path getLinkTarget(Path f) throws IOException
    Description copied from class: `AbstractFileSystem`
    Partially resolves the path. This is used during symlink resolution in `FSLinkResolver`, and differs from the similarly named method `FileContext.getLinkTarget(Path)`.
    Overrides:
      `getLinkTarget` in class `AbstractFileSystem`
    Parameters:
      `f` - the path.
    Returns:
      target path.
    Throws:
      `IOException` - subclass implementations may throw IOException

  - ### setOwner

    public void setOwner(Path f, String username, String groupname) throws AccessControlException, FileNotFoundException, org.apache.hadoop.fs.UnresolvedLinkException, IOException
    Description copied from class: `AbstractFileSystem`
    The specification of this method matches that of `FileContext.setOwner(Path, String, String)` except that Path f must be for this file system.
    Specified by:
      `setOwner` in class `AbstractFileSystem`
    Parameters:
      `f` - the path.
      `username` - username.
      `groupname` - groupname.
    Throws:
      `AccessControlException` - access control exception.
      `FileNotFoundException` - file not found exception.
      `org.apache.hadoop.fs.UnresolvedLinkException` - unresolved link exception.
      `IOException` - raised on errors performing I/O.

  - ### setPermission

    public void setPermission(Path f, FsPermission permission) throws AccessControlException, FileNotFoundException, org.apache.hadoop.fs.UnresolvedLinkException, IOException
    Description copied from class: `AbstractFileSystem`
    The specification of this method matches that of `FileContext.setPermission(Path, FsPermission)` except that Path f must be for this file system.
    Specified by:
      `setPermission` in class `AbstractFileSystem`
    Parameters:
      `f` - the path.
      `permission` - permission.
    Throws:
      `AccessControlException` - access control exception.
      `FileNotFoundException` - file not found exception.
      `org.apache.hadoop.fs.UnresolvedLinkException` - unresolved link exception.
      `IOException` - raised on errors performing I/O.

  - ### setReplication

    public boolean setReplication(Path f, short replication) throws AccessControlException, FileNotFoundException, org.apache.hadoop.fs.UnresolvedLinkException, IOException
    Description copied from class: `AbstractFileSystem`
    The specification of this method matches that of `FileContext.setReplication(Path, short)` except that Path f must be for this file system.
    Specified by:
      `setReplication` in class `AbstractFileSystem`
    Parameters:
      `f` - the path.
      `replication` - replication.
    Returns:
      if successfully set replication success true, not false.
    Throws:
      `AccessControlException` - access control exception.
      `FileNotFoundException` - file not found exception.
      `org.apache.hadoop.fs.UnresolvedLinkException` - unresolved link exception.
      `IOException` - raised on errors performing I/O.

  - ### setTimes

    public void setTimes(Path f, long mtime, long atime) throws AccessControlException, FileNotFoundException, org.apache.hadoop.fs.UnresolvedLinkException, IOException
    Description copied from class: `AbstractFileSystem`
    The specification of this method matches that of `FileContext.setTimes(Path, long, long)` except that Path f must be for this file system.
    Specified by:
      `setTimes` in class `AbstractFileSystem`
    Parameters:
      `f` - the path.
      `mtime` - modify time.
      `atime` - access time.
    Throws:
      `AccessControlException` - access control exception.
      `FileNotFoundException` - file not found exception.
      `org.apache.hadoop.fs.UnresolvedLinkException` - unresolved link exception.
      `IOException` - raised on errors performing I/O.

  - ### setVerifyChecksum

    public void setVerifyChecksum(boolean verifyChecksum) throws AccessControlException, IOException
    Description copied from class: `AbstractFileSystem`
    The specification of this method matches that of `FileContext.setVerifyChecksum(boolean, Path)` except that Path f must be for this file system.
    Specified by:
      `setVerifyChecksum` in class `AbstractFileSystem`
    Parameters:
      `verifyChecksum` - verify check sum flag.
    Throws:
      `AccessControlException` - access control exception.
      `IOException` - raised on errors performing I/O.

  - ### getMountPoints

    public org.apache.hadoop.fs.viewfs.ViewFs.MountPoint[] getMountPoints()

  - ### getDelegationTokens

    public List<Token<?>> getDelegationTokens(String renewer) throws IOException
    Description copied from class: `AbstractFileSystem`
    Get one or more delegation tokens associated with the filesystem. Normally a file system returns a single delegation token. A file system that manages multiple file systems underneath, could return set of delegation tokens for all the file systems it manages
    Parameters:
      `renewer` - the account name that is allowed to renew the token.
    Returns:
      List of delegation tokens. If delegation tokens not supported then return a list of size zero.
    Throws:
      `IOException` - raised on errors performing I/O.

  - ### isValidName

    public boolean isValidName(String src)
    Description copied from class: `AbstractFileSystem`
    Returns true if the specified string is considered valid in the path part of a URI by this file system. The default implementation enforces the rules of HDFS, but subclasses may override this method to implement specific validation rules for specific file systems.
    Overrides:
      `isValidName` in class `AbstractFileSystem`
    Parameters:
      `src` - String source filename to check, path part of the URI
    Returns:
      boolean true if the specified string is considered valid

  - ### modifyAclEntries

    public void modifyAclEntries(Path path, List<AclEntry> aclSpec) throws IOException
    Description copied from class: `AbstractFileSystem`
    Modifies ACL entries of files and directories. This method can add new ACL entries or modify the permissions on existing ACL entries. All existing ACL entries that are not specified in this call are retained without changes. (Modifications are merged into the current ACL.)
    Overrides:
      `modifyAclEntries` in class `AbstractFileSystem`
    Parameters:
      `path` - Path to modify
      `aclSpec` - List<AclEntry> describing modifications
    Throws:
      `IOException` - if an ACL could not be modified

  - ### removeAclEntries

    public void removeAclEntries(Path path, List<AclEntry> aclSpec) throws IOException
    Description copied from class: `AbstractFileSystem`
    Removes ACL entries from files and directories. Other ACL entries are retained.
    Overrides:
      `removeAclEntries` in class `AbstractFileSystem`
    Parameters:
      `path` - Path to modify
      `aclSpec` - List<AclEntry> describing entries to remove
    Throws:
      `IOException` - if an ACL could not be modified

  - ### removeDefaultAcl

    public void removeDefaultAcl(Path path) throws IOException
    Description copied from class: `AbstractFileSystem`
    Removes all default ACL entries from files and directories.
    Overrides:
      `removeDefaultAcl` in class `AbstractFileSystem`
    Parameters:
      `path` - Path to modify
    Throws:
      `IOException` - if an ACL could not be modified

  - ### removeAcl

    public void removeAcl(Path path) throws IOException
    Description copied from class: `AbstractFileSystem`
    Removes all but the base ACL entries of files and directories. The entries for user, group, and others are retained for compatibility with permission bits.
    Overrides:
      `removeAcl` in class `AbstractFileSystem`
    Parameters:
      `path` - Path to modify
    Throws:
      `IOException` - if an ACL could not be removed

  - ### setAcl

    public void setAcl(Path path, List<AclEntry> aclSpec) throws IOException
    Description copied from class: `AbstractFileSystem`
    Fully replaces ACL of files and directories, discarding all existing entries.
    Overrides:
      `setAcl` in class `AbstractFileSystem`
    Parameters:
      `path` - Path to modify
      `aclSpec` - List<AclEntry> describing modifications, must include entries for user, group, and others for compatibility with permission bits.
    Throws:
      `IOException` - if an ACL could not be modified

  - ### getAclStatus

    public AclStatus getAclStatus(Path path) throws IOException
    Description copied from class: `AbstractFileSystem`
    Gets the ACLs of files and directories.
    Overrides:
      `getAclStatus` in class `AbstractFileSystem`
    Parameters:
      `path` - Path to get
    Returns:
      RemoteIterator<AclStatus> which returns each AclStatus
    Throws:
      `IOException` - if an ACL could not be read

  - ### setXAttr

    public void setXAttr(Path path, String name, byte[] value, EnumSet<XAttrSetFlag> flag) throws IOException
    Description copied from class: `AbstractFileSystem`
    Set an xattr of a file or directory. The name must be prefixed with the namespace followed by ".". For example, "user.attr".

    Refer to the HDFS extended attributes user documentation for details.

    Overrides:
      `setXAttr` in class `AbstractFileSystem`
    Parameters:
      `path` - Path to modify
      `name` - xattr name.
      `value` - xattr value.
      `flag` - xattr set flag
    Throws:
      `IOException` - raised on errors performing I/O.

  - ### getXAttr

    public byte[] getXAttr(Path path, String name) throws IOException
    Description copied from class: `AbstractFileSystem`
    Get an xattr for a file or directory. The name must be prefixed with the namespace followed by ".". For example, "user.attr".

    Refer to the HDFS extended attributes user documentation for details.

    Overrides:
      `getXAttr` in class `AbstractFileSystem`
    Parameters:
      `path` - Path to get extended attribute
      `name` - xattr name.
    Returns:
      byte[] xattr value.
    Throws:
      `IOException` - raised on errors performing I/O.

  - ### getXAttrs

    public Map<String,byte[]> getXAttrs(Path path) throws IOException
    Description copied from class: `AbstractFileSystem`
    Get all of the xattrs for a file or directory. Only those xattrs for which the logged-in user has permissions to view are returned.

    Refer to the HDFS extended attributes user documentation for details.

    Overrides:
      `getXAttrs` in class `AbstractFileSystem`
    Parameters:
      `path` - Path to get extended attributes
    Returns:
      Map<String, byte[]> describing the XAttrs of the file or directory
    Throws:
      `IOException` - raised on errors performing I/O.

  - ### getXAttrs

    public Map<String,byte[]> getXAttrs(Path path, List<String> names) throws IOException
    Description copied from class: `AbstractFileSystem`
    Get all of the xattrs for a file or directory. Only those xattrs for which the logged-in user has permissions to view are returned.

    Refer to the HDFS extended attributes user documentation for details.

    Overrides:
      `getXAttrs` in class `AbstractFileSystem`
    Parameters:
      `path` - Path to get extended attributes
      `names` - XAttr names.
    Returns:
      Map<String, byte[]> describing the XAttrs of the file or directory
    Throws:
      `IOException` - raised on errors performing I/O.

  - ### listXAttrs

    public List<String> listXAttrs(Path path) throws IOException
    Description copied from class: `AbstractFileSystem`
    Get all of the xattr names for a file or directory. Only the xattr names for which the logged-in user has permissions to view are returned.

    Refer to the HDFS extended attributes user documentation for details.

    Overrides:
      `listXAttrs` in class `AbstractFileSystem`
    Parameters:
      `path` - Path to get extended attributes
    Returns:
      Map<String, byte[]> describing the XAttrs of the file or directory
    Throws:
      `IOException` - raised on errors performing I/O.

  - ### removeXAttr

    public void removeXAttr(Path path, String name) throws IOException
    Description copied from class: `AbstractFileSystem`
    Remove an xattr of a file or directory. The name must be prefixed with the namespace followed by ".". For example, "user.attr".

    Refer to the HDFS extended attributes user documentation for details.

    Overrides:
      `removeXAttr` in class `AbstractFileSystem`
    Parameters:
      `path` - Path to remove extended attribute
      `name` - xattr name
    Throws:
      `IOException` - raised on errors performing I/O.

  - ### createSnapshot

    public Path createSnapshot(Path path, String snapshotName) throws IOException
    Description copied from class: `AbstractFileSystem`
    The specification of this method matches that of `FileContext.createSnapshot(Path, String)`.
    Overrides:
      `createSnapshot` in class `AbstractFileSystem`
    Parameters:
      `path` - the path.
      `snapshotName` - snapshot name.
    Returns:
      path.
    Throws:
      `IOException` - raised on errors performing I/O.

  - ### renameSnapshot

    public void renameSnapshot(Path path, String snapshotOldName, String snapshotNewName) throws IOException
    Description copied from class: `AbstractFileSystem`
    The specification of this method matches that of `FileContext.renameSnapshot(Path, String, String)`.
    Overrides:
      `renameSnapshot` in class `AbstractFileSystem`
    Parameters:
      `path` - the path.
      `snapshotOldName` - snapshot old name.
      `snapshotNewName` - snapshot new name.
    Throws:
      `IOException` - raised on errors performing I/O.

  - ### deleteSnapshot

    public void deleteSnapshot(Path path, String snapshotName) throws IOException
    Description copied from class: `AbstractFileSystem`
    The specification of this method matches that of `FileContext.deleteSnapshot(Path, String)`.
    Overrides:
      `deleteSnapshot` in class `AbstractFileSystem`
    Parameters:
      `path` - snapshot dir.
      `snapshotName` - snapshot name.
    Throws:
      `IOException` - raised on errors performing I/O.

  - ### satisfyStoragePolicy

    public void satisfyStoragePolicy(Path path) throws IOException
    Description copied from class: `AbstractFileSystem`
    Set the source path to satisfy storage policy.
    Overrides:
      `satisfyStoragePolicy` in class `AbstractFileSystem`
    Parameters:
      `path` - The source path referring to either a directory or a file.
    Throws:
      `IOException` - raised on errors performing I/O.

  - ### setStoragePolicy

    public void setStoragePolicy(Path path, String policyName) throws IOException
    Description copied from class: `AbstractFileSystem`
    Set the storage policy for a given file or directory.
    Overrides:
      `setStoragePolicy` in class `AbstractFileSystem`
    Parameters:
      `path` - file or directory path.
      `policyName` - the name of the target storage policy. The list of supported Storage policies can be retrieved via `AbstractFileSystem.getAllStoragePolicies()`.
    Throws:
      `IOException` - raised on errors performing I/O.

  - ### unsetStoragePolicy

    public void unsetStoragePolicy(Path src) throws IOException
    Description copied from class: `AbstractFileSystem`
    Unset the storage policy set for a given file or directory.
    Overrides:
      `unsetStoragePolicy` in class `AbstractFileSystem`
    Parameters:
      `src` - file or directory path.
    Throws:
      `IOException` - raised on errors performing I/O.

  - ### getStoragePolicy

    public BlockStoragePolicySpi getStoragePolicy(Path src) throws IOException
    Retrieve the storage policy for a given file or directory.
    Overrides:
      `getStoragePolicy` in class `AbstractFileSystem`
    Parameters:
      `src` - file or directory path.
    Returns:
      storage policy for give file.
    Throws:
      `IOException` - raised on errors performing I/O.