File tree Expand file tree Collapse file tree 4 files changed +19
-6
lines changed
java/org/apache/spark/unsafe/sort Expand file tree Collapse file tree 4 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ conf/*.properties
2929conf /* .conf
3030conf /* .xml
3131conf /slaves
32+ core /build /py4j /
3233docs /_site
3334docs /api
3435target /
Original file line number Diff line number Diff line change @@ -30,12 +30,22 @@ public static final class KeyPointerAndPrefix {
3030 * A pointer to a record; see {@link org.apache.spark.unsafe.memory.TaskMemoryManager} for a
3131 * description of how these addresses are encoded.
3232 */
33- long recordPointer ;
33+ public long recordPointer ;
3434
3535 /**
3636 * A key prefix, for use in comparisons.
3737 */
38- long keyPrefix ;
38+ public long keyPrefix ;
39+
40+ @ Override
41+ public int hashCode () {
42+ throw new UnsupportedOperationException ();
43+ }
44+
45+ @ Override
46+ public boolean equals (Object obj ) {
47+ throw new UnsupportedOperationException ();
48+ }
3949 }
4050
4151 public static abstract class RecordComparator {
@@ -115,8 +125,9 @@ public void insertRecord(long objectAddress) {
115125 final long baseOffset = memoryManager .getOffsetInPage (objectAddress );
116126 final long keyPrefix = prefixComputer .computePrefix (baseObject , baseOffset );
117127 sortBuffer [sortBufferInsertPosition ] = objectAddress ;
118- sortBuffer [sortBufferInsertPosition + 1 ] = keyPrefix ;
119- sortBufferInsertPosition += 2 ;
128+ sortBufferInsertPosition ++;
129+ sortBuffer [sortBufferInsertPosition ] = keyPrefix ;
130+ sortBufferInsertPosition ++;
120131 }
121132
122133 public Iterator <KeyPointerAndPrefix > getSortedIterator () {
Original file line number Diff line number Diff line change @@ -313,7 +313,8 @@ object SparkEnv extends Logging {
313313 // Let the user specify short names for shuffle managers
314314 val shortShuffleMgrNames = Map (
315315 " hash" -> " org.apache.spark.shuffle.hash.HashShuffleManager" ,
316- " sort" -> " org.apache.spark.shuffle.sort.SortShuffleManager" )
316+ " sort" -> " org.apache.spark.shuffle.sort.SortShuffleManager" ,
317+ " unsafe" -> " org.apache.spark.shuffle.unsafe.UnsafeShuffleManager" )
317318 val shuffleMgrName = conf.get(" spark.shuffle.manager" , " sort" )
318319 val shuffleMgrClass = shortShuffleMgrNames.getOrElse(shuffleMgrName.toLowerCase, shuffleMgrName)
319320 val shuffleManager = instantiateClass[ShuffleManager ](shuffleMgrClass)
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ import org.apache.spark.storage._
3434import org .apache .spark .util .{MetadataCleaner , MetadataCleanerType , TimeStampedHashMap }
3535import org .apache .spark .util .collection .{PrimitiveKeyOpenHashMap , PrimitiveVector }
3636
37- /** A group of writers for a ShuffleMapTask, one writer per reducer. */
37+ /** A group of writers for ShuffleMapTask, one writer per reducer. */
3838private [spark] trait ShuffleWriterGroup {
3939 val writers : Array [BlockObjectWriter ]
4040
You can’t perform that action at this time.
0 commit comments