pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Vermeersch (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PIG-3953) Ordering on date doesn't work
Date Wed, 21 May 2014 06:35:38 GMT

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

Ben Vermeersch commented on PIG-3953:
-------------------------------------

Was thinking that as well. When I run the same script in PigUnit it runs without a problem.
Is there a way I can check the classpath when running Pig?

> Ordering on date doesn't work
> -----------------------------
>
>                 Key: PIG-3953
>                 URL: https://issues.apache.org/jira/browse/PIG-3953
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.12.0
>            Reporter: Ben Vermeersch
>             Fix For: 0.12.1
>
>
> I get the following error when trying to order by datetime datatype:
> java.lang.Exception: java.lang.NoSuchMethodError: org.joda.time.DateTime.compareTo(Lorg/joda/time/ReadableInstant;)I
> 	at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:403)
> Caused by: java.lang.NoSuchMethodError: org.joda.time.DateTime.compareTo(Lorg/joda/time/ReadableInstant;)I
> 	at org.apache.pig.backend.hadoop.DateTimeWritable$Comparator.compare(DateTimeWritable.java:105)
> 	at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigDateTimeRawComparator.compare(PigDateTimeRawComparator.java:82)
> 	at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.compare(MapTask.java:1248)
> 	at org.apache.hadoop.util.QuickSort.sortInternal(QuickSort.java:74)
> 	at org.apache.hadoop.util.QuickSort.sort(QuickSort.java:63)
> 	at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.sortAndSpill(MapTask.java:1582)
> 	at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.flush(MapTask.java:1467)
> 	at org.apache.hadoop.mapred.MapTask$NewOutputCollector.close(MapTask.java:699)
> 	at org.apache.hadoop.mapred.MapTask.closeQuietly(MapTask.java:1997)
> 	at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:773)
> 	at org.apache.hadoop.mapred.MapTask.run(MapTask.java:339)
> 	at org.apache.hadoop.mapred.LocalJobRunner$Job$MapTaskRunnable.run(LocalJobRunner.java:235)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> 	at java.lang.Thread.run(Thread.java:745)
> Can be reproduced using the following dates.txt:
>  
> {quote}
> 12-01-2013
> 13-04-2014
> 12-01-2013
> 01-01-2012
> 02-12-2011
> {quote}
> And the following script:
> {quote}
> records = LOAD 'dates.txt' as (date:chararray);
> dates = foreach records generate ToDate(date, 'dd-MM-yyyy');
> orderedDates = order dates by $0;
> DUMP orderedDates;
> {quote}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message