You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Robert Kanter (JIRA)" <ji...@apache.org> on 2017/07/13 20:30:02 UTC

[jira] [Commented] (OOZIE-2867) Timezone handling for Coordinators: emphasize "Continent/City" format

    [ https://issues.apache.org/jira/browse/OOZIE-2867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16086344#comment-16086344 ] 

Robert Kanter commented on OOZIE-2867:
--------------------------------------

That was a good idea with the test - better than what I was thinking :)
Here's some more feedback:
# Though given that the returned string is not used, you could have it return something simpler, like a boolean.  In fact, you could refactor {{handleNonDSTFormatTZNames}} to be a little simpler, and move the log message to the caller so the return value has a purpose.  Something like this:
{code:java}
...
if (!handleNonDSTFormatTZNames(tzId)) {
   LOG.warn("GMT, UTC or Region/City Timezone formats are preferred instead of " + tzId);
}
...
{code}
{code:java}
static String handleNonDSTFormatTZNames(String tzId) {
   ...
   Matcher m = THREE_LETTER_ID_PATTERN.matcher(tzId);
   return m.matches() && !tzId.equalsIgnoreCase("UTC") && !tzId.equalsIgnoreCase("GMT");
}
{code}
And then update the unit test to match
# Let's rename {{handleNonDSTFormatTZNames}} to something more straightforward like {{isThreeLetterTZName}}.

> Timezone handling for Coordinators: emphasize "Continent/City" format
> ---------------------------------------------------------------------
>
>                 Key: OOZIE-2867
>                 URL: https://issues.apache.org/jira/browse/OOZIE-2867
>             Project: Oozie
>          Issue Type: Sub-task
>          Components: coordinator
>    Affects Versions: 4.3.0
>            Reporter: Andras Piros
>            Assignee: Artem Ervits
>             Fix For: trunk, 5.0.0
>
>         Attachments: OOZIE-2867-0.patch, OOZIE-2867-1.patch, OOZIE-2867-2.patch, OOZIE-2867-3.patch, OOZIE-2867-4.patch, OOZIE-2867-5.patch, OOZIE-2867-6.patch
>
>
> It seems that some time zone abbreviations like {{BST}} for British Summer Time silently just do not get accepted correctly by Oozie and the underlying JVM.
> It would be great to:
> * emphasize in the Coordinator Functional Specification that it's best to only use time zone format {{Continent/City}}, like {{Europe/London}}, or {{America/Los_Angeles}}, instead of other formats like {{PDT}}, {{PST}}, or {{BST}}
> * if the timezone is not recognized by Oozie, it's best to emit a {{WARN}} log and suppose {{UTC}} instead of silently ignoring the unknown specified timezone



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)