Skip to content

UnsafeExternalSorter

UnsafeExternalSorter is a MemoryConsumer.

Creating Instance

UnsafeExternalSorter takes the following to be created:

UnsafeExternalSorter is created when:

createWithExistingInMemorySorter

UnsafeExternalSorter createWithExistingInMemorySorter(
  TaskMemoryManager taskMemoryManager,
  BlockManager blockManager,
  SerializerManager serializerManager,
  TaskContext taskContext,
  Supplier<RecordComparator> recordComparatorSupplier,
  PrefixComparator prefixComparator,
  int initialSize,
  long pageSizeBytes,
  int numElementsForSpillThreshold,
  UnsafeInMemorySorter inMemorySorter,
  long existingMemoryConsumption)

createWithExistingInMemorySorter...FIXME

createWithExistingInMemorySorter is used when:

  • UnsafeKVExternalSorter is created

create

UnsafeExternalSorter create(
  TaskMemoryManager taskMemoryManager,
  BlockManager blockManager,
  SerializerManager serializerManager,
  TaskContext taskContext,
  Supplier<RecordComparator> recordComparatorSupplier,
  PrefixComparator prefixComparator,
  int initialSize,
  long pageSizeBytes,
  int numElementsForSpillThreshold,
  boolean canUseRadixSort)

create creates a new UnsafeExternalSorter with no UnsafeInMemorySorter given (null).

create is used when:

  • UnsafeExternalRowSorter and UnsafeKVExternalSorter are created
Back to top