public Void replicate() throws IOException {
    // Copy all the hfiles to the local file system
    Map<String, Path> tableStagingDirsMap = copyHFilesToStagingDir();

    int maxRetries = conf.getInt(HConstants.BULKLOAD_MAX_RETRIES_NUMBER, 10);

    for (Entry<String, Path> tableStagingDir : tableStagingDirsMap.entrySet()) {
      String tableNameString = tableStagingDir.getKey();
      Path stagingDir = tableStagingDir.getValue();
      TableName tableName = TableName.valueOf(tableNameString);

      // Prepare collection of queue of hfiles to be loaded(replicated)
      Deque<LoadQueueItem> queue = new LinkedList<>();
      BulkLoadHFilesTool.prepareHFileQueue(conf, connection, tableName, stagingDir, queue, false,
        false);

      if (queue.isEmpty()) {
        LOG.warn("Did not find any files to replicate in directory {}", stagingDir.toUri());
        return null;
      }
      fsDelegationToken.acquireDelegationToken(sinkFs);
      try {
        doBulkLoad(conf, tableName, stagingDir, queue, maxRetries);
      } finally {
        cleanup(stagingDir);
      }
    }
    return null;
  }
Number of hfiles to copy per thread during replication
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HFileReplicator.java