@Override
  public Map<LoadQueueItem, ByteBuffer> bulkLoad(TableName tableName, Path dir) throws IOException {
    try (AsyncClusterConnection conn = ClusterConnectionFactory
      .createAsyncClusterConnection(getConf(), null, userProvider.getCurrent())) {
      AsyncAdmin admin = conn.getAdmin();
      if (!FutureUtils.get(admin.tableExists(tableName))) {
        if (isCreateTable()) {
          createTable(tableName, dir, admin);
        } else {
          throwAndLogTableNotFoundException(tableName);
        }
      }
      return doBulkLoad(conn, tableName, dir, isSilence(), isAlwaysCopyFiles());
    }
  }
Perform a bulk load of the given directory into the given pre-existing table. This method is
not threadsafe.
@param tableName table to load the hfiles
@param hfofDir   the directory that was provided as the output path of a job using
                 HFileOutputFormat
@param silence   true to ignore unmatched column families
@param copyFile  always copy hfiles if true
hbase-server/src/main/java/org/apache/hadoop/hbase/tool/BulkLoadHFilesTool.java