@ThreadSafe public class MetadataCachingBaseFileSystem extends BaseFileSystem
FileSystem.Factory
mBlockStore, mClosed, mFsContext
Constructor and Description |
---|
MetadataCachingBaseFileSystem(FileSystemContext context) |
Modifier and Type | Method and Description |
---|---|
void |
asyncUpdateFileAccessTime(AlluxioURI path)
Asynchronously update file's last access time.
|
void |
close()
Shuts down the FileSystem.
|
URIStatus |
getStatus(AlluxioURI path,
GetStatusPOptions options)
Gets the
URIStatus object that represents the metadata of an Alluxio path. |
void |
iterateStatus(AlluxioURI path,
ListStatusPOptions options,
java.util.function.Consumer<? super URIStatus> action)
Performs a specific action on each
URIStatus in the result of FileSystem.listStatus(alluxio.AlluxioURI) . |
List<URIStatus> |
listStatus(AlluxioURI path,
ListStatusPOptions options)
If the path is a directory, returns the
URIStatus of all the direct entries in it. |
checkAccess, checkUri, createDirectory, createFile, delete, exists, free, getBlockLocations, getConf, getMountTable, getSyncPathList, isClosed, loadMetadata, mount, openFile, openFile, persist, rename, reverseResolve, setAcl, setAttribute, startSync, stopSync, unmount, updateMount
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createDirectory, createFile, delete, exists, free, getStatus, iterateStatus, listStatus, loadMetadata, mount, openFile, persist, rename, setAcl, setAttribute, unmount
public MetadataCachingBaseFileSystem(FileSystemContext context)
context
- the fs contextpublic URIStatus getStatus(AlluxioURI path, GetStatusPOptions options) throws FileDoesNotExistException, IOException, AlluxioException
FileSystem
URIStatus
object that represents the metadata of an Alluxio path.getStatus
in interface FileSystem
getStatus
in class BaseFileSystem
path
- the path to obtain information aboutoptions
- options to associate with this operationURIStatus
of the fileFileDoesNotExistException
- if the path does not existIOException
AlluxioException
public void iterateStatus(AlluxioURI path, ListStatusPOptions options, java.util.function.Consumer<? super URIStatus> action) throws FileDoesNotExistException, IOException, AlluxioException
FileSystem
URIStatus
in the result of FileSystem.listStatus(alluxio.AlluxioURI)
.
This method is preferred when iterating over directories with a large number of files or
sub-directories inside. The caller can proceed with partial result without waiting for all
result returned.iterateStatus
in interface FileSystem
iterateStatus
in class BaseFileSystem
path
- the path to list information aboutoptions
- options to associate with this operationaction
- action to apply on each URIStatus
FileDoesNotExistException
- if the given path does not existIOException
AlluxioException
public List<URIStatus> listStatus(AlluxioURI path, ListStatusPOptions options) throws FileDoesNotExistException, IOException, AlluxioException
FileSystem
URIStatus
of all the direct entries in it.
Otherwise returns a list with a single URIStatus
element for the file.listStatus
in interface FileSystem
listStatus
in class BaseFileSystem
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
public void asyncUpdateFileAccessTime(AlluxioURI path)
path
- the path to the filepublic void close() throws IOException
BaseFileSystem
close
in interface Closeable
close
in interface AutoCloseable
close
in class BaseFileSystem
IOException
Copyright © 2023. All Rights Reserved.