Skip to content

Commit 595923a

Browse files
committed
Remove some unused variables.
1 parent 8958584 commit 595923a

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

core/src/main/java/org/apache/spark/unsafe/sort/UnsafeSorter.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ public static abstract class PrefixComparator {
8282
public abstract int compare(long prefix1, long prefix2);
8383
}
8484

85-
private final TaskMemoryManager memoryManager;
8685
private final Sorter<RecordPointerAndKeyPrefix, long[]> sorter;
8786
private final Comparator<RecordPointerAndKeyPrefix> sortComparator;
8887

@@ -112,7 +111,6 @@ public UnsafeSorter(
112111
int initialSize) {
113112
assert (initialSize > 0);
114113
this.sortBuffer = new long[initialSize * 2];
115-
this.memoryManager = memoryManager;
116114
this.sorter =
117115
new Sorter<RecordPointerAndKeyPrefix, long[]>(UnsafeSortDataFormat.INSTANCE);
118116
this.sortComparator = new Comparator<RecordPointerAndKeyPrefix>() {
@@ -143,8 +141,6 @@ public void insertRecord(long objectAddress, long keyPrefix) {
143141
if (sortBufferInsertPosition + 2 == sortBuffer.length) {
144142
expandSortBuffer(sortBuffer.length * 2);
145143
}
146-
final Object baseObject = memoryManager.getPage(objectAddress);
147-
final long baseOffset = memoryManager.getOffsetInPage(objectAddress);
148144
sortBuffer[sortBufferInsertPosition] = objectAddress;
149145
sortBufferInsertPosition++;
150146
sortBuffer[sortBufferInsertPosition] = keyPrefix;

0 commit comments

Comments
 (0)