public class LaunchUserGroupAuthPolicy extends java.lang.Object implements AuthPolicy
| Modifier and Type | Field and Description |
|---|---|
protected FileSystem |
mFileSystem |
protected java.util.Optional<FuseFileSystem> |
mFuseFileSystem |
| Modifier | Constructor and Description |
|---|---|
protected |
LaunchUserGroupAuthPolicy(FileSystem fileSystem,
java.util.Optional<FuseFileSystem> fuseFileSystem) |
| Modifier and Type | Method and Description |
|---|---|
static LaunchUserGroupAuthPolicy |
create(FileSystem fileSystem,
AlluxioConfiguration conf,
java.util.Optional<FuseFileSystem> fuseFileSystem)
Creates a new launch user auth policy.
|
java.util.Optional<java.lang.Long> |
getGid(java.lang.String group)
Gets the gid based on the auth policy and file group.
|
java.util.Optional<java.lang.Long> |
getUid(java.lang.String owner)
Gets the uid based on the auth policy and file owner.
|
void |
init()
Initialize the authentication policy.
|
void |
setUserGroup(AlluxioURI uri,
long uid,
long gid)
Sets user and group based on user group input.
|
void |
setUserGroupIfNeeded(AlluxioURI uri)
Sets user and group based on authentication policy.
|
protected final FileSystem mFileSystem
protected final java.util.Optional<FuseFileSystem> mFuseFileSystem
protected LaunchUserGroupAuthPolicy(FileSystem fileSystem, java.util.Optional<FuseFileSystem> fuseFileSystem)
fileSystem - the Alluxio file systemfuseFileSystem - the FuseFileSystempublic static LaunchUserGroupAuthPolicy create(FileSystem fileSystem, AlluxioConfiguration conf, java.util.Optional<FuseFileSystem> fuseFileSystem)
fileSystem - file systemconf - the Alluxio configurationfuseFileSystem - fuse file systempublic void init()
AuthPolicyinit in interface AuthPolicypublic void setUserGroupIfNeeded(AlluxioURI uri)
AuthPolicysetUserGroupIfNeeded in interface AuthPolicyuri - the path uripublic void setUserGroup(AlluxioURI uri, long uid, long gid)
AuthPolicysetUserGroup in interface AuthPolicyuri - the path uriuid - the user id to setgid - the gid to setpublic java.util.Optional<java.lang.Long> getUid(java.lang.String owner)
AuthPolicygetUid in interface AuthPolicyowner - the owner of the filepublic java.util.Optional<java.lang.Long> getGid(java.lang.String group)
AuthPolicygetGid in interface AuthPolicygroup - the file groupCopyright © 2023. All Rights Reserved.