code: static void processReport(FSNamesystem namesystem, Collection<Block> toRetry,
        BlockListAsLongs newReport, DatanodeDescriptor node,
        ExecutorService initialBlockReportExecutor) throws IOException {
      // spawn one thread for blocksPerShardBR blocks
      int numShards = Math
          .min(
              namesystem.parallelProcessingThreads,
              ((newReport.getNumberOfBlocks()
                  + namesystem.parallelBRblocksPerShard - 1) / namesystem.parallelBRblocksPerShard));
      List<Future<List<Block>>> workers = new ArrayList<Future<List<Block>>>(
          numShards);
  
      // submit tasks for execution
      for (int i = 0; i < numShards; i++) {
        workers.add(initialBlockReportExecutor.submit(new InitialReportWorker(
            newReport, i, numShards, node, namesystem.getNameNode()
                .shouldRetryAbsentBlocks(), namesystem)));
      }
  
      // get results and add to retry list if need
      try {
        for (Future<List<Block>> worker : workers) {
          if (namesystem.getNameNode().shouldRetryAbsentBlocks()) {
            toRetry.addAll(worker.get());
          } else {
            worker.get();
          }
        }
      } catch (ExecutionException e) {
        LOG.warn("Parallel report failed", e);
        throw new IOException(e);
      } catch (InterruptedException e) {
        throw new IOException("Interruption", e);
      }
    }
docs: Processes a single initial block reports, by spawning multiple threads to
  handle insertion to the blocks map. Each thread stores the inserted blocks
  in a local list, and at the end, the list are concatenated for a single
  datanode descriptor.