You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Aniket Bhatnagar <an...@gmail.com> on 2014/12/16 15:38:12 UTC

Streaming | Partition count mismatch exception while saving data in RDD

I am using spark 1.1.0 running a streaming job that uses updateStateByKey
and then (after a bunch of maps/flatMaps) does a foreachRDD to save data in
each RDD by making HTTP calls. The issue is that each time I attempt to
save the RDD (using foreach on RDD), it gives me the following exception:

org.apache.spark.SparkException: Checkpoint RDD CheckpointRDD[467] at apply
at List.scala:318(0) has different number of partitions than original RDD
MapPartitionsRDD[461] at mapPartitions at StateDStream.scala:71(56)

I read through the code but couldn't understand why this exception is
happening. Any help would be appreciated!

Thanks,
Aniket

Re: Streaming | Partition count mismatch exception while saving data in RDD

Posted by Aniket Bhatnagar <an...@gmail.com>.
It turns out that this happens when checkpoint is set to a local directory
path. I have opened a JIRA SPARK-4862 for Spark streaming to output better
error message.

Thanks,
Aniket

On Tue Dec 16 2014 at 20:08:13 Aniket Bhatnagar <an...@gmail.com>
wrote:

> I am using spark 1.1.0 running a streaming job that uses updateStateByKey
> and then (after a bunch of maps/flatMaps) does a foreachRDD to save data in
> each RDD by making HTTP calls. The issue is that each time I attempt to
> save the RDD (using foreach on RDD), it gives me the following exception:
>
> org.apache.spark.SparkException: Checkpoint RDD CheckpointRDD[467] at
> apply at List.scala:318(0) has different number of partitions than original
> RDD MapPartitionsRDD[461] at mapPartitions at StateDStream.scala:71(56)
>
> I read through the code but couldn't understand why this exception is
> happening. Any help would be appreciated!
>
> Thanks,
> Aniket
>