@PublicApi public interface FileSystem
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.Factory
Factory for
FileSystem . |
Modifier and Type | Method and Description |
---|---|
void |
createDirectory(AlluxioURI path)
Convenience method for
createDirectory(AlluxioURI, CreateDirectoryOptions) with
default options. |
void |
createDirectory(AlluxioURI path,
CreateDirectoryOptions options)
Creates a directory.
|
FileOutStream |
createFile(AlluxioURI path)
Convenience method for
createFile(AlluxioURI, CreateFileOptions) with default options. |
FileOutStream |
createFile(AlluxioURI path,
CreateFileOptions options)
Creates a file.
|
void |
delete(AlluxioURI path)
Convenience method for
delete(AlluxioURI, DeleteOptions) with default options. |
void |
delete(AlluxioURI path,
DeleteOptions options)
Deletes a file or a directory.
|
boolean |
exists(AlluxioURI path)
Convenience method for
exists(AlluxioURI, ExistsOptions) with default options. |
boolean |
exists(AlluxioURI path,
ExistsOptions options)
Checks whether a path exists in Alluxio space.
|
void |
free(AlluxioURI path)
Convenience method for
free(AlluxioURI, FreeOptions) with default options. |
void |
free(AlluxioURI path,
FreeOptions options)
Evicts any data under the given path from Alluxio space, but does not delete the data from the
UFS.
|
Map<String,MountPointInfo> |
getMountTable()
Lists all mount points and their corresponding under storage addresses.
|
URIStatus |
getStatus(AlluxioURI path)
Convenience method for
getStatus(AlluxioURI, GetStatusOptions) with default options. |
URIStatus |
getStatus(AlluxioURI path,
GetStatusOptions options)
Gets the
URIStatus object that represents the metadata of an Alluxio path. |
List<URIStatus> |
listStatus(AlluxioURI path)
Convenience method for
listStatus(AlluxioURI, ListStatusOptions) with default options. |
List<URIStatus> |
listStatus(AlluxioURI path,
ListStatusOptions options)
If the path is a directory, returns the
URIStatus of all the direct entries in it. |
void |
loadMetadata(AlluxioURI path)
Deprecated.
since version 1.1 and will be removed in version 2.0
|
void |
loadMetadata(AlluxioURI path,
LoadMetadataOptions options)
Deprecated.
since version 1.1 and will be removed in version 2.0
|
void |
mount(AlluxioURI alluxioPath,
AlluxioURI ufsPath)
Convenience method for
mount(AlluxioURI, AlluxioURI, MountOptions) with default
options. |
void |
mount(AlluxioURI alluxioPath,
AlluxioURI ufsPath,
MountOptions options)
Mounts a UFS subtree to the given Alluxio path.
|
FileInStream |
openFile(AlluxioURI path)
Convenience method for
openFile(AlluxioURI, OpenFileOptions) with default options. |
FileInStream |
openFile(AlluxioURI path,
OpenFileOptions options)
Opens a file for reading.
|
void |
rename(AlluxioURI src,
AlluxioURI dst)
Convenience method for
rename(AlluxioURI, AlluxioURI, RenameOptions) with default
options. |
void |
rename(AlluxioURI src,
AlluxioURI dst,
RenameOptions options)
Renames an existing Alluxio path to another Alluxio path in Alluxio.
|
void |
setAttribute(AlluxioURI path)
Convenience method for
setAttribute(AlluxioURI, SetAttributeOptions) with default
options. |
void |
setAttribute(AlluxioURI path,
SetAttributeOptions options)
Sets any number of a path's attributes, such as TTL and pin status.
|
void |
unmount(AlluxioURI path)
Convenience method for
unmount(AlluxioURI, UnmountOptions) with default options. |
void |
unmount(AlluxioURI path,
UnmountOptions options)
Unmounts a UFS subtree identified by the given Alluxio path.
|
void createDirectory(AlluxioURI path) throws FileAlreadyExistsException, InvalidPathException, IOException, AlluxioException
createDirectory(AlluxioURI, CreateDirectoryOptions)
with
default options.path
- the path of the directory to create in Alluxio spaceFileAlreadyExistsException
- if there is already a file or directory at the given pathInvalidPathException
- if the path is invalidIOException
AlluxioException
void createDirectory(AlluxioURI path, CreateDirectoryOptions options) throws FileAlreadyExistsException, InvalidPathException, IOException, AlluxioException
path
- the path of the directory to create in Alluxio spaceoptions
- options to associate with this operationFileAlreadyExistsException
- if there is already a file or directory at the given pathInvalidPathException
- if the path is invalidIOException
AlluxioException
FileOutStream createFile(AlluxioURI path) throws FileAlreadyExistsException, InvalidPathException, IOException, AlluxioException
createFile(AlluxioURI, CreateFileOptions)
with default options.path
- the path of the file to create in Alluxio spaceFileOutStream
which will write data to the newly created fileFileAlreadyExistsException
- if there is already a file at the given pathInvalidPathException
- if the path is invalidIOException
AlluxioException
FileOutStream createFile(AlluxioURI path, CreateFileOptions options) throws FileAlreadyExistsException, InvalidPathException, IOException, 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 fileFileAlreadyExistsException
- if there is already a file at the given pathInvalidPathException
- if the path is invalidIOException
AlluxioException
void delete(AlluxioURI path) throws DirectoryNotEmptyException, FileDoesNotExistException, IOException, AlluxioException
delete(AlluxioURI, DeleteOptions)
with default options.path
- the path to delete in Alluxio spaceFileDoesNotExistException
- if the given path does not existDirectoryNotEmptyException
- if recursive is false and the path is a nonempty directoryIOException
AlluxioException
void delete(AlluxioURI path, DeleteOptions options) throws DirectoryNotEmptyException, FileDoesNotExistException, IOException, AlluxioException
path
- the path to delete in Alluxio spaceoptions
- options to associate with this operationFileDoesNotExistException
- if the given path does not existDirectoryNotEmptyException
- if recursive is false and the path is a nonempty directoryIOException
AlluxioException
boolean exists(AlluxioURI path) throws InvalidPathException, IOException, AlluxioException
exists(AlluxioURI, ExistsOptions)
with default options.path
- the path in questionInvalidPathException
- if the path is invalidIOException
AlluxioException
boolean exists(AlluxioURI path, ExistsOptions options) throws InvalidPathException, IOException, AlluxioException
path
- the path in questionoptions
- options to associate with this operationInvalidPathException
- if the path is invalidIOException
AlluxioException
void free(AlluxioURI path) throws FileDoesNotExistException, IOException, AlluxioException
free(AlluxioURI, FreeOptions)
with default options.path
- the path to free in Alluxio spaceFileDoesNotExistException
- if the given path does not existIOException
AlluxioException
void free(AlluxioURI path, FreeOptions options) throws FileDoesNotExistException, IOException, AlluxioException
path
- the path to free in Alluxio spaceoptions
- options to associate with this operationFileDoesNotExistException
- if the given path does not existIOException
AlluxioException
URIStatus getStatus(AlluxioURI path) throws FileDoesNotExistException, IOException, AlluxioException
getStatus(AlluxioURI, GetStatusOptions)
with default options.path
- the path to obtain information aboutURIStatus
of the fileFileDoesNotExistException
- if the path does not existIOException
AlluxioException
URIStatus getStatus(AlluxioURI path, GetStatusOptions options) throws FileDoesNotExistException, IOException, 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 fileFileDoesNotExistException
- if the path does not existIOException
AlluxioException
List<URIStatus> listStatus(AlluxioURI path) throws FileDoesNotExistException, IOException, AlluxioException
listStatus(AlluxioURI, ListStatusOptions)
with default options.path
- the path to list information aboutURIStatus
s containing information about the files and directories
which are children of the given pathFileDoesNotExistException
- if the given path does not existIOException
AlluxioException
List<URIStatus> listStatus(AlluxioURI path, ListStatusOptions options) throws FileDoesNotExistException, IOException, 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 operationURIStatus
s containing information about the files and directories
which are children of the given pathFileDoesNotExistException
- if the given path does not existIOException
AlluxioException
@Deprecated void loadMetadata(AlluxioURI path) throws FileDoesNotExistException, IOException, AlluxioException
loadMetadata(AlluxioURI, LoadMetadataOptions)
with default
options.path
- the path for which to load metadata from UFSFileDoesNotExistException
- if the given path does not existIOException
AlluxioException
@Deprecated void loadMetadata(AlluxioURI path, LoadMetadataOptions options) throws FileDoesNotExistException, IOException, AlluxioException
path
- the path for which to load metadata from UFSoptions
- options to associate with this operationFileDoesNotExistException
- if the given path does not existIOException
AlluxioException
void mount(AlluxioURI alluxioPath, AlluxioURI ufsPath) throws IOException, AlluxioException
mount(AlluxioURI, AlluxioURI, MountOptions)
with default
options.alluxioPath
- an Alluxio path to mount the data toufsPath
- a UFS path to mount the data fromIOException
AlluxioException
void mount(AlluxioURI alluxioPath, AlluxioURI ufsPath, MountOptions options) throws IOException, 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 operationIOException
AlluxioException
Map<String,MountPointInfo> getMountTable() throws IOException, AlluxioException
MountPointInfo
IOException
AlluxioException
FileInStream openFile(AlluxioURI path) throws FileDoesNotExistException, IOException, AlluxioException
openFile(AlluxioURI, OpenFileOptions)
with default options.path
- the file to read fromFileInStream
for the given pathFileDoesNotExistException
- if the given file does not existIOException
AlluxioException
FileInStream openFile(AlluxioURI path, OpenFileOptions options) throws FileDoesNotExistException, IOException, AlluxioException
path
- the file to read fromoptions
- options to associate with this operationFileInStream
for the given pathFileDoesNotExistException
- if the given file does not existIOException
AlluxioException
void rename(AlluxioURI src, AlluxioURI dst) throws FileDoesNotExistException, IOException, AlluxioException
rename(AlluxioURI, AlluxioURI, RenameOptions)
with default
options.src
- the path of the source, this must already existdst
- the path of the destination, this path should not existFileDoesNotExistException
- if the given file does not existIOException
AlluxioException
void rename(AlluxioURI src, AlluxioURI dst, RenameOptions options) throws FileDoesNotExistException, IOException, 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 operationFileDoesNotExistException
- if the given file does not existIOException
AlluxioException
void setAttribute(AlluxioURI path) throws FileDoesNotExistException, IOException, AlluxioException
setAttribute(AlluxioURI, SetAttributeOptions)
with default
options.path
- the path to set attributes forFileDoesNotExistException
- if the given file does not existIOException
AlluxioException
void setAttribute(AlluxioURI path, SetAttributeOptions options) throws FileDoesNotExistException, IOException, AlluxioException
path
- the path to set attributes foroptions
- options to associate with this operationFileDoesNotExistException
- if the given file does not existIOException
AlluxioException
void unmount(AlluxioURI path) throws IOException, AlluxioException
unmount(AlluxioURI, UnmountOptions)
with default options.path
- an Alluxio path, this must be a mount pointIOException
AlluxioException
void unmount(AlluxioURI path, UnmountOptions options) throws IOException, AlluxioException
path
- an Alluxio path, this must be a mount pointoptions
- options to associate with this operationIOException
AlluxioException
Copyright © 2023. All Rights Reserved.