@ThreadSafe public class AlluxioJniFuseFileSystem extends AbstractFuseFileSystem
Implements the FUSE callbacks defined by jni-fuse.
Modifier and Type | Field and Description |
---|---|
static IndexDefinition<FuseFileEntry<FuseFileStream>,Long> |
ID_INDEX |
protected IndexedSet<FuseFileEntry<FuseFileStream>> |
mFileEntries |
protected com.google.common.cache.LoadingCache<String,AlluxioURI> |
mPathResolverCache |
static IndexDefinition<FuseFileEntry<FuseFileStream>,String> |
PATH_INDEX |
static int |
UNKNOWN_INODES
df command will treat -1 as an unknown value.
|
Constructor and Description |
---|
AlluxioJniFuseFileSystem(FileSystemContext fsContext,
FileSystem fs,
FuseOptions fuseOptions)
Creates a new instance of
AlluxioJniFuseFileSystem . |
Modifier and Type | Method and Description |
---|---|
int |
chmod(String path,
long mode) |
int |
chown(String path,
long uid,
long gid) |
int |
create(String path,
long mode,
FuseFileInfo fi) |
int |
flush(String path,
FuseFileInfo fi) |
protected int |
flushInternal(String path,
long fd) |
int |
getattr(String path,
FileStat stat) |
AuthPolicy |
getAuthPolicy()
Get the file system authority policy.
|
FileSystem |
getFileSystem()
Get the file system on which FuseFileSystem is based.
|
String |
getFileSystemName() |
FuseStreamFactory |
getFuseStreamFactory()
Get the
FuseStreamFactory instance member that is for creating FuseFileStream . |
int |
mkdir(String path,
long mode) |
int |
open(String path,
FuseFileInfo fi) |
int |
read(String path,
ByteBuffer buf,
long size,
long offset,
FuseFileInfo fi) |
int |
readdir(String path,
long buff,
long filter,
long offset,
FuseFileInfo fi) |
int |
release(String path,
FuseFileInfo fi) |
protected int |
releaseInternal(String path,
long fd) |
int |
rename(String oldPath,
String newPath,
int flags) |
int |
rmdir(String path) |
void |
setFuseStreamFactory(FuseStreamFactory fuseStreamFactory)
Set the
FuseStreamFactory instance member that is for creating FuseFileStream . |
int |
statfs(String path,
Statvfs stbuf)
Gets the filesystem statistics.
|
int |
symlink(String linkname,
String path) |
int |
truncate(String path,
long size)
Since files can be written only once, only sequentially,
and never be modified in Alluxio, truncate is not supported internally by Alluxio.
|
void |
umount(boolean force)
Umount the mount point of this Fuse Filesystem.
|
int |
unlink(String path) |
int |
utimens(String path,
long aSec,
long aNsec,
long mSec,
long mNsec) |
int |
write(String path,
ByteBuffer buf,
long size,
long offset,
FuseFileInfo fi) |
protected int |
writeInternal(String path,
ByteBuffer buf,
long size,
long offset,
long fd) |
chmodCallback, chownCallback, createCallback, flushCallback, getattrCallback, getContext, getxattrCallback, listxattrCallback, mkdirCallback, mount, openCallback, readCallback, readdirCallback, releaseCallback, removexattrCallback, renameCallback, renameCallback, rmdirCallback, setxattrCallback, statfsCallback, symlinkCallback, truncateCallback, unlinkCallback, utimensCallback, writeCallback
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
link, opendir, releasedir
protected final com.google.common.cache.LoadingCache<String,AlluxioURI> mPathResolverCache
public static final IndexDefinition<FuseFileEntry<FuseFileStream>,Long> ID_INDEX
public static final IndexDefinition<FuseFileEntry<FuseFileStream>,String> PATH_INDEX
protected final IndexedSet<FuseFileEntry<FuseFileStream>> mFileEntries
public static final int UNKNOWN_INODES
public AlluxioJniFuseFileSystem(FileSystemContext fsContext, FileSystem fs, FuseOptions fuseOptions)
AlluxioJniFuseFileSystem
.fsContext
- the file system contextfs
- Alluxio file systemfuseOptions
- the fuse optionspublic int create(String path, long mode, FuseFileInfo fi)
public int open(String path, FuseFileInfo fi)
public int readdir(String path, long buff, long filter, long offset, FuseFileInfo fi)
public int read(String path, ByteBuffer buf, long size, long offset, FuseFileInfo fi)
public int write(String path, ByteBuffer buf, long size, long offset, FuseFileInfo fi)
protected int writeInternal(String path, ByteBuffer buf, long size, long offset, long fd)
public int flush(String path, FuseFileInfo fi)
protected int flushInternal(String path, long fd)
public int release(String path, FuseFileInfo fi)
protected int releaseInternal(String path, long fd)
public int mkdir(String path, long mode)
public int unlink(String path)
public int rmdir(String path)
public int chmod(String path, long mode)
public int chown(String path, long uid, long gid)
public int truncate(String path, long size)
path
- the file to truncatesize
- the size to truncate topublic int utimens(String path, long aSec, long aNsec, long mSec, long mNsec)
public int statfs(String path, Statvfs stbuf)
path
- The FS path of the directorystbuf
- Statistics of a filesystempublic String getFileSystemName()
public void umount(boolean force)
AbstractFuseFileSystem
umount
in class AbstractFuseFileSystem
force
- whether to do a force umountpublic FuseStreamFactory getFuseStreamFactory()
FuseStreamFactory
instance member that is for creating FuseFileStream
.FuseStreamFactory
instance memberpublic void setFuseStreamFactory(FuseStreamFactory fuseStreamFactory)
FuseStreamFactory
instance member that is for creating FuseFileStream
.fuseStreamFactory
- the FuseStreamFactory
instance
for creating FuseFileStream
public FileSystem getFileSystem()
public AuthPolicy getAuthPolicy()
Copyright © 2023. All Rights Reserved.