删除原始IP Learning项目包
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package cn.ac.iie.service.partition
|
||||
|
||||
import org.apache.spark.Partitioner
|
||||
|
||||
class CustomPartitioner(numPartition: Int) extends Partitioner{
|
||||
override def numPartitions: Int = numPartition
|
||||
|
||||
override def getPartition(key: Any): Int = {
|
||||
Math.abs(key.hashCode()) % numPartition
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user