private void removeUserNamespaceHdfsAcl(Table aclTable, String userName, String namespace,
    UserPermission userPermission) throws IOException {
    if (SnapshotScannerHDFSAclStorage.hasUserNamespaceHdfsAcl(aclTable, userName, namespace)) {
      if (!SnapshotScannerHDFSAclStorage.hasUserGlobalHdfsAcl(aclTable, userName)) {
        // 1. Get tables whose namespace user acls are already synced
        Set<TableName> skipTables =
          SnapshotScannerHDFSAclStorage.getUserNamespaceAndTable(aclTable, userName).getSecond();
        // 2. Remove user HDFS acls(skip tables directories whose acl must be reversed)
        hdfsAclHelper.revokeAcl(userPermission, new HashSet<>(), skipTables);
      }
      // 3. Remove namespace user acl is synced to HDFS in acl table
      SnapshotScannerHDFSAclStorage.deleteUserNamespaceHdfsAcl(aclTable, userName, namespace);
    }
  }
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