code: @Override
    public Map<WorkerInfo, ArrayList<MigrateCommand>> selectExecutors(MigrateConfig config,
        List<WorkerInfo> jobWorkerInfoList, SelectExecutorsContext context) throws Exception {
      AlluxioURI source = new AlluxioURI(config.getSource());
      AlluxioURI destination = new AlluxioURI(config.getDestination());
      if (source.equals(destination)) {
        return new HashMap<>();
      }
      checkMigrateValid(config, context.getFileSystem());
      Preconditions.checkState(!jobWorkerInfoList.isEmpty(), "No workers are available");
  
      List<URIStatus> allPathStatuses = getPathStatuses(source, context.getFileSystem());
      ConcurrentMap<WorkerInfo, ArrayList<MigrateCommand>> assignments = Maps.newConcurrentMap();
      ConcurrentMap<String, WorkerInfo> hostnameToWorker = Maps.newConcurrentMap();
      for (WorkerInfo workerInfo : jobWorkerInfoList) {
        hostnameToWorker.put(workerInfo.getAddress().getHost(), workerInfo);
      }
      List<BlockWorkerInfo> alluxioWorkerInfoList =
          AlluxioBlockStore.create(context.getFsContext()).getAllWorkers();
      // Assign each file to the worker with the most block locality.
      for (URIStatus status : allPathStatuses) {
        if (status.isFolder()) {
          migrateDirectory(status.getPath(), source.getPath(), destination.getPath(),
              context.getFileSystem());
        } else {
          WorkerInfo bestJobWorker =
              getBestJobWorker(status, alluxioWorkerInfoList, jobWorkerInfoList, hostnameToWorker);
          String destinationPath =
              computeTargetPath(status.getPath(), source.getPath(), destination.getPath());
          assignments.putIfAbsent(bestJobWorker, Lists.newArrayList());
          assignments.get(bestJobWorker).add(new MigrateCommand(status.getPath(), destinationPath));
        }
      }
      return assignments;
    }
docs: {@inheritDoc}
  
  Assigns each worker to migrate whichever files it has the most blocks for.
  If no worker has blocks for a file, a random worker is chosen.