code: @Override
    public SerializableVoid runTask(MigrateConfig config, ArrayList<MigrateCommand> commands,
        RunTaskContext context) throws Exception {
      WriteType writeType = config.getWriteType() == null
          ? ServerConfiguration.getEnum(PropertyKey.USER_FILE_WRITE_TYPE_DEFAULT, WriteType.class)
          : WriteType.valueOf(config.getWriteType());
      for (MigrateCommand command : commands) {
        migrate(command, writeType.toProto(), config.isDeleteSource(),
            context.getFileSystem());
      }
      // Try to delete the source directory if it is empty.
      if (config.isDeleteSource() && !hasFiles(new AlluxioURI(config.getSource()),
          context.getFileSystem())) {
        try {
          LOG.debug("Deleting {}", config.getSource());
          context.getFileSystem().delete(new AlluxioURI(config.getSource()),
              DeletePOptions.newBuilder().setRecursive(true).build());
        } catch (FileDoesNotExistException e) {
          // It's already deleted, possibly by another worker.
        }
      }
      return null;
    }
docs: {@inheritDoc}
  
  Migrates the file specified in the config to the configured path. If the destination path is a
  directory, the file is migrated inside that directory.