When numPartitions is 0, there is no data in the rdd: so getPartition is
never invoked.

-  Mridul

On Friday, September 16, 2016, WangJianfei <wangjianfe...@otcaix.iscas.ac.cn>
wrote:

> if so, we will get exception when the numPartitions is 0.
>  def getPartition(key: Any): Int = key match {
>     case null => 0
> //    case None => 0
>     case _ => Utils.nonNegativeMod(key.hashCode, numPartitions)
>   }
>
>
>
> --
> View this message in context: http://apache-spark-
> developers-list.1001551.n3.nabble.com/What-s-the-meaning-
> when-the-partitions-is-zero-tp18957p18967.html
> Sent from the Apache Spark Developers List mailing list archive at
> Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe e-mail: dev-unsubscr...@spark.apache.org <javascript:;>
>
>

Reply via email to