@ThreadSafe
public final class AlluxioFuseUtils
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
AlluxioFuseUtils.FuseCallable
An interface representing a callable for FUSE APIs.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
call(org.slf4j.Logger logger,
AlluxioFuseUtils.FuseCallable callable,
java.lang.String methodName,
java.lang.String description,
java.lang.Object... args)
Calls the given
AlluxioFuseUtils.FuseCallable and returns its result. |
static int |
getErrorCode(java.lang.Throwable t)
Gets the corresponding error code of a throwable.
|
static long |
getGid(java.lang.String userName)
Retrieves the primary gid of the given user.
|
static long |
getGidFromGroupName(java.lang.String groupName)
Retrieves the gid of the given group.
|
static java.lang.String |
getGroupName(long gid)
Gets the group name from the group id.
|
static java.lang.String |
getGroupName(java.lang.String userName)
Gets the primary group name from the user name.
|
static long |
getUid(java.lang.String userName)
Retrieves the uid of the given user.
|
static java.lang.String |
getUserName(long uid)
Gets the user name from the user id.
|
static boolean |
isFuseInstalled()
Checks whether fuse is installed in local file system.
|
static boolean |
waitForFileCompleted(FileSystem fileSystem,
AlluxioURI uri)
Waits for the file to complete.
|
public static long getUid(java.lang.String userName)
userName - the user namepublic static long getGid(java.lang.String userName)
userName - the user namepublic static long getGidFromGroupName(java.lang.String groupName)
groupName - the group namepublic static java.lang.String getUserName(long uid)
throws java.io.IOException
uid - user idjava.io.IOExceptionpublic static java.lang.String getGroupName(java.lang.String userName)
throws java.io.IOException
userName - the user namejava.io.IOExceptionpublic static java.lang.String getGroupName(long gid)
throws java.io.IOException
gid - the group idjava.io.IOExceptionpublic static boolean isFuseInstalled()
public static int getErrorCode(java.lang.Throwable t)
t - throwablepublic static boolean waitForFileCompleted(FileSystem fileSystem, AlluxioURI uri)
fileSystem - the file system to get file statusuri - the file path to checkpublic static int call(org.slf4j.Logger logger,
AlluxioFuseUtils.FuseCallable callable,
java.lang.String methodName,
java.lang.String description,
java.lang.Object... args)
AlluxioFuseUtils.FuseCallable and returns its result.logger - the logger to use for this callcallable - the callable to callmethodName - the name of the method, used for metricsdescription - the format string of the description, used for loggingargs - the arguments for the descriptionCopyright © 2021. All Rights Reserved.