code: private void populateTasks(JobDetails job) throws IOException {
      // TODO: see if we can merge common logic here with
      // populateTasks(List<Flow>)
      Table taskTable = hbaseConnection
          .getTable(TableName.valueOf(Constants.HISTORY_TASK_TABLE));
      Scan scan = getTaskScan(job.getJobKey());
      ResultScanner scanner = taskTable.getScanner(scan);
      try {
        // advance through the scanner til we pass keys matching the job
        for (Result currentResult : scanner) {
          if (currentResult == null || currentResult.isEmpty()) {
            break;
          }
  
          TaskKey taskKey = taskKeyConv.fromBytes(currentResult.getRow());
          TaskDetails task = new TaskDetails(taskKey);
          task.populate(currentResult.getFamilyMap(Constants.INFO_FAM_BYTES));
          job.addTask(task);
        }
        if (LOG.isDebugEnabled()) {
          LOG.debug("Added " + job.getTasks().size() + " tasks to job "
              + job.getJobKey().toString());
        }
      } finally {
        scanner.close();
        taskTable.close();
      }
    }
docs: Populate the task details for a specific job. To populate tasks for
  multiple jobs together, use
  {@link JobHistoryService#populateTasks(java.util.List)}.
  @param job