Class RouterPermissionChecker
java.lang.Object
org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker
org.apache.hadoop.hdfs.server.federation.router.RouterPermissionChecker
- All Implemented Interfaces:
org.apache.hadoop.hdfs.server.namenode.INodeAttributeProvider.AccessControlEnforcer
public class RouterPermissionChecker
extends org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker
Class that helps in checking permissions in Router-based federation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final shortMount table default permission. -
Constructor Summary
ConstructorsConstructorDescriptionRouterPermissionChecker(String user, String group) RouterPermissionChecker(String user, String group, org.apache.hadoop.security.UserGroupInformation callerUgi) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckPermission(MountTable mountTable, org.apache.hadoop.fs.permission.FsAction access) Whether a mount table entry can be accessed by the current context.voidCheck the superuser privileges of the current RPC caller.Methods inherited from class org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker
checkPermission, checkPermission, checkPermissionWithContext, checkSuperuserPrivilege, denyUserAccess, getAttributesProvider, getUser, isMemberOfGroup, isSuperUser, setOperationTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.hdfs.server.namenode.INodeAttributeProvider.AccessControlEnforcer
checkSuperUserPermissionWithContext, denyUserAccess
-
Field Details
-
MOUNT_TABLE_PERMISSION_DEFAULT
public static final short MOUNT_TABLE_PERMISSION_DEFAULTMount table default permission.- See Also:
-
-
Constructor Details
-
RouterPermissionChecker
-
RouterPermissionChecker
- Throws:
IOException
-
-
Method Details
-
checkPermission
public void checkPermission(MountTable mountTable, org.apache.hadoop.fs.permission.FsAction access) throws org.apache.hadoop.security.AccessControlException Whether a mount table entry can be accessed by the current context.- Parameters:
mountTable- MountTable being accessedaccess- type of action being performed on the mount table entry- Throws:
org.apache.hadoop.security.AccessControlException- if mount table cannot be accessed
-
checkSuperuserPrivilege
public void checkSuperuserPrivilege() throws org.apache.hadoop.security.AccessControlExceptionCheck the superuser privileges of the current RPC caller. This method is based on Datanode#checkSuperuserPrivilege().- Overrides:
checkSuperuserPrivilegein classorg.apache.hadoop.hdfs.server.namenode.FSPermissionChecker- Throws:
org.apache.hadoop.security.AccessControlException- If the user is not authorized.
-