PathCapabilitiesChecksumFs@Private @Evolving public abstract class FilterFs extends AbstractFileSystem
FilterFs contains some other file system, which it uses as its
basic file system, possibly transforming the data along the way or providing
additional functionality. The class FilterFs itself simply
overrides all methods of AbstractFileSystem with versions that
pass all requests to the contained file system. Subclasses of
FilterFs may further override some of these methods and may also
provide additional methods and fields.statistics| Modifier | Constructor | Description |
|---|---|---|
protected |
FilterFs(AbstractFileSystem fs) |
| 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. |
void |
checkPath(Path path) |
Check that a Path belongs to this FileSystem.
|
FSDataOutputStream |
createInternal(Path f,
java.util.EnumSet<CreateFlag> flag,
FsPermission absolutePermission,
int bufferSize,
short replication,
long blockSize,
Progressable progress,
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. |
MultipartUploaderBuilder |
createMultipartUploader(Path basePath) |
Create a multipart uploader.
|
Path |
createSnapshot(Path path,
java.lang.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,
java.lang.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.
|
java.util.Collection<? extends BlockStoragePolicySpi> |
getAllStoragePolicies() |
Retrieve all the storage policies supported by this file system.
|
java.lang.String |
getCanonicalServiceName() |
Get a canonical name for this file system.
|
java.util.List<Token<?>> |
getDelegationTokens(java.lang.String renewer) |
Get one or more delegation tokens associated with the filesystem.
|
Path |
getEnclosingRoot(Path path) |
Return path of the enclosing root for a given path
The enclosing root path is a common ancestor that should be used for temp and staging dirs
as well as within encryption zones and other restricted directories.
|
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). |
FsStatus |
getFsStatus(Path f) |
The specification of this method matches that of
FileContext.getFsStatus(Path) except that Path f must be for this
file system. |
Path |
getHomeDirectory() |
Return the current user's home directory in this file system.
|
Path |
getInitialWorkingDirectory() |
Some file systems like LocalFileSystem have an initial workingDir
that is used as the starting workingDir.
|
Path |
getLinkTarget(Path f) |
Partially resolves the path.
|
protected AbstractFileSystem |
getMyFs() |
|
FsServerDefaults |
getServerDefaults() |
Deprecated.
|
FsServerDefaults |
getServerDefaults(Path f) |
Return a set of server default configuration values based on path.
|
FileSystem.Statistics |
getStatistics() |
|
BlockStoragePolicySpi |
getStoragePolicy(Path src) |
Retrieve the storage policy for a given file or directory.
|
java.net.URI |
getUri() |
Returns a URI whose scheme and authority identify this FileSystem.
|
int |
getUriDefaultPort() |
The default port of this file system.
|
java.lang.String |
getUriPath(Path p) |
Get the path-part of a pathname.
|
byte[] |
getXAttr(Path path,
java.lang.String name) |
Get an xattr for a file or directory.
|
java.util.Map<java.lang.String,byte[]> |
getXAttrs(Path path) |
Get all of the xattrs for a file or directory.
|
java.util.Map<java.lang.String,byte[]> |
getXAttrs(Path path,
java.util.List<java.lang.String> names) |
Get all of the xattrs for a file or directory.
|
boolean |
hasPathCapability(Path path,
java.lang.String capability) |
Probe for a specific capability under the given path.
|
boolean |
isValidName(java.lang.String src) |
Returns true if the specified string is considered valid in the path part
of a URI by this file system.
|
RemoteIterator<Path> |
listCorruptFileBlocks(Path path) |
|
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. |
java.util.List<java.lang.String> |
listXAttrs(Path path) |
Get all of the xattr names for a file or directory.
|
Path |
makeQualified(Path path) |
Make the path fully qualified to this file system
|
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,
java.util.List<AclEntry> aclSpec) |
Modifies ACL entries of files and directories.
|
void |
msync() |
Synchronize client metadata state.
|
FSDataInputStream |
open(Path f) |
The specification of this method matches that of
FileContext.open(Path) except that Path f must be for this
file system. |
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. |
java.util.concurrent.CompletableFuture<FSDataInputStream> |
openFileWithOptions(Path path,
OpenFileParameters parameters) |
Open a file with the given set of options.
|
void |
removeAcl(Path path) |
Removes all but the base ACL entries of files and directories.
|
void |
removeAclEntries(Path path,
java.util.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,
java.lang.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,
java.lang.String snapshotOldName,
java.lang.String snapshotNewName) |
The specification of this method matches that of
FileContext.renameSnapshot(Path, String, String). |
Path |
resolvePath(Path p) |
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,
java.util.List<AclEntry> aclSpec) |
Fully replaces ACL of files and directories, discarding all existing
entries.
|
void |
setOwner(Path f,
java.lang.String username,
java.lang.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,
java.lang.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,
java.lang.String name,
byte[] value) |
Set an xattr of a file or directory.
|
void |
setXAttr(Path path,
java.lang.String name,
byte[] value,
java.util.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.
|
checkScheme, clearStatistics, create, createFileSystem, equals, get, getAllStatistics, getStatistics, hashCode, listStatusIterator, methodNotSupported, printStatistics, renameprotected FilterFs(AbstractFileSystem fs) throws java.net.URISyntaxException
java.net.URISyntaxExceptionprotected AbstractFileSystem getMyFs()
public FileSystem.Statistics getStatistics()
getStatistics in class AbstractFileSystempublic Path makeQualified(Path path)
AbstractFileSystemmakeQualified in class AbstractFileSystempath - the path.public Path getInitialWorkingDirectory()
AbstractFileSystemgetInitialWorkingDirectory in class AbstractFileSystempublic Path getHomeDirectory()
AbstractFileSystemgetHomeDirectory in class AbstractFileSystempublic FSDataOutputStream createInternal(Path f, java.util.EnumSet<CreateFlag> flag, FsPermission absolutePermission, int bufferSize, short replication, long blockSize, Progressable progress, Options.ChecksumOpt checksumOpt, boolean createParent) throws java.io.IOException, UnresolvedLinkException
AbstractFileSystemAbstractFileSystem.create(Path, EnumSet, Options.CreateOpts...) except that the opts
have been declared explicitly.createInternal in class AbstractFileSystemf - 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.AccessControlException - access control exception.FileAlreadyExistsException - file already exists exception.java.io.FileNotFoundException - file not found exception.ParentNotDirectoryException - parent not directory exception.UnsupportedFileSystemException - unsupported filesystem exception.UnresolvedLinkException - unresolved link exception.java.io.IOException - raised on errors performing I/O.public boolean delete(Path f, boolean recursive) throws java.io.IOException, UnresolvedLinkException
AbstractFileSystemFileContext.delete(Path, boolean) except that Path f must be for
this file system.delete in class AbstractFileSystemf - the path.recursive - recursive flag.AccessControlException - access control exception.java.io.FileNotFoundException - file not found exception.UnresolvedLinkException - unresolved link exception.java.io.IOException - raised on errors performing I/O.public BlockLocation[] getFileBlockLocations(Path f, long start, long len) throws java.io.IOException, UnresolvedLinkException
AbstractFileSystemFileContext.getFileBlockLocations(Path, long, long) except that
Path f must be for this file system.getFileBlockLocations in class AbstractFileSystemf - the path.start - start.len - length.AccessControlException - access control exception.java.io.FileNotFoundException - file not found exception.UnresolvedLinkException - unresolved link exception.java.io.IOException - raised on errors performing I/O.public FileChecksum getFileChecksum(Path f) throws java.io.IOException, UnresolvedLinkException
AbstractFileSystemFileContext.getFileChecksum(Path) except that Path f must be for
this file system.getFileChecksum in class AbstractFileSystemf - the path.AccessControlException - access control exception.java.io.FileNotFoundException - file not found exception.UnresolvedLinkException - unresolved link exception.java.io.IOException - raised on errors performing I/O.public FileStatus getFileStatus(Path f) throws java.io.IOException, UnresolvedLinkException
AbstractFileSystemFileContext.getFileStatus(Path)
except that an UnresolvedLinkException may be thrown if a symlink is
encountered in the path.getFileStatus in class AbstractFileSystemf - the path.AccessControlException - access control exception.java.io.FileNotFoundException - file not found exception.UnresolvedLinkException - unresolved link exception.java.io.IOException - raised on errors performing I/O.public void msync()
throws java.io.IOException,
java.lang.UnsupportedOperationException
AbstractFileSystemIn some FileSystem implementations such as HDFS metadata synchronization is essential to guarantee consistency of read requests particularly in HA setting.
msync in class AbstractFileSystemjava.io.IOException - raised on errors performing I/O.java.lang.UnsupportedOperationException - Unsupported Operation Exception.public void access(Path path, FsAction mode) throws AccessControlException, java.io.FileNotFoundException, UnresolvedLinkException, java.io.IOException
AbstractFileSystemFileContext.access(Path, FsAction)
except that an UnresolvedLinkException may be thrown if a symlink is
encountered in the path.access in class AbstractFileSystempath - the path.mode - fsaction mode.AccessControlException - access control exception.java.io.FileNotFoundException - file not found exception.UnresolvedLinkException - unresolved link exception.java.io.IOException - raised on errors performing I/O.public FileStatus getFileLinkStatus(Path f) throws java.io.IOException, UnresolvedLinkException
AbstractFileSystemFileContext.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).getFileLinkStatus in class AbstractFileSystemf - the path.AccessControlException - access control exception.java.io.FileNotFoundException - file not found exception.UnsupportedFileSystemException - UnSupported File System Exception.java.io.IOException - raised on errors performing I/O.UnresolvedLinkExceptionpublic FsStatus getFsStatus(Path f) throws AccessControlException, java.io.FileNotFoundException, UnresolvedLinkException, java.io.IOException
AbstractFileSystemFileContext.getFsStatus(Path) except that Path f must be for this
file system.getFsStatus in class AbstractFileSystemf - the path.AccessControlException - access control exception.java.io.FileNotFoundException - file not found exception.UnresolvedLinkException - unresolved link exception.java.io.IOException - raised on errors performing I/O.public FsStatus getFsStatus() throws java.io.IOException
AbstractFileSystemFileContext.getFsStatus(Path).getFsStatus in class AbstractFileSystemAccessControlException - access control exception.java.io.FileNotFoundException - file not found exception.java.io.IOException - raised on errors performing I/O.@Deprecated public FsServerDefaults getServerDefaults() throws java.io.IOException
AbstractFileSystemgetServerDefaults in class AbstractFileSystemjava.io.IOException - an I/O error occurredpublic FsServerDefaults getServerDefaults(Path f) throws java.io.IOException
AbstractFileSystemgetServerDefaults in class AbstractFileSystemf - path to fetch server defaultsjava.io.IOException - an I/O error occurredpublic Path resolvePath(Path p) throws java.io.FileNotFoundException, UnresolvedLinkException, AccessControlException, java.io.IOException
AbstractFileSystemresolvePath in class AbstractFileSystemp - path to be resolvedjava.io.FileNotFoundException - when file not find throw.UnresolvedLinkException - if symbolic link on path cannot be
resolved internallyAccessControlException - when accees control error throw.java.io.IOException - raised on errors performing I/O.public int getUriDefaultPort()
AbstractFileSystemgetUriDefaultPort in class AbstractFileSystempublic java.net.URI getUri()
AbstractFileSystemgetUri in class AbstractFileSystempublic void checkPath(Path path)
AbstractFileSystemcheckPath in class AbstractFileSystempath - the path.public java.lang.String getUriPath(Path p)
AbstractFileSystemgetUriPath in class AbstractFileSystemp - pathpublic FileStatus[] listStatus(Path f) throws java.io.IOException, UnresolvedLinkException
AbstractFileSystemFileContext.Util.listStatus(Path) except that Path f must be
for this file system.listStatus in class AbstractFileSystemf - the path.AccessControlException - access control exception.java.io.FileNotFoundException - file not found exception.UnresolvedLinkException - unresolved link exception.java.io.IOException - raised on errors performing I/O.public RemoteIterator<LocatedFileStatus> listLocatedStatus(Path f) throws AccessControlException, java.io.FileNotFoundException, UnresolvedLinkException, java.io.IOException
AbstractFileSystemFileContext.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.listLocatedStatus in class AbstractFileSystemf - the path.AccessControlException - access control exception.java.io.FileNotFoundException - file not found exception.UnresolvedLinkException - unresolved link exception.java.io.IOException - raised on errors performing I/O.public RemoteIterator<Path> listCorruptFileBlocks(Path path) throws java.io.IOException
listCorruptFileBlocks in class AbstractFileSystempath - the path.java.io.IOException - raised on errors performing I/O.public void mkdir(Path dir, FsPermission permission, boolean createParent) throws java.io.IOException, UnresolvedLinkException
AbstractFileSystemFileContext.mkdir(Path, FsPermission, boolean) except that the Path
f must be fully qualified and the permission is absolute (i.e.
umask has been applied).mkdir in class AbstractFileSystemdir - directory.permission - permission.createParent - create parent flag.AccessControlException - access control exception.FileAlreadyExistsException - file already exists exception.java.io.FileNotFoundException - file not found exception.UnresolvedLinkException - unresolved link exception.java.io.IOException - raised on errors performing I/O.public FSDataInputStream open(Path f) throws AccessControlException, java.io.FileNotFoundException, UnresolvedLinkException, java.io.IOException
AbstractFileSystemFileContext.open(Path) except that Path f must be for this
file system.open in class AbstractFileSystemf - the path.AccessControlException - access control exception.java.io.FileNotFoundException - file not found exception.UnresolvedLinkException - unresolved link exception.java.io.IOException - raised on errors performing I/O.public FSDataInputStream open(Path f, int bufferSize) throws java.io.IOException, UnresolvedLinkException
AbstractFileSystemFileContext.open(Path, int) except that Path f must be for this
file system.open in class AbstractFileSystemf - the path.bufferSize - buffer size.AccessControlException - access control exception.java.io.FileNotFoundException - file not found exception.UnresolvedLinkException - unresolved link exception.java.io.IOException - raised on errors performing I/O.public boolean truncate(Path f, long newLength) throws AccessControlException, java.io.FileNotFoundException, UnresolvedLinkException, java.io.IOException
AbstractFileSystemFileContext.truncate(Path, long) except that Path f must be for
this file system.truncate in class AbstractFileSystemf - the path.newLength - new length.AccessControlException - access control exception.java.io.FileNotFoundException - file not found exception.UnresolvedLinkException - unresolved link exception.java.io.IOException - raised on errors performing I/O.public void renameInternal(Path src, Path dst) throws java.io.IOException, UnresolvedLinkException
AbstractFileSystemFileContext.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)renameInternal in class AbstractFileSystemsrc - src.dst - dst.AccessControlException - access control exception.FileAlreadyExistsException - file already exists exception.java.io.FileNotFoundException - file not found exception.ParentNotDirectoryException - parent not directory exception.UnresolvedLinkException - unresolved link exception.java.io.IOException - raised on errors performing I/O.public void renameInternal(Path src, Path dst, boolean overwrite) throws AccessControlException, FileAlreadyExistsException, java.io.FileNotFoundException, ParentNotDirectoryException, UnresolvedLinkException, java.io.IOException
AbstractFileSystemFileContext.rename(Path, Path, Options.Rename...) except that Path
f must be for this file system.renameInternal in class AbstractFileSystemsrc - src.dst - dst.overwrite - overwrite flag.AccessControlException - access control exception.FileAlreadyExistsException - file already exists exception.java.io.FileNotFoundException - file not found exception.ParentNotDirectoryException - parent not directory exception.UnresolvedLinkException - unresolved link exception.java.io.IOException - raised on errors performing I/O.public void setOwner(Path f, java.lang.String username, java.lang.String groupname) throws java.io.IOException, UnresolvedLinkException
AbstractFileSystemFileContext.setOwner(Path, String, String) except that Path f must
be for this file system.setOwner in class AbstractFileSystemf - the path.username - username.groupname - groupname.AccessControlException - access control exception.java.io.FileNotFoundException - file not found exception.UnresolvedLinkException - unresolved link exception.java.io.IOException - raised on errors performing I/O.public void setPermission(Path f, FsPermission permission) throws java.io.IOException, UnresolvedLinkException
AbstractFileSystemFileContext.setPermission(Path, FsPermission) except that Path f
must be for this file system.setPermission in class AbstractFileSystemf - the path.permission - permission.AccessControlException - access control exception.java.io.FileNotFoundException - file not found exception.UnresolvedLinkException - unresolved link exception.java.io.IOException - raised on errors performing I/O.public boolean setReplication(Path f, short replication) throws java.io.IOException, UnresolvedLinkException
AbstractFileSystemFileContext.setReplication(Path, short) except that Path f must be
for this file system.setReplication in class AbstractFileSystemf - the path.replication - replication.AccessControlException - access control exception.java.io.FileNotFoundException - file not found exception.UnresolvedLinkException - unresolved link exception.java.io.IOException - raised on errors performing I/O.public void setTimes(Path f, long mtime, long atime) throws java.io.IOException, UnresolvedLinkException
AbstractFileSystemFileContext.setTimes(Path, long, long) except that Path f must be
for this file system.setTimes in class AbstractFileSystemf - the path.mtime - modify time.atime - access time.AccessControlException - access control exception.java.io.FileNotFoundException - file not found exception.UnresolvedLinkException - unresolved link exception.java.io.IOException - raised on errors performing I/O.public void setVerifyChecksum(boolean verifyChecksum)
throws java.io.IOException,
UnresolvedLinkException
AbstractFileSystemFileContext.setVerifyChecksum(boolean, Path) except that Path f
must be for this file system.setVerifyChecksum in class AbstractFileSystemverifyChecksum - verify check sum flag.AccessControlException - access control exception.java.io.IOException - raised on errors performing I/O.UnresolvedLinkExceptionpublic boolean supportsSymlinks()
AbstractFileSystemsupportsSymlinks in class AbstractFileSystempublic void createSymlink(Path target, Path link, boolean createParent) throws java.io.IOException, UnresolvedLinkException
AbstractFileSystemFileContext.createSymlink(Path, Path, boolean);createSymlink in class AbstractFileSystemtarget - target.link - link.createParent - create parent.java.io.IOException - raised on errors performing I/O.UnresolvedLinkException - unresolved link exception.public Path getLinkTarget(Path f) throws java.io.IOException
AbstractFileSystemFSLinkResolver, and differs from the similarly named method
FileContext.getLinkTarget(Path).getLinkTarget in class AbstractFileSystemf - the path.java.io.IOException - subclass implementations may throw IOExceptionpublic java.lang.String getCanonicalServiceName()
AbstractFileSystemgetCanonicalServiceName in class AbstractFileSystempublic java.util.List<Token<?>> getDelegationTokens(java.lang.String renewer) throws java.io.IOException
AbstractFileSystemgetDelegationTokens in class AbstractFileSystemrenewer - the account name that is allowed to renew the token.java.io.IOException - raised on errors performing I/O.public boolean isValidName(java.lang.String src)
AbstractFileSystemisValidName in class AbstractFileSystemsrc - String source filename to check, path part of the URIpublic void modifyAclEntries(Path path, java.util.List<AclEntry> aclSpec) throws java.io.IOException
AbstractFileSystemmodifyAclEntries in class AbstractFileSystempath - Path to modifyaclSpec - List<AclEntry> describing modificationsjava.io.IOException - if an ACL could not be modifiedpublic void removeAclEntries(Path path, java.util.List<AclEntry> aclSpec) throws java.io.IOException
AbstractFileSystemremoveAclEntries in class AbstractFileSystempath - Path to modifyaclSpec - List<AclEntry> describing entries to removejava.io.IOException - if an ACL could not be modifiedpublic void removeDefaultAcl(Path path) throws java.io.IOException
AbstractFileSystemremoveDefaultAcl in class AbstractFileSystempath - Path to modifyjava.io.IOException - if an ACL could not be modifiedpublic void removeAcl(Path path) throws java.io.IOException
AbstractFileSystemremoveAcl in class AbstractFileSystempath - Path to modifyjava.io.IOException - if an ACL could not be removedpublic void setAcl(Path path, java.util.List<AclEntry> aclSpec) throws java.io.IOException
AbstractFileSystemsetAcl in class AbstractFileSystempath - Path to modifyaclSpec - List<AclEntry> describing modifications, must
include entries for user, group, and others for compatibility with
permission bits.java.io.IOException - if an ACL could not be modifiedpublic AclStatus getAclStatus(Path path) throws java.io.IOException
AbstractFileSystemgetAclStatus in class AbstractFileSystempath - Path to getjava.io.IOException - if an ACL could not be readpublic void setXAttr(Path path, java.lang.String name, byte[] value) throws java.io.IOException
AbstractFileSystemRefer to the HDFS extended attributes user documentation for details.
setXAttr in class AbstractFileSystempath - Path to modifyname - xattr name.value - xattr value.java.io.IOException - raised on errors performing I/O.public void setXAttr(Path path, java.lang.String name, byte[] value, java.util.EnumSet<XAttrSetFlag> flag) throws java.io.IOException
AbstractFileSystemRefer to the HDFS extended attributes user documentation for details.
setXAttr in class AbstractFileSystempath - Path to modifyname - xattr name.value - xattr value.flag - xattr set flagjava.io.IOException - raised on errors performing I/O.public byte[] getXAttr(Path path, java.lang.String name) throws java.io.IOException
AbstractFileSystemRefer to the HDFS extended attributes user documentation for details.
getXAttr in class AbstractFileSystempath - Path to get extended attributename - xattr name.java.io.IOException - raised on errors performing I/O.public java.util.Map<java.lang.String,byte[]> getXAttrs(Path path) throws java.io.IOException
AbstractFileSystemRefer to the HDFS extended attributes user documentation for details.
getXAttrs in class AbstractFileSystempath - Path to get extended attributesjava.io.IOException - raised on errors performing I/O.public java.util.Map<java.lang.String,byte[]> getXAttrs(Path path, java.util.List<java.lang.String> names) throws java.io.IOException
AbstractFileSystemRefer to the HDFS extended attributes user documentation for details.
getXAttrs in class AbstractFileSystempath - Path to get extended attributesnames - XAttr names.java.io.IOException - raised on errors performing I/O.public java.util.List<java.lang.String> listXAttrs(Path path) throws java.io.IOException
AbstractFileSystemRefer to the HDFS extended attributes user documentation for details.
listXAttrs in class AbstractFileSystempath - Path to get extended attributesjava.io.IOException - raised on errors performing I/O.public void removeXAttr(Path path, java.lang.String name) throws java.io.IOException
AbstractFileSystemRefer to the HDFS extended attributes user documentation for details.
removeXAttr in class AbstractFileSystempath - Path to remove extended attributename - xattr namejava.io.IOException - raised on errors performing I/O.public Path createSnapshot(Path path, java.lang.String snapshotName) throws java.io.IOException
AbstractFileSystemFileContext.createSnapshot(Path, String).createSnapshot in class AbstractFileSystempath - the path.snapshotName - snapshot name.java.io.IOException - raised on errors performing I/O.public void renameSnapshot(Path path, java.lang.String snapshotOldName, java.lang.String snapshotNewName) throws java.io.IOException
AbstractFileSystemFileContext.renameSnapshot(Path, String, String).renameSnapshot in class AbstractFileSystempath - the path.snapshotOldName - snapshot old name.snapshotNewName - snapshot new name.java.io.IOException - raised on errors performing I/O.public void deleteSnapshot(Path path, java.lang.String snapshotName) throws java.io.IOException
AbstractFileSystemFileContext.deleteSnapshot(Path, String).deleteSnapshot in class AbstractFileSystempath - snapshot dir.snapshotName - snapshot name.java.io.IOException - raised on errors performing I/O.public void satisfyStoragePolicy(Path path) throws java.io.IOException
AbstractFileSystemsatisfyStoragePolicy in class AbstractFileSystempath - The source path referring to either a directory or a file.java.io.IOException - raised on errors performing I/O.public void setStoragePolicy(Path path, java.lang.String policyName) throws java.io.IOException
AbstractFileSystemsetStoragePolicy in class AbstractFileSystempath - file or directory path.policyName - the name of the target storage policy. The list
of supported Storage policies can be retrieved
via AbstractFileSystem.getAllStoragePolicies().java.io.IOException - raised on errors performing I/O.public void unsetStoragePolicy(Path src) throws java.io.IOException
AbstractFileSystemunsetStoragePolicy in class AbstractFileSystemsrc - file or directory path.java.io.IOException - raised on errors performing I/O.public BlockStoragePolicySpi getStoragePolicy(Path src) throws java.io.IOException
AbstractFileSystemgetStoragePolicy in class AbstractFileSystemsrc - file or directory path.java.io.IOException - raised on errors performing I/O.public java.util.Collection<? extends BlockStoragePolicySpi> getAllStoragePolicies() throws java.io.IOException
AbstractFileSystemgetAllStoragePolicies in class AbstractFileSystemjava.io.IOException - raised on errors performing I/O.public java.util.concurrent.CompletableFuture<FSDataInputStream> openFileWithOptions(Path path, OpenFileParameters parameters) throws java.io.IOException
AbstractFileSystemAbstractFileSystem.open(Path, int)in this call;
the actual outcome is in the returned CompletableFuture.
This avoids having to create some thread pool, while still
setting up the expectation that the get() call
is needed to evaluate the result.openFileWithOptions in class AbstractFileSystempath - path to the fileparameters - open file parameters from the builder.java.io.IOException - failure to resolve the link.public boolean hasPathCapability(Path path, java.lang.String capability) throws java.io.IOException
PathCapabilitiestrue, this instance is explicitly
declaring that the capability is available.
If the function returns false, it can mean one of:
Implementors: PathCapabilitiesSupport
can be used to help implement this method.
hasPathCapability in interface PathCapabilitieshasPathCapability in class AbstractFileSystempath - path to query the capability of.capability - non-null, non-empty string to query the path for support.java.io.IOException - this should not be raised, except on problems
resolving paths or relaying the call.public MultipartUploaderBuilder createMultipartUploader(Path basePath) throws java.io.IOException
AbstractFileSystemcreateMultipartUploader in class AbstractFileSystembasePath - file path under which all files are uploadedjava.io.IOException - if some early checks cause IO failures.public Path getEnclosingRoot(Path path) throws java.io.IOException
AbstractFileSystemgetEnclosingRoot in class AbstractFileSystempath - file path to find the enclosing root path forjava.io.IOException - early checks like failure to resolve path cause IO failuresCopyright © 2008–2025 Apache Software Foundation. All rights reserved.