@ThreadSafe public final class AlluxioFuseUtils extends Object
Modifier and Type | Method and Description |
---|---|
static int |
getErrorCode(Throwable t)
Gets the corresponding error code of a throwable.
|
static long |
getGid(String userName)
Retrieves the primary gid of the given user.
|
static long |
getGidFromGroupName(String groupName)
Retrieves the gid of the given group.
|
static String |
getGroupName(long gid)
Gets the group name from the group id.
|
static String |
getGroupName(String userName)
Gets the primary group name from the user name.
|
static long |
getUid(String userName)
Retrieves the uid of the given user.
|
static String |
getUserName(long uid)
Gets the user name from the user id.
|
static boolean |
isFuseInstalled()
Checks whether fuse is installed in local file system.
|
public static long getUid(String userName)
userName
- the user namepublic static long getGid(String userName)
userName
- the user namepublic static long getGidFromGroupName(String groupName) throws IOException
groupName
- the group nameIOException
public static String getUserName(long uid) throws IOException
uid
- user idIOException
public static String getGroupName(String userName) throws IOException
userName
- the user nameIOException
public static String getGroupName(long gid) throws IOException
gid
- the group idIOException
public static boolean isFuseInstalled()
public static int getErrorCode(Throwable t)
t
- throwableCopyright © 2023. All Rights Reserved.