@Override
  public void postRevoke(ObserverContext<MasterCoprocessorEnvironment> c,
    UserPermission userPermission) throws IOException {
    if (checkInitialized("revoke " + userPermission)) {
      try (Table aclTable =
        c.getEnvironment().getConnection().getTable(PermissionStorage.ACL_TABLE_NAME)) {
        String userName = userPermission.getUser();
        Configuration conf = c.getEnvironment().getConfiguration();
        switch (userPermission.getAccessScope()) {
          case GLOBAL:
            UserPermission userGlobalPerm = getUserGlobalPermission(conf, userName);
            if (userGlobalPerm == null || !hdfsAclHelper.containReadAction(userGlobalPerm)) {
              removeUserGlobalHdfsAcl(aclTable, userName, userPermission);
            }
            break;
          case NAMESPACE:
            NamespacePermission nsPerm = (NamespacePermission) userPermission.getPermission();
            UserPermission userNsPerm =
              getUserNamespacePermission(conf, userName, nsPerm.getNamespace());
            if (userNsPerm == null || !hdfsAclHelper.containReadAction(userNsPerm)) {
              removeUserNamespaceHdfsAcl(aclTable, userName, nsPerm.getNamespace(), userPermission);
            }
            break;
          case TABLE:
            TablePermission tPerm = (TablePermission) userPermission.getPermission();
            if (needHandleTableHdfsAcl(tPerm)) {
              TableName tableName = tPerm.getTableName();
              UserPermission userTablePerm = getUserTablePermission(conf, userName, tableName);
              if (userTablePerm == null || !hdfsAclHelper.containReadAction(userTablePerm)) {
                removeUserTableHdfsAcl(aclTable, userName, tableName, userPermission);
              }
            }
            break;
          default:
            throw new IllegalArgumentException(
              "Illegal user permission scope " + userPermission.getAccessScope());
        }
      }
    }
  }
Delete namespace tmp directory because it's created by this coprocessor when namespace is
created to make namespace default acl can be inherited by tables. The namespace data
directory is deleted by DeleteNamespaceProcedure, the namespace archive directory is
deleted by HFileCleaner.
hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SnapshotScannerHDFSAclController.java