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

liyunzhang_intel commented on PIG-4936:
---------------------------------------

[~kexianda]:
{quote}
I'm just curious about what change cause failure. 
is it cause by the change in Partitioner.scala?
git diff v1.6.1 v1.4.1 ./core/src/main/scala/org/apache/spark/Partitioner.scala
{quote}
[BypassMergeSortShuffleWriter|https://github.com/apache/spark/blob/8028a28885dbd90f20e38922240618fc310a0a65/core/src/main/java/org/apache/spark/shuffle/sort/BypassMergeSortShuffleWriter.java]
 is imported after spark 1.4.1 and in spark 1.4.1, the call stack is 
{code}
org.apache.spark.scheduler.ShuffleMapTask#runTask
   ->org.apache.spark.shuffle.sort.SortShuffleManager#getWriter
  ->org.apache.spark.shuffle.sort.SortShuffleWriter#write
{code}
 in spark 1.6.1
{code}
    org.apache.spark.scheduler.ShuffleMapTask#runTask
      ->org.apache.spark.shuffle.sort.SortShuffleManager#getWriter
           ->org.apache.spark.shuffle.sort.BypassMergeSortShuffleWriter#write
                ->org.apache.pig.test.utils.SimpleCustomPartitioner#getPartition
{code}
The difference between these two version is that in 1.6.1 
SortShuffleManager#getWriter returns BypassMergeSortShuffleWriter and 
SimpleCustomPartitioner#getPartition is called in 
sort.BypassMergeSortShuffleWriter#write while  in 1.4.1 
SortShuffleManager#getWriter returns SortShuffleWriter and 
impleCustomPartitioner#getPartition is not called in SortShuffleWriter#write.

> Fix NPE exception in TestCustomPartitioner#testCustomPartitionerParseJoins
> --------------------------------------------------------------------------
>
>                 Key: PIG-4936
>                 URL: https://issues.apache.org/jira/browse/PIG-4936
>             Project: Pig
>          Issue Type: Bug
>            Reporter: liyunzhang_intel
>            Assignee: liyunzhang_intel
>         Attachments: PIG-4936.patch
>
>
> After PIG-4919(upgrade spark to 1.6.1 version), 
> TestCustomPartitioner#TestCustomPartitioner fails.
> {code}
> Testcase: testCustomPartitionerParseJoins took 1.66 sec
>         Caused an ERROR
> Unable to open iterator for alias hash. Backend error : Job aborted due to 
> stage failure: Task 0 in stage 2.0 failed 1 times, most recent failure: Lost 
> task 0.0 in stage 2.0 (TID 3, localhost): java.lang.RuntimeException: 
> java.lang.reflect.InvocationTargetException
>         at 
> org.apache.pig.backend.hadoop.executionengine.spark.MapReducePartitionerWrapper.getPartition(MapReducePartitionerWrapper.java:118)
>         at 
> org.apache.spark.shuffle.sort.BypassMergeSortShuffleWriter.write(BypassMergeSortShuffleWriter.java:151)
>         at 
> org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:73)
>         at 
> org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:41)
>         at org.apache.spark.scheduler.Task.run(Task.scala:89)
>         at 
> org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:214)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:744)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at 
> org.apache.pig.backend.hadoop.executionengine.spark.MapReducePartitionerWrapper.getPartition(MapReducePartitionerWrapper.java:110)
>         ... 8 more 
> Caused by: java.lang.NullPointerException
>         at 
> org.apache.pig.impl.io.PigNullableWritable.hashCode(PigNullableWritable.java:185)
>         at 
> org.apache.pig.test.utils.SimpleCustomPartitioner.getPartition(SimpleCustomPartitioner.java:33)
>         ... 13 more
> {code}



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

Reply via email to