@ThreadSafe public class LocalUnderFileSystem extends ConsistentUnderFileSystem implements AtomicFileOutputStreamCallback
UnderFileSystem implementation.
This is primarily intended for local unit testing and single machine mode. In principle, it can also be used on a system where a shared file system (e.g. NFS) is mounted at the same path on every node of the system. However, it is generally preferable to use a proper distributed file system for that scenario.
UnderFileSystem.Factory, UnderFileSystem.SpaceTypemUfsConf, mUri| Constructor and Description |
|---|
LocalUnderFileSystem(AlluxioURI uri,
UnderFileSystemConfiguration ufsConf)
Constructs a new
LocalUnderFileSystem. |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup() |
void |
close() |
void |
connectFromMaster(java.lang.String hostname) |
void |
connectFromWorker(java.lang.String hostname) |
java.io.OutputStream |
create(java.lang.String path,
CreateOptions options) |
java.io.OutputStream |
createDirect(java.lang.String path,
CreateOptions options) |
boolean |
deleteDirectory(java.lang.String path,
DeleteOptions options) |
boolean |
deleteFile(java.lang.String path) |
boolean |
exists(java.lang.String path) |
long |
getBlockSizeByte(java.lang.String path) |
UfsDirectoryStatus |
getDirectoryStatus(java.lang.String path) |
java.util.List<java.lang.String> |
getFileLocations(java.lang.String path) |
java.util.List<java.lang.String> |
getFileLocations(java.lang.String path,
FileLocationOptions options) |
UfsFileStatus |
getFileStatus(java.lang.String path) |
long |
getSpace(java.lang.String path,
UnderFileSystem.SpaceType type) |
UfsStatus |
getStatus(java.lang.String path) |
java.lang.String |
getUnderFSType() |
boolean |
isDirectory(java.lang.String path) |
boolean |
isFile(java.lang.String path) |
UfsStatus[] |
listStatus(java.lang.String path) |
boolean |
mkdirs(java.lang.String path,
MkdirsOptions options) |
java.io.InputStream |
open(java.lang.String path,
OpenOptions options) |
boolean |
renameDirectory(java.lang.String src,
java.lang.String dst) |
boolean |
renameFile(java.lang.String src,
java.lang.String dst) |
void |
setMode(java.lang.String path,
short mode) |
void |
setOwner(java.lang.String path,
java.lang.String user,
java.lang.String group) |
boolean |
supportsFlush() |
createNonexistingFile, createNonexistingFile, deleteExistingDirectory, deleteExistingDirectory, deleteExistingFile, getExistingDirectoryStatus, getExistingFileStatus, getExistingStatus, isExistingDirectory, openExistingFile, openExistingFile, renameRenamableDirectory, renameRenamableFilecreate, deleteDirectory, getAclPair, getActiveSyncInfo, getFingerprint, getOperationMode, getPhysicalStores, isObjectStorage, isSeekable, listStatus, mkdirs, open, resolveUri, setAclEntries, startActiveSyncPolling, startSync, stopActiveSyncPolling, stopSync, supportsActiveSync, validatePathclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, createNonexistingFile, createNonexistingFile, deleteDirectory, deleteExistingDirectory, deleteExistingDirectory, deleteExistingFile, getAclPair, getActiveSyncInfo, getExistingDirectoryStatus, getExistingFileStatus, getExistingStatus, getFingerprint, getOperationMode, getPhysicalStores, isExistingDirectory, isObjectStorage, isSeekable, listStatus, mkdirs, open, openExistingFile, openExistingFile, renameRenamableDirectory, renameRenamableFile, resolveUri, setAclEntries, startActiveSyncPolling, startSync, stopActiveSyncPolling, stopSync, supportsActiveSyncpublic LocalUnderFileSystem(AlluxioURI uri, UnderFileSystemConfiguration ufsConf)
LocalUnderFileSystem.uri - the AlluxioURI for this UFSufsConf - UFS configurationpublic java.lang.String getUnderFSType()
getUnderFSType in interface UnderFileSystempublic void cleanup()
throws java.io.IOException
cleanup in interface UnderFileSystemjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic java.io.OutputStream create(java.lang.String path,
CreateOptions options)
throws java.io.IOException
create in interface UnderFileSystemjava.io.IOExceptionpublic java.io.OutputStream createDirect(java.lang.String path,
CreateOptions options)
throws java.io.IOException
createDirect in interface AtomicFileOutputStreamCallbackjava.io.IOExceptionpublic boolean deleteDirectory(java.lang.String path,
DeleteOptions options)
throws java.io.IOException
deleteDirectory in interface UnderFileSystemjava.io.IOExceptionpublic boolean deleteFile(java.lang.String path)
throws java.io.IOException
deleteFile in interface UnderFileSystemjava.io.IOExceptionpublic boolean exists(java.lang.String path)
throws java.io.IOException
exists in interface UnderFileSystemexists in class BaseUnderFileSystemjava.io.IOExceptionpublic long getBlockSizeByte(java.lang.String path)
throws java.io.IOException
getBlockSizeByte in interface UnderFileSystemjava.io.IOExceptionpublic UfsDirectoryStatus getDirectoryStatus(java.lang.String path) throws java.io.IOException
getDirectoryStatus in interface UnderFileSystemjava.io.IOExceptionpublic java.util.List<java.lang.String> getFileLocations(java.lang.String path)
throws java.io.IOException
getFileLocations in interface UnderFileSystemjava.io.IOExceptionpublic java.util.List<java.lang.String> getFileLocations(java.lang.String path,
FileLocationOptions options)
throws java.io.IOException
getFileLocations in interface UnderFileSystemjava.io.IOExceptionpublic UfsFileStatus getFileStatus(java.lang.String path) throws java.io.IOException
getFileStatus in interface UnderFileSystemjava.io.IOExceptionpublic long getSpace(java.lang.String path,
UnderFileSystem.SpaceType type)
throws java.io.IOException
getSpace in interface UnderFileSystemjava.io.IOExceptionpublic UfsStatus getStatus(java.lang.String path) throws java.io.IOException
getStatus in interface UnderFileSystemjava.io.IOExceptionpublic boolean isDirectory(java.lang.String path)
throws java.io.IOException
isDirectory in interface UnderFileSystemjava.io.IOExceptionpublic boolean isFile(java.lang.String path)
throws java.io.IOException
isFile in interface UnderFileSystemjava.io.IOExceptionpublic UfsStatus[] listStatus(java.lang.String path) throws java.io.IOException
listStatus in interface UnderFileSystemjava.io.IOExceptionpublic boolean mkdirs(java.lang.String path,
MkdirsOptions options)
throws java.io.IOException
mkdirs in interface UnderFileSystemjava.io.IOExceptionpublic java.io.InputStream open(java.lang.String path,
OpenOptions options)
throws java.io.IOException
open in interface UnderFileSystemjava.io.IOExceptionpublic boolean renameDirectory(java.lang.String src,
java.lang.String dst)
throws java.io.IOException
renameDirectory in interface UnderFileSystemjava.io.IOExceptionpublic boolean renameFile(java.lang.String src,
java.lang.String dst)
throws java.io.IOException
renameFile in interface UnderFileSystemjava.io.IOExceptionpublic void setOwner(java.lang.String path,
java.lang.String user,
java.lang.String group)
throws java.io.IOException
setOwner in interface UnderFileSystemjava.io.IOExceptionpublic void setMode(java.lang.String path,
short mode)
throws java.io.IOException
setMode in interface UnderFileSystemjava.io.IOExceptionpublic void connectFromMaster(java.lang.String hostname)
throws java.io.IOException
connectFromMaster in interface UnderFileSystemjava.io.IOExceptionpublic void connectFromWorker(java.lang.String hostname)
throws java.io.IOException
connectFromWorker in interface UnderFileSystemjava.io.IOExceptionpublic boolean supportsFlush()
throws java.io.IOException
supportsFlush in interface UnderFileSystemjava.io.IOExceptionCopyright © 2020. All Rights Reserved.