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

Harsh J commented on PIG-4115:
------------------------------

Just curious - does this happen when if you use STORE instead of DUMP as well? 
If it does not, then the issue belongs on the OOZIE project.

> Timezone inconsistency in Pig Oozie action fails with 
> "(org.apache.pig.builtin.ToDate2ARGS)[datetime]"
> ------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-4115
>                 URL: https://issues.apache.org/jira/browse/PIG-4115
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.12.0
>            Reporter: Michalis Kongtongk
>            Assignee: Rohini Palaniswamy
>
> Running a Pig Action in Oozie : 
> CentOS
> - mv /etc/localtime /etc/localtime.mv #backup your current tz
> - ln -sf /usr/share/zoneinfo/Europe/Zurich /etc/localtime # set tz to 
> Europe/Zurich
> - create a hdfs://tmp/file.txt in hdfs with content "1"
> In Pig do:
> A = load '/tmp/file.txt' as (a:chararray);
> B = foreach A generate *, ToDate('02/11/1940', 'dd/MM/yyyy') ;
> dump B;
> In Oozie Pig Action, 
> produce the same script in in workflow.xml and execute
> this is where it'll fail.
> {code}
> ...
> ERROR 0: Exception while executing [POUserFunc (Name: 
> POUserFunc(org.apache.pig.builtin.ToDate2ARGS)[datetime] - scope-254 Operator 
> Key: scope-254) children: null at []]: 
> java.lang.IllegalArgumentException: Cannot parse "02/11/1940": Illegal 
> instant due to time zone offset transition (Europe/Zurich) 
> ...
> {code}
> Since Oozie is using Pig as a library, I believe they should behave the same.
> We notice this inconsistency, when the OS is set to
> $ date +%Z # timezone name 
> CEST 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to