[
https://issues.apache.org/jira/browse/OOZIE-1612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13825800#comment-13825800
]
Robert Kanter commented on OOZIE-1612:
--------------------------------------
We were recently investigating an issue a user ran into during the DST switch,
and saw a log message like this:
{noformat}
ActionInputCheck:: nominal Time is newer than current time, so requeue and
wait. Current=Sun Nov 03 00:59:03 PDT 2013, nominal=Sun Nov 03 01:00:00 PST 2013
{noformat}
Notice that the first date is in PDT and the second is PST. Having it reported
in two timezones makes it harder to work out what happened; plus, in this case,
its very easy to not notice that they are different.
The bigger picture to this issue is that we should be writing dates in log
messages in the {{oozie.processing.timezone}}.
The specific offending log message comes from {{CoordActionInputCheckXCommand}}:
{code:java}
Date nominalTime = coordAction.getNominalTime();
Date currentTime = new Date();
if (nominalTime.compareTo(currentTime) > 0) {
queue(new CoordActionInputCheckXCommand(coordAction.getId(),
coordAction.getJobId()), Math.max((nominalTime.getTime() - currentTime
.getTime()), getCoordInputCheckRequeueInterval()));
updateCoordAction(coordAction, false);
LOG.info("[" + actionId
+ "]::ActionInputCheck:: nominal Time is newer than current
time, so requeue and wait. Current="
+ currentTime + ", nominal=" + nominalTime);
return null;
}
{code}
Now that I think about it more, if there's only a few places that we print out
dates, then it would be more efficient to convert the dates in those specific
places instead of having {{XLog.format}} check for Date objects every time.
> When printing Dates to log messages, we should make sure they are in
> oozie.processing.timezone
> ----------------------------------------------------------------------------------------------
>
> Key: OOZIE-1612
> URL: https://issues.apache.org/jira/browse/OOZIE-1612
> Project: Oozie
> Issue Type: Improvement
> Affects Versions: trunk
> Reporter: Robert Kanter
> Priority: Minor
> Labels: newbie
> Attachments: OOZIE-1612.1.patch, OOZIE-1612.patch
>
>
> We were recently looking into an issue and noticed that the same log message
> had printed different date objects with different timezones, which makes it
> hard to compare the two. Which leads to the bigger picture, which is that we
> should be printing any Date objects in log messages with the
> {{oozie.processing.timezone}} timezone (there's a method for that in
> {{DateUtils}}).
--
This message was sent by Atlassian JIRA
(v6.1#6144)