Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.2.0, 2.7.1
-
None
-
CentOS6.5 Hadoop
Description
I use SimpleDateFormat to Parse the JobHistory File before
private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); public static String getJobDetail(JobInfo job) { StringBuffer jobDetails = new StringBuffer(""); SummarizedJob ts = new SummarizedJob(job); jobDetails.append(job.getJobId().toString().trim()).append("\t"); jobDetails.append(job.getUsername()).append("\t"); jobDetails.append(job.getJobname().replaceAll("\\n", "")).append("\t"); jobDetails.append(job.getJobQueueName()).append("\t"); jobDetails.append(job.getPriority()).append("\t"); jobDetails.append(job.getJobConfPath()).append("\t"); jobDetails.append(job.getUberized()).append("\t"); jobDetails.append(dateFormat.format(job.getSubmitTime())).append("\t"); jobDetails.append(dateFormat.format(job.getLaunchTime())).append("\t"); jobDetails.append(dateFormat.format(job.getFinishTime())).append("\t"); return jobDetails.toString(); }
But I find I query the SubmitTime and LaunchTime in hive and compare JobHistory File time , I find that the submitTime and launchTime was wrong.
Finally,I change to use the FastDateFormat to parse the time format and the time become right
Attachments
Attachments
Issue Links
- relates to
-
MAPREDUCE-6717 Remove deprecated StringUtils.getFormattedTimeWithDiff
- Resolved