@Override
      public void run() {
        try {
          doBulkloadWithoutRetry(dir1);
        } catch (Exception e) {
          LOG.error("bulk load failed .", e);
          t1Exception.set(e);
        }
      }
After a secure bulkload finished , there is a clean-up for FileSystems used in the bulkload.
Sometimes, FileSystems used in the finished bulkload might also be used in other bulkload
calls, or there are other FileSystems created by the same user, they could be closed by a
FileSystem.closeAllForUGI call. So during the clean-up, those FileSystems need to be used later
can not get closed ,or else a race condition occurs. testForRaceCondition tests the case that
two secure bulkload calls from the same UGI go into two different regions and one bulkload
finishes earlier when the other bulkload still needs its FileSystems, checks that both
bulkloads succeed.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestSecureBulkLoadManager.java