try {
ps.setString(1, jobID);
ps.setString(2, taskType);
rs = ps.executeQuery();
while (rs.next()) {
TaskAttempt t = new TaskAttempt();
t.setFinishTime(TaskAttemptFields.FINISHTIME.getLong(rs));
t.setInputBytes(TaskAttemptFields.INPUTBYTES.getLong(rs));
t.setLocality(TaskAttemptFields.LOCALITY.getString(rs));
t.setMapFinishTime(TaskAttemptFields.MAPFINISHTIME.getLong(rs));
t.setOutputBytes(TaskAttemptFields.OUTPUTBYTES.getLong(rs));
t.setShuffleFinishTime(TaskAttemptFields.SHUFFLEFINISHTIME.getLong(rs));
t.setSortFinishTime(TaskAttemptFields.SORTFINISHTIME.getLong(rs));
t.setStartTime(TaskAttemptFields.STARTTIME.getLong(rs));
t.setStatus(TaskAttemptFields.STATUS.getString(rs));
t.setTaskAttemptId(TaskAttemptFields.TASKATTEMPTID.getString(rs));
t.setTaskType(TaskAttemptFields.TASKTYPE.getString(rs));
taskAttempts.add(t);
}
rs.close();
} catch (SQLException e) {
throw new IOException(e);