从Spark-1.2.0开始,Spark的Shuffle由Hash Based Shuffle升级成了Sort Based Shuffle.即Spark.shuffle.manager从Hash换成了Sort.不同形式的Shuffle逻辑主要是ShuffleManager的实现类不同. 在org.apache.spark.SparkEnv类中: // Let the user specify short names for shuffle managers val shortShuffleMgr…