spark学习笔记—核心算子(一)_utils.nonnegativemod-CSDN博客

网站介绍:文章浏览阅读222次。spark学习笔记—核心算子(一)HashPartitioner的决定分区的逻辑核心方法 def getPartition(key: Any): Int = key match { case null => 0 case _ => Utils.nonNegativeMod(key.hashCode, numPartitions) } /* Calculates 'x' modulo 'mod', takes to consideration sign of x,_utils.nonnegativemod