File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
core/src/main/java/org/apache/spark/shuffle/unsafe Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -37,25 +37,23 @@ final class PackedRecordPointer {
3737
3838 static final int MAXIMUM_PAGE_SIZE_BYTES = 1 << 27 ; // 128 megabytes
3939
40- static final int MAXIMUM_PARTITION_ID = 1 << 24 ; // 16777216
40+ static final int MAXIMUM_PARTITION_ID = ( 1 << 24 ) - 1 ; // 16777215
4141
4242 /** Bit mask for the lower 40 bits of a long. */
43- private static final long MASK_LONG_LOWER_40_BITS = 0xFFFFFFFFFFL ;
43+ private static final long MASK_LONG_LOWER_40_BITS = ( 1L << 40 ) - 1 ;
4444
4545 /** Bit mask for the upper 24 bits of a long */
4646 private static final long MASK_LONG_UPPER_24_BITS = ~MASK_LONG_LOWER_40_BITS ;
4747
4848 /** Bit mask for the lower 27 bits of a long. */
49- private static final long MASK_LONG_LOWER_27_BITS = 0x7FFFFFFL ;
49+ private static final long MASK_LONG_LOWER_27_BITS = ( 1L << 27 ) - 1 ;
5050
5151 /** Bit mask for the lower 51 bits of a long. */
52- private static final long MASK_LONG_LOWER_51_BITS = 0x7FFFFFFFFFFFFL ;
52+ private static final long MASK_LONG_LOWER_51_BITS = ( 1L << 51 ) - 1 ;
5353
5454 /** Bit mask for the upper 13 bits of a long */
5555 private static final long MASK_LONG_UPPER_13_BITS = ~MASK_LONG_LOWER_51_BITS ;
5656
57- // TODO: this shifting is probably extremely inefficient; this is just for prototyping
58-
5957 /**
6058 * Pack a record address and partition id into a single word.
6159 *
Original file line number Diff line number Diff line change 1717
1818package org .apache .spark .shuffle .unsafe ;
1919
20- import org .apache .spark .storage .TempShuffleBlockId ;
21-
2220import java .io .File ;
2321
22+ import org .apache .spark .storage .TempShuffleBlockId ;
23+
2424/**
2525 * Metadata for a block of data written by {@link UnsafeShuffleExternalSorter}.
2626 */
You can’t perform that action at this time.
0 commit comments