def METHOD_NAME(service, command, data_dir, num_files, file_size):
  """Run the given TestDFSIO command."""
  args = [
      '-' + command, '-nrFiles',
      str(num_files), '-fileSize',
      str(file_size)
  ]
  properties = {'test.build.data': data_dir}
  if not (data_dir.startswith(BaseDpbService.HDFS_FS + ':') or
          data_dir.startswith('/')):
    properties['fs.default.name'] = data_dir
  return service.SubmitJob(
      classname='org.apache.hadoop.fs.TestDFSIO',
      properties=properties,
      job_arguments=args,
      job_type=dpb_service.BaseDpbService.HADOOP_JOB_TYPE)