code: private Scan getTaskScan(JobKey jobKey) {
      byte[] startKey =
          Bytes.add(jobKeyConv.toBytes(jobKey), Constants.SEP_BYTES);
      Scan scan = new Scan();
      scan.setStartRow(startKey);
      // only return tasks for this job
      scan.setFilter(new WhileMatchFilter(new PrefixFilter(startKey)));
      // expect a lot of tasks on average
      scan.setCaching(500);
      return scan;
    }
docs: Returns a Scan instance to retrieve all the task rows for a given job from
  the job_history_task table.
  @param jobKey the job key to match for all task rows
  @return a {@code Scan} instance for the job_history_task table