public abstract class ConsistentUnderFileSystem extends BaseUnderFileSystem
UnderFileSystem.Factory, UnderFileSystem.SpaceType
mUfsConf, mUri
Constructor and Description |
---|
ConsistentUnderFileSystem(AlluxioURI uri,
UnderFileSystemConfiguration ufsConf)
Creates a new
ConsistentUnderFileSystem for the given uri. |
Modifier and Type | Method and Description |
---|---|
OutputStream |
createNonexistingFile(String path)
Creates a file in the under file system with the indicated name.
|
OutputStream |
createNonexistingFile(String path,
CreateOptions options)
Creates a file in the under file system with the specified
CreateOptions . |
boolean |
deleteExistingDirectory(String path)
Deletes a directory from the under file system.
|
boolean |
deleteExistingDirectory(String path,
DeleteOptions options)
Deletes a directory from the under file system with the indicated name.
|
boolean |
deleteExistingFile(String path)
Deletes a file from the under file system with the indicated name.
|
UfsDirectoryStatus |
getExistingDirectoryStatus(String path)
Gets the directory status.
|
UfsFileStatus |
getExistingFileStatus(String path)
Gets the file status.
|
UfsStatus |
getExistingStatus(String path)
Gets the file or directory status.
|
boolean |
isExistingDirectory(String path)
Checks if a directory exists in under file system.
|
InputStream |
openExistingFile(String path)
Opens an
InputStream for a file in under filesystem at the indicated path. |
InputStream |
openExistingFile(String path,
OpenOptions options)
Opens an
InputStream for a file in under filesystem at the indicated path. |
boolean |
renameRenamableDirectory(String src,
String dst)
Renames a directory from
src to dst in under file system. |
boolean |
renameRenamableFile(String src,
String dst)
Renames a file from
src to dst in under file system. |
create, deleteDirectory, exists, getAclPair, getActiveSyncInfo, getFingerprint, getOperationMode, getPhysicalStores, isObjectStorage, isSeekable, listStatus, mkdirs, open, resolveUri, setAclEntries, startActiveSyncPolling, startSync, stopActiveSyncPolling, stopSync, supportsActiveSync, validatePath
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cleanup, connectFromMaster, connectFromWorker, create, deleteDirectory, deleteFile, getBlockSizeByte, getDirectoryStatus, getFileLocations, getFileLocations, getFileStatus, getSpace, getStatus, getUnderFSType, isDirectory, isFile, listStatus, mkdirs, open, renameDirectory, renameFile, setMode, setOwner, supportsFlush
public ConsistentUnderFileSystem(AlluxioURI uri, UnderFileSystemConfiguration ufsConf)
ConsistentUnderFileSystem
for the given uri.uri
- path belonging to this under file systemufsConf
- UFS configurationpublic OutputStream createNonexistingFile(String path) throws IOException
UnderFileSystem
UnderFileSystem.create(String)
but
deals with the delete-then-create eventual consistency issue.path
- the file nameOutputStream
objectIOException
public OutputStream createNonexistingFile(String path, CreateOptions options) throws IOException
UnderFileSystem
CreateOptions
.
Similar to UnderFileSystem.create(String, CreateOptions)
but
deals with the delete-then-create eventual consistency issue.path
- the file nameoptions
- the options for createOutputStream
objectIOException
public boolean deleteExistingDirectory(String path) throws IOException
UnderFileSystem
UnderFileSystem.deleteDirectory(String)
but
deals with the create-delete eventual consistency issue.path
- of the directory to deleteIOException
public boolean deleteExistingDirectory(String path, DeleteOptions options) throws IOException
UnderFileSystem
UnderFileSystem.deleteDirectory(String, DeleteOptions)
but
deals with the create-then-delete eventual consistency issue.path
- of the directory to deleteoptions
- for directory delete semanticsIOException
public boolean deleteExistingFile(String path) throws IOException
UnderFileSystem
UnderFileSystem.deleteFile(String)
but
deals with the create-then-delete eventual consistency issue.path
- of the file to deleteIOException
public UfsDirectoryStatus getExistingDirectoryStatus(String path) throws IOException
UnderFileSystem
UnderFileSystem.getDirectoryStatus(String)
but
deals with the write-then-get-status eventual consistency issue.path
- the path to the directoryIOException
public UfsFileStatus getExistingFileStatus(String path) throws IOException
UnderFileSystem
UnderFileSystem.getFileStatus(String)
but
deals with the write-then-get-status eventual consistency issue.path
- the path to the fileIOException
public UfsStatus getExistingStatus(String path) throws IOException
UnderFileSystem
UnderFileSystem.getStatus(String)
but
deals with the write-then-get-status eventual consistency issue.path
- the path to get the statusIOException
public boolean isExistingDirectory(String path) throws IOException
UnderFileSystem
UnderFileSystem.isDirectory(String)
but
deals with the write-then-list eventual consistency issue.path
- the absolute directory pathIOException
public InputStream openExistingFile(String path) throws IOException
UnderFileSystem
InputStream
for a file in under filesystem at the indicated path.
Similar to #open(fString)
but
deals with the write-then-read eventual consistency issue.path
- the file nameInputStream
objectIOException
public InputStream openExistingFile(String path, OpenOptions options) throws IOException
UnderFileSystem
InputStream
for a file in under filesystem at the indicated path.
Similar to UnderFileSystem.open(String, OpenOptions)
but
deals with the write-then-read eventual consistency issue.path
- the file nameoptions
- to open input streamInputStream
objectIOException
public boolean renameRenamableDirectory(String src, String dst) throws IOException
UnderFileSystem
src
to dst
in under file system.
Similar to UnderFileSystem.renameDirectory(String, String)
but
deals with the write-src-then-rename and delete-dst-then-rename eventual consistency issue.src
- the source directory pathdst
- the destination directory pathIOException
public boolean renameRenamableFile(String src, String dst) throws IOException
UnderFileSystem
src
to dst
in under file system.
Similar to UnderFileSystem.renameFile(String, String)
but
deals with the write-src-then-rename and delete-dst-then-rename eventual consistency issue.src
- the source file pathdst
- the destination file pathIOException
Copyright © 2023. All Rights Reserved.