@ThreadSafe public final class AlluxioFuseFileSystem extends ru.serce.jnrfuse.FuseStubFS implements FuseUmountable
| Modifier and Type | Field and Description |
|---|---|
static long |
ID_NOT_SET_VALUE
4294967295 is unsigned long -1, -1 means that uid or gid is not set.
|
static long |
ID_NOT_SET_VALUE_UNSIGNED |
static int |
MAX_NAME_LENGTH
Most FileSystems on linux limit the length of file name beyond 255 characters.
|
static int |
UNKNOWN_INODES
df command will treat -1 as an unknown value.
|
| Constructor and Description |
|---|
AlluxioFuseFileSystem(FileSystem fs,
FuseMountOptions opts,
AlluxioConfiguration conf)
Creates a new instance of
AlluxioFuseFileSystem. |
| Modifier and Type | Method and Description |
|---|---|
int |
chmod(java.lang.String path,
long mode)
Changes the mode of an Alluxio file.
|
int |
chown(java.lang.String path,
long uid,
long gid)
Changes the user and group ownership of an Alluxio file.
|
int |
create(java.lang.String path,
long mode,
ru.serce.jnrfuse.struct.FuseFileInfo fi)
Creates and opens a new file.
|
int |
flush(java.lang.String path,
ru.serce.jnrfuse.struct.FuseFileInfo fi)
Flushes cached data on Alluxio.
|
int |
getattr(java.lang.String path,
ru.serce.jnrfuse.struct.FileStat stat)
Retrieves file attributes.
|
java.lang.String |
getFSName() |
int |
mkdir(java.lang.String path,
long mode)
Creates a new dir.
|
void |
mount(java.nio.file.Path mountPoint,
boolean blocking,
boolean debug,
java.lang.String[] fuseOpts) |
int |
open(java.lang.String path,
ru.serce.jnrfuse.struct.FuseFileInfo fi)
Opens an existing file for reading.
|
int |
read(java.lang.String path,
jnr.ffi.Pointer buf,
long size,
long offset,
ru.serce.jnrfuse.struct.FuseFileInfo fi)
Reads data from an open file.
|
int |
readdir(java.lang.String path,
jnr.ffi.Pointer buff,
ru.serce.jnrfuse.FuseFillDir filter,
long offset,
ru.serce.jnrfuse.struct.FuseFileInfo fi)
Reads the contents of a directory.
|
int |
release(java.lang.String path,
ru.serce.jnrfuse.struct.FuseFileInfo fi)
Releases the resources associated to an open file.
|
int |
rename(java.lang.String oldPath,
java.lang.String newPath)
Renames a path.
|
int |
rmdir(java.lang.String path)
Deletes an empty directory.
|
int |
statfs(java.lang.String path,
ru.serce.jnrfuse.struct.Statvfs stbuf)
Gets the filesystem statistics.
|
int |
truncate(java.lang.String path,
long size)
Changes the size of a file.
|
void |
umount(boolean force)
Unmounts the Fuse application.
|
int |
unlink(java.lang.String path)
Deletes a file from the FS.
|
int |
utimens(java.lang.String path,
ru.serce.jnrfuse.struct.Timespec[] timespec)
Alluxio does not have access time, and the file is created only once.
|
int |
write(java.lang.String path,
jnr.ffi.Pointer buf,
long size,
long offset,
ru.serce.jnrfuse.struct.FuseFileInfo fi)
Writes a buffer to an open Alluxio file.
|
access, bmap, destroy, fallocate, fgetattr, flock, fsync, fsyncdir, ftruncate, getxattr, init, ioctl, link, listxattr, lock, mknod, opendir, poll, read_buf, readlink, releasedir, removexattr, setxattr, symlink, write_bufpublic static final int UNKNOWN_INODES
public static final int MAX_NAME_LENGTH
public static final long ID_NOT_SET_VALUE
public static final long ID_NOT_SET_VALUE_UNSIGNED
public AlluxioFuseFileSystem(FileSystem fs, FuseMountOptions opts, AlluxioConfiguration conf)
AlluxioFuseFileSystem.fs - Alluxio file systemopts - optionsconf - Alluxio configurationpublic int chmod(java.lang.String path,
long mode)
chmod in interface ru.serce.jnrfuse.FuseFSchmod in class ru.serce.jnrfuse.FuseStubFSpath - the path of the filemode - the mode to change topublic int chown(java.lang.String path,
long uid,
long gid)
chown in interface ru.serce.jnrfuse.FuseFSchown in class ru.serce.jnrfuse.FuseStubFSpath - the path of the fileuid - the uid to change togid - the gid to change topublic int create(java.lang.String path,
long mode,
ru.serce.jnrfuse.struct.FuseFileInfo fi)
create in interface ru.serce.jnrfuse.FuseFScreate in class ru.serce.jnrfuse.FuseStubFSpath - The FS path of the file to openmode - mode flagsfi - FileInfo data struct kept by FUSEpublic int flush(java.lang.String path,
ru.serce.jnrfuse.struct.FuseFileInfo fi)
flush in interface ru.serce.jnrfuse.FuseFSflush in class ru.serce.jnrfuse.FuseStubFSpath - The path on the FS of the file to closefi - FileInfo data struct kept by FUSEpublic int getattr(java.lang.String path,
ru.serce.jnrfuse.struct.FileStat stat)
getattr in interface ru.serce.jnrfuse.FuseFSgetattr in class ru.serce.jnrfuse.FuseStubFSpath - The path on the FS of the filestat - FUSE data structure to fill with file attrspublic java.lang.String getFSName()
getFSName in class ru.serce.jnrfuse.AbstractFuseFSpublic int mkdir(java.lang.String path,
long mode)
mkdir in interface ru.serce.jnrfuse.FuseFSmkdir in class ru.serce.jnrfuse.FuseStubFSpath - the path on the FS of the new dirmode - Dir creation flags (IGNORED)public int open(java.lang.String path,
ru.serce.jnrfuse.struct.FuseFileInfo fi)
open in interface ru.serce.jnrfuse.FuseFSopen in class ru.serce.jnrfuse.FuseStubFSpath - the FS path of the file to openfi - FileInfo data structure kept by FUSEpublic int read(java.lang.String path,
jnr.ffi.Pointer buf,
long size,
long offset,
ru.serce.jnrfuse.struct.FuseFileInfo fi)
read in interface ru.serce.jnrfuse.FuseFSread in class ru.serce.jnrfuse.FuseStubFSpath - the FS path of the file to readbuf - FUSE buffer to fill with data readsize - how many bytes to read. The maximum value that is accepted
on this method is Integer.MAX_VALUE (note that current
FUSE implementation will call this method with a size of
at most 128K).offset - offset of the read operationfi - FileInfo data structure kept by FUSEpublic int readdir(java.lang.String path,
jnr.ffi.Pointer buff,
ru.serce.jnrfuse.FuseFillDir filter,
long offset,
ru.serce.jnrfuse.struct.FuseFileInfo fi)
readdir in interface ru.serce.jnrfuse.FuseFSreaddir in class ru.serce.jnrfuse.FuseStubFSpath - The FS path of the directorybuff - The FUSE buffer to fillfilter - FUSE filteroffset - Ignored in alluxio-fusefi - FileInfo data structure kept by FUSEpublic int release(java.lang.String path,
ru.serce.jnrfuse.struct.FuseFileInfo fi)
release in interface ru.serce.jnrfuse.FuseFSrelease in class ru.serce.jnrfuse.FuseStubFSpath - the FS path of the file to releasefi - FileInfo data structure kept by FUSEpublic int rename(java.lang.String oldPath,
java.lang.String newPath)
rename in interface ru.serce.jnrfuse.FuseFSrename in class ru.serce.jnrfuse.FuseStubFSoldPath - the source path in the FSnewPath - the destination path in the FSpublic int rmdir(java.lang.String path)
rmdir in interface ru.serce.jnrfuse.FuseFSrmdir in class ru.serce.jnrfuse.FuseStubFSpath - The FS path of the directorypublic int statfs(java.lang.String path,
ru.serce.jnrfuse.struct.Statvfs stbuf)
statfs in interface ru.serce.jnrfuse.FuseFSstatfs in class ru.serce.jnrfuse.FuseStubFSpath - The FS path of the directorystbuf - Statistics of a filesystempublic int truncate(java.lang.String path,
long size)
truncate in interface ru.serce.jnrfuse.FuseFStruncate in class ru.serce.jnrfuse.FuseStubFSpublic int unlink(java.lang.String path)
unlink in interface ru.serce.jnrfuse.FuseFSunlink in class ru.serce.jnrfuse.FuseStubFSpath - the FS path of the filepublic int utimens(java.lang.String path,
ru.serce.jnrfuse.struct.Timespec[] timespec)
utimens in interface ru.serce.jnrfuse.FuseFSutimens in class ru.serce.jnrfuse.FuseStubFSpublic int write(java.lang.String path,
jnr.ffi.Pointer buf,
long size,
long offset,
ru.serce.jnrfuse.struct.FuseFileInfo fi)
write in interface ru.serce.jnrfuse.FuseFSwrite in class ru.serce.jnrfuse.FuseStubFSbuf - The buffer with source datasize - How much data to write from the buffer. The maximum accepted size for writes is
Integer.MAX_VALUE. Note that current FUSE implementation will anyway call write
with at most 128K writesoffset - The offset where to write in the file (IGNORED)fi - FileInfo data structure kept by FUSEpublic void mount(java.nio.file.Path mountPoint,
boolean blocking,
boolean debug,
java.lang.String[] fuseOpts)
mount in interface ru.serce.jnrfuse.Mountablemount in class ru.serce.jnrfuse.AbstractFuseFSpublic void umount(boolean force)
FuseUmountableumount in interface FuseUmountableforce - true to throw an exception and treat umount as a no-op
when umount timeouts due to the fuse device is busy.Copyright © 2021. All Rights Reserved.