public class LaunchUserGroupAuthPolicy extends Object implements AuthPolicy
Modifier and Type | Field and Description |
---|---|
protected FileSystem |
mFileSystem |
protected Optional<FuseFileSystem> |
mFuseFileSystem |
protected AlluxioFuseFileSystemOpts |
mFuseOptions |
Modifier | Constructor and Description |
---|---|
protected |
LaunchUserGroupAuthPolicy(FileSystem fileSystem,
AlluxioFuseFileSystemOpts fuseFsOpts,
Optional<FuseFileSystem> fuseFileSystem) |
Modifier and Type | Method and Description |
---|---|
static LaunchUserGroupAuthPolicy |
create(FileSystem fileSystem,
AlluxioFuseFileSystemOpts fuseFsOpts,
Optional<FuseFileSystem> fuseFileSystem)
Creates a new launch user auth policy.
|
Optional<Long> |
getGid(String group)
Gets the gid based on the auth policy and file group.
|
Optional<Long> |
getUid(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 Optional<FuseFileSystem> mFuseFileSystem
protected final AlluxioFuseFileSystemOpts mFuseOptions
protected LaunchUserGroupAuthPolicy(FileSystem fileSystem, AlluxioFuseFileSystemOpts fuseFsOpts, Optional<FuseFileSystem> fuseFileSystem)
fileSystem
- the Alluxio file systemfuseFsOpts
- the options for AlluxioFuse filesystemfuseFileSystem
- the FuseFileSystempublic static LaunchUserGroupAuthPolicy create(FileSystem fileSystem, AlluxioFuseFileSystemOpts fuseFsOpts, Optional<FuseFileSystem> fuseFileSystem)
fileSystem
- file systemfuseFsOpts
- fuse optionsfuseFileSystem
- fuse file systempublic void init()
AuthPolicy
init
in interface AuthPolicy
public void setUserGroupIfNeeded(AlluxioURI uri)
AuthPolicy
setUserGroupIfNeeded
in interface AuthPolicy
uri
- the path uripublic void setUserGroup(AlluxioURI uri, long uid, long gid)
AuthPolicy
setUserGroup
in interface AuthPolicy
uri
- the path uriuid
- the user id to setgid
- the gid to setpublic Optional<Long> getUid(String owner)
AuthPolicy
getUid
in interface AuthPolicy
owner
- the owner of the filepublic Optional<Long> getGid(String group)
AuthPolicy
getGid
in interface AuthPolicy
group
- the file groupCopyright © 2023. All Rights Reserved.