@InterfaceAudience.Public @InterfaceStability.Unstable public abstract class UGIResolver extends Object
Modifier and Type | Field and Description |
---|---|
static int |
GROUP_STRID_OFFSET |
static long |
USER_GROUP_STRID_MASK |
static int |
USER_STRID_OFFSET |
Constructor and Description |
---|
UGIResolver() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addGroup(String name) |
protected void |
addGroup(String name,
int id) |
abstract void |
addUser(String name) |
protected void |
addUser(String name,
int id) |
protected long |
buildPermissionStatus(String owner,
String group,
short permission)
Permission is serialized as a 64-bit long.
|
long |
getPermissionsProto(FileStatus remoteStatus,
AclStatus remoteAcl)
Get the serialized, local permissions for the external
FileStatus or AclStatus . |
protected String |
group(String s) |
FsPermission |
permission(FsPermission s) |
protected void |
resetUGInfo() |
long |
resolve(FileStatus s) |
Map<Integer,String> |
ugiMap() |
protected String |
user(String s) |
public static final int USER_STRID_OFFSET
public static final int GROUP_STRID_OFFSET
public static final long USER_GROUP_STRID_MASK
protected final long buildPermissionStatus(String owner, String group, short permission)
owner
- name of ownergroup
- name of grouppermission
- Permission octectspublic abstract void addUser(String name)
protected void addUser(String name, int id)
public abstract void addGroup(String name)
protected void addGroup(String name, int id)
protected void resetUGInfo()
public long resolve(FileStatus s)
public FsPermission permission(FsPermission s)
public long getPermissionsProto(FileStatus remoteStatus, AclStatus remoteAcl)
FileStatus
or AclStatus
. remoteAcl
is used when it
is not null, otherwise remoteStatus
is used.remoteStatus
- FileStatus on remote store.remoteAcl
- AclStatus on external store.Copyright © 2022 Apache Software Foundation. All rights reserved.