final class UnsafeKVExternalSorter extends AnyRef
A class for performing external sorting on key-value records. Both key and value are UnsafeRows.
Note that this class allows optionally passing in a BytesToBytesMap directly in order
to perform in-place sorting of records in the map.
- Alphabetic
- By Inheritance
- UnsafeKVExternalSorter
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new UnsafeKVExternalSorter(keySchema: StructType, valueSchema: StructType, blockManager: BlockManager, serializerManager: SerializerManager, pageSizeBytes: Long, numElementsForSpillThreshold: Int, map: BytesToBytesMap)
- new UnsafeKVExternalSorter(keySchema: StructType, valueSchema: StructType, blockManager: BlockManager, serializerManager: SerializerManager, pageSizeBytes: Long, numElementsForSpillThreshold: Int)
Type Members
- class KVSorterIterator extends KVIterator[UnsafeRow, UnsafeRow]
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
cleanupResources(): Unit
Frees this sorter's in-memory data structures and cleans up its spill files.
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
getPeakMemoryUsedBytes(): Long
Return the peak memory used so far, in bytes.
-
def
getSpillSize(): Long
Return the total number of bytes that has been spilled into disk so far.
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
insertKV(key: UnsafeRow, value: UnsafeRow): Unit
Inserts a key-value record into the sorter.
Inserts a key-value record into the sorter. If the sorter no longer has enough memory to hold the record, the sorter sorts the existing records in-memory, writes them out as partially sorted runs, and then reallocates memory to hold the new record.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
merge(other: UnsafeKVExternalSorter): Unit
Merges another UnsafeKVExternalSorter into
this, the other one will be emptied.Merges another UnsafeKVExternalSorter into
this, the other one will be emptied.- Exceptions thrown
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
sortedIterator(): KVSorterIterator
Returns a sorted iterator.
Returns a sorted iterator. It is the caller's responsibility to call
cleanupResources()after consuming this iterator. -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated