@PublicApi public interface FileSystem extends Closeable
BaseFileSystem instead. This ensures any new methods added to the interface will be provided
by the default implementation.| Modifier and Type | Interface and Description |
|---|---|
static class |
FileSystem.Cache
A cache for storing
FileSystem clients. |
static class |
FileSystem.Factory
Factory for
FileSystem. |
static class |
FileSystem.FileSystemKey
A key which can be used to look up a
FileSystem instance in the FileSystem.Cache. |
| Modifier and Type | Method and Description |
|---|---|
void |
createDirectory(alluxio.AlluxioURI path)
Convenience method for
createDirectory(AlluxioURI, CreateDirectoryPOptions) with
default options. |
void |
createDirectory(alluxio.AlluxioURI path,
alluxio.grpc.CreateDirectoryPOptions options)
Creates a directory.
|
FileOutStream |
createFile(alluxio.AlluxioURI path)
Convenience method for
createFile(AlluxioURI, CreateFilePOptions) with default
options. |
FileOutStream |
createFile(alluxio.AlluxioURI path,
alluxio.grpc.CreateFilePOptions options)
Creates a file.
|
void |
delete(alluxio.AlluxioURI path)
Convenience method for
delete(AlluxioURI, DeletePOptions) with default options. |
void |
delete(alluxio.AlluxioURI path,
alluxio.grpc.DeletePOptions options)
Deletes a file or a directory.
|
boolean |
exists(alluxio.AlluxioURI path)
Convenience method for
exists(AlluxioURI, ExistsPOptions) with default options. |
boolean |
exists(alluxio.AlluxioURI path,
alluxio.grpc.ExistsPOptions options)
Checks whether a path exists in Alluxio space.
|
void |
free(alluxio.AlluxioURI path)
Convenience method for
free(AlluxioURI, FreePOptions) with default options. |
void |
free(alluxio.AlluxioURI path,
alluxio.grpc.FreePOptions options)
Evicts any data under the given path from Alluxio space, but does not delete the data from the
UFS.
|
List<alluxio.wire.BlockLocationInfo> |
getBlockLocations(alluxio.AlluxioURI path)
Builds a list of
BlockLocationInfo for the given file. |
alluxio.conf.AlluxioConfiguration |
getConf() |
Map<String,alluxio.wire.MountPointInfo> |
getMountTable()
Lists all mount points and their corresponding under storage addresses.
|
alluxio.client.file.URIStatus |
getStatus(alluxio.AlluxioURI path)
Convenience method for
getStatus(AlluxioURI, GetStatusPOptions) with default options. |
alluxio.client.file.URIStatus |
getStatus(alluxio.AlluxioURI path,
alluxio.grpc.GetStatusPOptions options)
Gets the
URIStatus object that represents the metadata of an Alluxio path. |
List<alluxio.wire.SyncPointInfo> |
getSyncPathList()
Lists all the actively synced paths.
|
boolean |
isClosed()
If there are operations currently running and close is called concurrently the behavior is
undefined.
|
List<alluxio.client.file.URIStatus> |
listStatus(alluxio.AlluxioURI path)
Convenience method for
listStatus(AlluxioURI, ListStatusPOptions) with default
options. |
List<alluxio.client.file.URIStatus> |
listStatus(alluxio.AlluxioURI path,
alluxio.grpc.ListStatusPOptions options)
If the path is a directory, returns the
URIStatus of all the direct entries in it. |
void |
mount(alluxio.AlluxioURI alluxioPath,
alluxio.AlluxioURI ufsPath)
Convenience method for
mount(AlluxioURI, AlluxioURI, MountPOptions) with default
options. |
void |
mount(alluxio.AlluxioURI alluxioPath,
alluxio.AlluxioURI ufsPath,
alluxio.grpc.MountPOptions options)
Mounts a UFS subtree to the given Alluxio path.
|
FileInStream |
openFile(alluxio.AlluxioURI path)
Convenience method for
openFile(AlluxioURI, OpenFilePOptions) with default options. |
FileInStream |
openFile(alluxio.AlluxioURI path,
alluxio.grpc.OpenFilePOptions options)
Opens a file for reading.
|
void |
persist(alluxio.AlluxioURI path)
Convenience method for
persist(AlluxioURI, ScheduleAsyncPersistencePOptions) which
uses the default ScheduleAsyncPersistencePOptions. |
void |
persist(alluxio.AlluxioURI path,
alluxio.grpc.ScheduleAsyncPersistencePOptions options)
Schedules the given path to be asynchronously persisted to the under file system.
|
void |
rename(alluxio.AlluxioURI src,
alluxio.AlluxioURI dst)
Convenience method for
rename(AlluxioURI, AlluxioURI, RenamePOptions) with default
options. |
void |
rename(alluxio.AlluxioURI src,
alluxio.AlluxioURI dst,
alluxio.grpc.RenamePOptions options)
Renames an existing Alluxio path to another Alluxio path in Alluxio.
|
void |
setAcl(alluxio.AlluxioURI path,
alluxio.grpc.SetAclAction action,
List<alluxio.security.authorization.AclEntry> entries)
Convenience method for
setAcl(AlluxioURI, SetAclAction, List, SetAclPOptions) with
default options. |
void |
setAcl(alluxio.AlluxioURI path,
alluxio.grpc.SetAclAction action,
List<alluxio.security.authorization.AclEntry> entries,
alluxio.grpc.SetAclPOptions options)
Sets the ACL for a path.
|
void |
setAttribute(alluxio.AlluxioURI path)
Convenience method for
setAttribute(AlluxioURI, SetAttributePOptions) with default
options. |
void |
setAttribute(alluxio.AlluxioURI path,
alluxio.grpc.SetAttributePOptions options)
Sets any number of a path's attributes, such as TTL and pin status.
|
void |
startSync(alluxio.AlluxioURI path)
Starts the active syncing process on an Alluxio path.
|
void |
stopSync(alluxio.AlluxioURI path)
Stops the active syncing process on an Alluxio path.
|
void |
unmount(alluxio.AlluxioURI path)
Convenience method for
unmount(AlluxioURI, UnmountPOptions) with default options. |
void |
unmount(alluxio.AlluxioURI path,
alluxio.grpc.UnmountPOptions options)
Unmounts a UFS subtree identified by the given Alluxio path.
|
void |
updateMount(alluxio.AlluxioURI alluxioPath,
alluxio.grpc.MountPOptions options)
Updates the options for an existing mount point.
|
boolean isClosed()
void createDirectory(alluxio.AlluxioURI path)
throws alluxio.exception.FileAlreadyExistsException,
alluxio.exception.InvalidPathException,
IOException,
alluxio.exception.AlluxioException
createDirectory(AlluxioURI, CreateDirectoryPOptions) with
default options.path - the path of the directory to create in Alluxio spacealluxio.exception.FileAlreadyExistsException - if there is already a file or directory at the given pathalluxio.exception.InvalidPathException - if the path is invalidIOExceptionalluxio.exception.AlluxioExceptionvoid createDirectory(alluxio.AlluxioURI path,
alluxio.grpc.CreateDirectoryPOptions options)
throws alluxio.exception.FileAlreadyExistsException,
alluxio.exception.InvalidPathException,
IOException,
alluxio.exception.AlluxioException
path - the path of the directory to create in Alluxio spaceoptions - options to associate with this operationalluxio.exception.FileAlreadyExistsException - if there is already a file or directory at the given pathalluxio.exception.InvalidPathException - if the path is invalidIOExceptionalluxio.exception.AlluxioExceptionFileOutStream createFile(alluxio.AlluxioURI path) throws alluxio.exception.FileAlreadyExistsException, alluxio.exception.InvalidPathException, IOException, alluxio.exception.AlluxioException
createFile(AlluxioURI, CreateFilePOptions) with default
options.path - the path of the file to create in Alluxio spaceFileOutStream which will write data to the newly created filealluxio.exception.FileAlreadyExistsException - if there is already a file at the given pathalluxio.exception.InvalidPathException - if the path is invalidIOExceptionalluxio.exception.AlluxioExceptionFileOutStream createFile(alluxio.AlluxioURI path, alluxio.grpc.CreateFilePOptions options) throws alluxio.exception.FileAlreadyExistsException, alluxio.exception.InvalidPathException, IOException, alluxio.exception.AlluxioException
path - the path of the file to create in Alluxio spaceoptions - options to associate with this operationFileOutStream which will write data to the newly created filealluxio.exception.FileAlreadyExistsException - if there is already a file at the given pathalluxio.exception.InvalidPathException - if the path is invalidIOExceptionalluxio.exception.AlluxioExceptionvoid delete(alluxio.AlluxioURI path)
throws alluxio.exception.DirectoryNotEmptyException,
alluxio.exception.FileDoesNotExistException,
IOException,
alluxio.exception.AlluxioException
delete(AlluxioURI, DeletePOptions) with default options.path - the path to delete in Alluxio spacealluxio.exception.FileDoesNotExistException - if the given path does not existalluxio.exception.DirectoryNotEmptyException - if recursive is false and the path is a nonempty directoryIOExceptionalluxio.exception.AlluxioExceptionvoid delete(alluxio.AlluxioURI path,
alluxio.grpc.DeletePOptions options)
throws alluxio.exception.DirectoryNotEmptyException,
alluxio.exception.FileDoesNotExistException,
IOException,
alluxio.exception.AlluxioException
path - the path to delete in Alluxio spaceoptions - options to associate with this operationalluxio.exception.FileDoesNotExistException - if the given path does not existalluxio.exception.DirectoryNotEmptyException - if recursive is false and the path is a nonempty directoryIOExceptionalluxio.exception.AlluxioExceptionboolean exists(alluxio.AlluxioURI path)
throws alluxio.exception.InvalidPathException,
IOException,
alluxio.exception.AlluxioException
exists(AlluxioURI, ExistsPOptions) with default options.path - the path in questionalluxio.exception.InvalidPathException - if the path is invalidIOExceptionalluxio.exception.AlluxioExceptionboolean exists(alluxio.AlluxioURI path,
alluxio.grpc.ExistsPOptions options)
throws alluxio.exception.InvalidPathException,
IOException,
alluxio.exception.AlluxioException
path - the path in questionoptions - options to associate with this operationalluxio.exception.InvalidPathException - if the path is invalidIOExceptionalluxio.exception.AlluxioExceptionvoid free(alluxio.AlluxioURI path)
throws alluxio.exception.FileDoesNotExistException,
IOException,
alluxio.exception.AlluxioException
free(AlluxioURI, FreePOptions) with default options.path - the path to free in Alluxio spacealluxio.exception.FileDoesNotExistException - if the given path does not existIOExceptionalluxio.exception.AlluxioExceptionvoid free(alluxio.AlluxioURI path,
alluxio.grpc.FreePOptions options)
throws alluxio.exception.FileDoesNotExistException,
IOException,
alluxio.exception.AlluxioException
path - the path to free in Alluxio spaceoptions - options to associate with this operationalluxio.exception.FileDoesNotExistException - if the given path does not existIOExceptionalluxio.exception.AlluxioExceptionList<alluxio.wire.BlockLocationInfo> getBlockLocations(alluxio.AlluxioURI path) throws alluxio.exception.FileDoesNotExistException, IOException, alluxio.exception.AlluxioException
BlockLocationInfo for the given file. Each list item contains a list
of WorkerNetAddress which allows a user to determine the physical location of a block
of the given file stored within Alluxio. In the case where data is stored in a UFS, but not in
Alluxio this function will only include a WorkerNetAddress if the block stored in the
UFS is co-located with an Alluxio worker.
However if there are no co-located Alluxio workers for the block, then the behavior is
controlled by the PropertyKey.USER_UFS_BLOCK_LOCATION_ALL_FALLBACK_ENABLED . If
this property is set to true then every Alluxio worker will be returned.
Blocks which are stored in the UFS and are *not* co-located with any Alluxio worker will return
an empty list. If the file block is within Alluxio *and* the UFS then this will only return
Alluxio workers which currently store the block.path - the path to get block info foralluxio.exception.FileDoesNotExistException - if the given path does not existIOExceptionalluxio.exception.AlluxioExceptionalluxio.conf.AlluxioConfiguration getConf()
alluxio.client.file.URIStatus getStatus(alluxio.AlluxioURI path)
throws alluxio.exception.FileDoesNotExistException,
IOException,
alluxio.exception.AlluxioException
getStatus(AlluxioURI, GetStatusPOptions) with default options.path - the path to obtain information aboutURIStatus of the filealluxio.exception.FileDoesNotExistException - if the path does not existIOExceptionalluxio.exception.AlluxioExceptionalluxio.client.file.URIStatus getStatus(alluxio.AlluxioURI path,
alluxio.grpc.GetStatusPOptions options)
throws alluxio.exception.FileDoesNotExistException,
IOException,
alluxio.exception.AlluxioException
URIStatus object that represents the metadata of an Alluxio path.path - the path to obtain information aboutoptions - options to associate with this operationURIStatus of the filealluxio.exception.FileDoesNotExistException - if the path does not existIOExceptionalluxio.exception.AlluxioExceptionList<alluxio.client.file.URIStatus> listStatus(alluxio.AlluxioURI path) throws alluxio.exception.FileDoesNotExistException, IOException, alluxio.exception.AlluxioException
listStatus(AlluxioURI, ListStatusPOptions) with default
options.path - the path to list information aboutURIStatuss containing information about the files and directories
which are children of the given pathalluxio.exception.FileDoesNotExistException - if the given path does not existIOExceptionalluxio.exception.AlluxioExceptionList<alluxio.client.file.URIStatus> listStatus(alluxio.AlluxioURI path, alluxio.grpc.ListStatusPOptions options) throws alluxio.exception.FileDoesNotExistException, IOException, alluxio.exception.AlluxioException
URIStatus of all the direct entries in it.
Otherwise returns a list with a single URIStatus element for the file.path - the path to list information aboutoptions - options to associate with this operationURIStatuss containing information about the files and directories
which are children of the given pathalluxio.exception.FileDoesNotExistException - if the given path does not existIOExceptionalluxio.exception.AlluxioExceptionvoid mount(alluxio.AlluxioURI alluxioPath,
alluxio.AlluxioURI ufsPath)
throws IOException,
alluxio.exception.AlluxioException
mount(AlluxioURI, AlluxioURI, MountPOptions) with default
options.alluxioPath - an Alluxio path to mount the data toufsPath - a UFS path to mount the data fromIOExceptionalluxio.exception.AlluxioExceptionvoid mount(alluxio.AlluxioURI alluxioPath,
alluxio.AlluxioURI ufsPath,
alluxio.grpc.MountPOptions options)
throws IOException,
alluxio.exception.AlluxioException
AlluxioException will be thrown.
This method does not transfer any data or metadata from the UFS. It simply establishes the
connection between the given Alluxio path and UFS path.alluxioPath - an Alluxio path to mount the data toufsPath - a UFS path to mount the data fromoptions - options to associate with this operationIOExceptionalluxio.exception.AlluxioExceptionvoid updateMount(alluxio.AlluxioURI alluxioPath,
alluxio.grpc.MountPOptions options)
throws IOException,
alluxio.exception.AlluxioException
alluxioPath - the Alluxio path of the mount pointoptions - options for this mount pointIOExceptionalluxio.exception.AlluxioExceptionMap<String,alluxio.wire.MountPointInfo> getMountTable() throws IOException, alluxio.exception.AlluxioException
MountPointInfoIOExceptionalluxio.exception.AlluxioExceptionList<alluxio.wire.SyncPointInfo> getSyncPathList() throws IOException, alluxio.exception.AlluxioException
IOExceptionalluxio.exception.AlluxioExceptionFileInStream openFile(alluxio.AlluxioURI path) throws alluxio.exception.FileDoesNotExistException, IOException, alluxio.exception.AlluxioException
openFile(AlluxioURI, OpenFilePOptions) with default options.path - the file to read fromFileInStream for the given pathalluxio.exception.FileDoesNotExistException - if the given file does not existIOExceptionalluxio.exception.AlluxioExceptionFileInStream openFile(alluxio.AlluxioURI path, alluxio.grpc.OpenFilePOptions options) throws alluxio.exception.FileDoesNotExistException, IOException, alluxio.exception.AlluxioException
path - the file to read fromoptions - options to associate with this operationFileInStream for the given pathalluxio.exception.FileDoesNotExistException - if the given file does not existIOExceptionalluxio.exception.AlluxioExceptionvoid persist(alluxio.AlluxioURI path)
throws alluxio.exception.FileDoesNotExistException,
IOException,
alluxio.exception.AlluxioException
persist(AlluxioURI, ScheduleAsyncPersistencePOptions) which
uses the default ScheduleAsyncPersistencePOptions.path - the uri of the file to persistalluxio.exception.FileDoesNotExistExceptionIOExceptionalluxio.exception.AlluxioExceptionvoid persist(alluxio.AlluxioURI path,
alluxio.grpc.ScheduleAsyncPersistencePOptions options)
throws alluxio.exception.FileDoesNotExistException,
IOException,
alluxio.exception.AlluxioException
FileSystemUtils#persistAndWait(FileSystem, AlluxioURI).path - the uri of the file to persistoptions - the options to use when submitting persist the pathalluxio.exception.FileDoesNotExistExceptionIOExceptionalluxio.exception.AlluxioExceptionvoid rename(alluxio.AlluxioURI src,
alluxio.AlluxioURI dst)
throws alluxio.exception.FileDoesNotExistException,
IOException,
alluxio.exception.AlluxioException
rename(AlluxioURI, AlluxioURI, RenamePOptions) with default
options.src - the path of the source, this must already existdst - the path of the destination, this path should not existalluxio.exception.FileDoesNotExistException - if the given file does not existIOExceptionalluxio.exception.AlluxioExceptionvoid rename(alluxio.AlluxioURI src,
alluxio.AlluxioURI dst,
alluxio.grpc.RenamePOptions options)
throws alluxio.exception.FileDoesNotExistException,
IOException,
alluxio.exception.AlluxioException
src - the path of the source, this must already existdst - the path of the destination, this path should not existoptions - options to associate with this operationalluxio.exception.FileDoesNotExistException - if the given file does not existIOExceptionalluxio.exception.AlluxioExceptionvoid setAcl(alluxio.AlluxioURI path,
alluxio.grpc.SetAclAction action,
List<alluxio.security.authorization.AclEntry> entries)
throws alluxio.exception.FileDoesNotExistException,
IOException,
alluxio.exception.AlluxioException
setAcl(AlluxioURI, SetAclAction, List, SetAclPOptions) with
default options.path - the path to set the ACL foraction - the set action to performentries - the ACL entriesalluxio.exception.FileDoesNotExistException - if the given file does not existIOExceptionalluxio.exception.AlluxioExceptionvoid setAcl(alluxio.AlluxioURI path,
alluxio.grpc.SetAclAction action,
List<alluxio.security.authorization.AclEntry> entries,
alluxio.grpc.SetAclPOptions options)
throws alluxio.exception.FileDoesNotExistException,
IOException,
alluxio.exception.AlluxioException
path - the path to set the ACL foraction - the set action to performentries - the ACL entriesoptions - options to associate with this operationalluxio.exception.FileDoesNotExistException - if the given file does not existIOExceptionalluxio.exception.AlluxioExceptionvoid startSync(alluxio.AlluxioURI path)
throws alluxio.exception.FileDoesNotExistException,
IOException,
alluxio.exception.AlluxioException
path - the path to syncalluxio.exception.FileDoesNotExistExceptionIOExceptionalluxio.exception.AlluxioExceptionvoid stopSync(alluxio.AlluxioURI path)
throws alluxio.exception.FileDoesNotExistException,
IOException,
alluxio.exception.AlluxioException
path - the path to stop syncingalluxio.exception.FileDoesNotExistExceptionIOExceptionalluxio.exception.AlluxioExceptionvoid setAttribute(alluxio.AlluxioURI path)
throws alluxio.exception.FileDoesNotExistException,
IOException,
alluxio.exception.AlluxioException
setAttribute(AlluxioURI, SetAttributePOptions) with default
options.path - the path to set attributes foralluxio.exception.FileDoesNotExistException - if the given file does not existIOExceptionalluxio.exception.AlluxioExceptionvoid setAttribute(alluxio.AlluxioURI path,
alluxio.grpc.SetAttributePOptions options)
throws alluxio.exception.FileDoesNotExistException,
IOException,
alluxio.exception.AlluxioException
path - the path to set attributes foroptions - options to associate with this operationalluxio.exception.FileDoesNotExistException - if the given file does not existIOExceptionalluxio.exception.AlluxioExceptionvoid unmount(alluxio.AlluxioURI path)
throws IOException,
alluxio.exception.AlluxioException
unmount(AlluxioURI, UnmountPOptions) with default options.path - an Alluxio path, this must be a mount pointIOExceptionalluxio.exception.AlluxioExceptionvoid unmount(alluxio.AlluxioURI path,
alluxio.grpc.UnmountPOptions options)
throws IOException,
alluxio.exception.AlluxioException
path - an Alluxio path, this must be a mount pointoptions - options to associate with this operationIOExceptionalluxio.exception.AlluxioExceptionCopyright © 2024. All Rights Reserved.