HDFS-15234. Add a default method body for the INodeAttributeProvider#checkPermissionWithContext API. (#1909)

This commit is contained in:
Wei-Chiu Chuang 2020-03-25 16:03:26 -07:00 committed by GitHub
parent cdcb77a2c5
commit 0fa7bf47df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -399,8 +399,12 @@ public abstract void checkPermission(String fsOwner, String supergroup,
* operation.
* @throws AccessControlException
*/
void checkPermissionWithContext(AuthorizationContext authzContext)
throws AccessControlException;
default void checkPermissionWithContext(AuthorizationContext authzContext)
throws AccessControlException {
throw new AccessControlException("The authorization provider does not "
+ "implement the checkPermissionWithContext(AuthorizationContext) "
+ "API.");
}
}
/**
* Initialize the provider. This method is called at NameNode startup