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
- Protected
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(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- 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()
- 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()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- 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(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()