[
https://issues.apache.org/jira/browse/PIG-4115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14092688#comment-14092688
]
Michalis Kongtongk commented on PIG-4115:
-----------------------------------------
{code}
Pig Stack Trace
---------------
ERROR 1066: Unable to open iterator for alias B. Backend error : Exception
while executing [POUserFunc (Name:
POUserFunc(org.apache.pig.builtin.ToDate2ARGS)[datetime] - scope-6 Operator
Key: scope-6) children: null at []]: java.lang.IllegalArgumentException: Cannot
parse "02/11/1940": Illegal instant due to time zone offset transition
(Europe/Zurich)
org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1066: Unable to
open iterator for alias B. Backend error : Exception while executing
[POUserFunc (Name: POUserFunc(org.apache.pig.builtin.ToDate2ARGS)[datetime] -
scope-6 Operator Key: scope-6) children: null at []]:
java.lang.IllegalArgumentException: Cannot parse "02/11/1940": Illegal instant
due to time zone offset transition (Europe/Zurich)
at org.apache.pig.PigServer.openIterator(PigServer.java:870)
at org.apache.pig.tools.grunt.GruntParser.processDump(GruntParser.java:774)
at
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:372)
at
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:198)
at
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:173)
at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:84)
at org.apache.pig.Main.run(Main.java:478)
at org.apache.pig.PigRunner.run(PigRunner.java:49)
at org.apache.oozie.action.hadoop.PigMain.runPigJob(PigMain.java:286)
at org.apache.oozie.action.hadoop.PigMain.run(PigMain.java:226)
at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:38)
at org.apache.oozie.action.hadoop.PigMain.main(PigMain.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:226)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:430)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:342)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:163)
Caused by: org.apache.pig.backend.executionengine.ExecException: ERROR 0:
Exception while executing [POUserFunc (Name:
POUserFunc(org.apache.pig.builtin.ToDate2ARGS)[datetime] - scope-6 Operator
Key: scope-6) children: null at []]: java.lang.IllegalArgumentException: Cannot
parse "02/11/1940": Illegal instant due to time zone offset transition
(Europe/Zurich)
at
org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.getNext(PhysicalOperator.java:338)
at
org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:378)
at
org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNextTuple(POForEach.java:298)
at
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase.runPipeline(PigGenericMapBase.java:282)
at
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase.map(PigGenericMapBase.java:277)
at
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase.map(PigGenericMapBase.java:64)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:145)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:340)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168)
at java.security.AccessController.doPrivileged(Native Method)
... 3 more
Caused by: java.lang.IllegalArgumentException: Cannot parse "02/11/1940":
Illegal instant due to time zone offset transition (Europe/Zurich)
at
org.joda.time.format.DateTimeParserBucket.computeMillis(DateTimeParserBucket.java:336)
at
org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:662)
at org.apache.pig.builtin.ToDate2ARGS.exec(ToDate2ARGS.java:45)
at org.apache.pig.builtin.ToDate2ARGS.exec(ToDate2ARGS.java:33)
at
org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POUserFunc.getNext(POUserFunc.java:330)
at
org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POUserFunc.getNextDateTime(POUserFunc.java:422)
at
org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.getNext(PhysicalOperator.java:329)
{code}
> 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 :
> create a file.txt in hdfs with content "1"
> In Pig do:
> A = load '/path/to/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.2#6252)