private void removeUserGlobalHdfsAcl(Table aclTable, String userName,
    UserPermission userPermission) throws IOException {
    if (SnapshotScannerHDFSAclStorage.hasUserGlobalHdfsAcl(aclTable, userName)) {
      // 1. Get namespaces and tables which global user acls are already synced
      Pair<Set<String>, Set<TableName>> namespaceAndTable =
        SnapshotScannerHDFSAclStorage.getUserNamespaceAndTable(aclTable, userName);
      Set<String> skipNamespaces = namespaceAndTable.getFirst();
      Set<TableName> skipTables = namespaceAndTable.getSecond().stream()
        .filter(t -> !skipNamespaces.contains(t.getNamespaceAsString()))
        .collect(Collectors.toSet());
      // 2. Remove user HDFS acls(skip namespaces and tables directories
      // whose acl must be reversed)
      hdfsAclHelper.revokeAcl(userPermission, skipNamespaces, skipTables);
      // 3. Remove global user acl is synced to HDFS in acl table
      SnapshotScannerHDFSAclStorage.deleteUserGlobalHdfsAcl(aclTable, userName);
    }
  }
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