@PublicApi public class TachyonFileSystem extends AbstractTachyonFileSystem
AbstractTachyonFileSystem
. The create API for creating files
is not supported by this TachyonFileSystem because the files should only be written once, thus
getOutStream is sufficient for creating and writing to a file.Modifier and Type | Class and Description |
---|---|
static class |
TachyonFileSystem.TachyonFileSystemFactory |
mContext
Modifier | Constructor and Description |
---|---|
protected |
TachyonFileSystem() |
create, delete, free, getInfo, listStatus, loadMetadata, mkdir, mount, open, openIfExists, rename, setState, unmount
public TachyonFile create(TachyonURI path) throws IOException, TachyonException, FileAlreadyExistsException, InvalidPathException
AbstractTachyonFileSystem.create(TachyonURI, CreateOptions)
with default options.public void delete(TachyonFile file) throws IOException, TachyonException, FileDoesNotExistException
AbstractTachyonFileSystem.delete(TachyonFile, DeleteOptions)
with default options.public void free(TachyonFile file) throws IOException, TachyonException, FileDoesNotExistException
AbstractTachyonFileSystem.free(TachyonFile, FreeOptions)
with default options.public FileInfo getInfo(TachyonFile file) throws FileDoesNotExistException, IOException, TachyonException
TachyonFileSystemCore.getInfo(TachyonFile, GetInfoOptions)
with
default options.public FileInStream getInStream(TachyonFile file) throws IOException, TachyonException, FileDoesNotExistException
getInStream(TachyonFile, InStreamOptions)
with default options.public FileInStream getInStream(TachyonFile file, InStreamOptions options) throws IOException, TachyonException, FileDoesNotExistException
FileInStream
for the specified file. The stream's settings can be customized by
setting the options parameter. The caller should close the stream after finishing the
operations on it.file
- the handler for the file to readoptions
- the set of options specific to this operationIOException
- if a non-Tachyon exception occursTachyonException
- if an unexpected Tachyon exception is thrownFileDoesNotExistException
- if the given file does not existpublic FileOutStream getOutStream(TachyonURI path) throws IOException, TachyonException, FileAlreadyExistsException, InvalidPathException
getOutStream(TachyonURI, OutStreamOptions)
with default
options.public FileOutStream getOutStream(TachyonURI path, OutStreamOptions options) throws IOException, TachyonException, FileAlreadyExistsException, InvalidPathException
FileOutStream
for the specified file. If the parent
directories do not exist, they will be created. This should only be called to write a file that
does not exist. Once close is called on the output stream, the file will be completed. Append
or update of a completed file is currently not supported.path
- the Tachyon path of the fileoptions
- the set of options specific to this operationIOException
- if a non-Tachyon exception occursTachyonException
- if an unexpected Tachyon exception is thrownFileAlreadyExistsException
- if there is already a file at the given pathInvalidPathException
- if the path is invalid@Deprecated public FileOutStream getOutStream(long fileId, OutStreamOptions options) throws IOException
IOException
getOutStream(TachyonURI path, OutStreamOptions options)
public List<FileInfo> listStatus(TachyonFile file) throws IOException, TachyonException, FileDoesNotExistException
AbstractTachyonFileSystem.listStatus(TachyonFile, ListStatusOptions)
with default
options.public TachyonFile loadMetadata(TachyonURI path) throws IOException, TachyonException, FileDoesNotExistException
AbstractTachyonFileSystem.loadMetadata(TachyonURI, LoadMetadataOptions)
with default
options.public boolean mkdir(TachyonURI path) throws IOException, TachyonException, FileAlreadyExistsException, InvalidPathException
AbstractTachyonFileSystem.mkdir(TachyonURI, MkdirOptions)
with default options.public boolean mount(TachyonURI tachyonPath, TachyonURI ufsPath) throws IOException, TachyonException
AbstractTachyonFileSystem.mount(TachyonURI, TachyonURI, MountOptions)
with default
options.IOException
TachyonException
public TachyonFile open(TachyonURI path) throws IOException, InvalidPathException, TachyonException
AbstractTachyonFileSystem.open(TachyonURI, OpenOptions)
with default options.public TachyonFile openIfExists(TachyonURI path) throws IOException, TachyonException
AbstractTachyonFileSystem.openIfExists(TachyonURI, OpenOptions)
with default options.IOException
TachyonException
public boolean rename(TachyonFile src, TachyonURI dst) throws IOException, TachyonException, FileDoesNotExistException
AbstractTachyonFileSystem.rename(TachyonFile, TachyonURI, RenameOptions)
with default
options.public void setState(TachyonFile file) throws IOException, TachyonException
AbstractTachyonFileSystem.setState(TachyonFile, SetStateOptions)
with default options.IOException
TachyonException
public boolean unmount(TachyonURI tachyonPath) throws IOException, TachyonException
AbstractTachyonFileSystem.unmount(TachyonURI, UnmountOptions)
with default options.IOException
TachyonException
public void reportLostFile(TachyonFile file) throws IOException, FileDoesNotExistException, TachyonException
Copyright © 2015. All Rights Reserved.