Packages

c

org.apache.spark.sql.catalyst.expressions

FixedLengthRowBasedKeyValueBatch

final class FixedLengthRowBasedKeyValueBatch extends RowBasedKeyValueBatch

An implementation of RowBasedKeyValueBatch in which all key-value records have same length.

The format for each record looks like this: [UnsafeRow for key of length klen] [UnsafeRow for Value of length vlen] [8 bytes pointer to next] Thus, record length = klen + vlen + 8

Linear Supertypes
RowBasedKeyValueBatch, Closeable, AutoCloseable, MemoryConsumer, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FixedLengthRowBasedKeyValueBatch
  2. RowBasedKeyValueBatch
  3. Closeable
  4. AutoCloseable
  5. MemoryConsumer
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FixedLengthRowBasedKeyValueBatch(keySchema: StructType, valueSchema: StructType, maxRows: Int, manager: TaskMemoryManager)
    Attributes
    protected[expressions]

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def acquireMemory(arg0: Long): Long
    Definition Classes
    MemoryConsumer
  5. def allocateArray(arg0: Long): LongArray
    Definition Classes
    MemoryConsumer
  6. def allocatePage(arg0: Long): MemoryBlock
    Attributes
    protected[memory]
    Definition Classes
    MemoryConsumer
  7. def appendRow(kbase: Any, koff: Long, klen: Int, vbase: Any, voff: Long, vlen: Int): UnsafeRow

    Append a key value pair.

    Append a key value pair. It copies data into the backing MemoryBlock. Returns an UnsafeRow pointing to the value if succeeds, otherwise returns null.

    Definition Classes
    FixedLengthRowBasedKeyValueBatchRowBasedKeyValueBatch
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  10. final def close(): Unit
    Definition Classes
    RowBasedKeyValueBatch → Closeable → AutoCloseable
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def freeArray(arg0: LongArray): Unit
    Definition Classes
    MemoryConsumer
  15. def freeMemory(arg0: Long): Unit
    Definition Classes
    MemoryConsumer
  16. def freePage(arg0: MemoryBlock): Unit
    Attributes
    protected[memory]
    Definition Classes
    MemoryConsumer
  17. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. def getKeyRow(rowId: Int): UnsafeRow

    Returns the key row in this batch at rowId.

    Returns the key row in this batch at rowId. Returned key row is reused across calls.

    Definition Classes
    FixedLengthRowBasedKeyValueBatchRowBasedKeyValueBatch
  19. def getMode(): MemoryMode
    Definition Classes
    MemoryConsumer
  20. def getUsed(): Long
    Definition Classes
    MemoryConsumer
  21. def getValueFromKey(rowId: Int): UnsafeRow

    Returns the value row by two steps: 1) looking up the key row with the same id (skipped if the key row is cached) 2) retrieve the value row by reusing the metadata from step 1) In most times, 1) is skipped because getKeyRow(id) is often called before getValueRow(id).

    Returns the value row by two steps: 1) looking up the key row with the same id (skipped if the key row is cached) 2) retrieve the value row by reusing the metadata from step 1) In most times, 1) is skipped because getKeyRow(id) is often called before getValueRow(id).

    Attributes
    protected[expressions]
    Definition Classes
    FixedLengthRowBasedKeyValueBatchRowBasedKeyValueBatch
  22. final def getValueRow(rowId: Int): UnsafeRow

    Returns the value row in this batch at rowId.

    Returns the value row in this batch at rowId. Returned value row is reused across calls. Because getValueRow(id) is always called after getKeyRow(id) with the same id, we use getValueFromKey(id) to retrieve value row, which reuses metadata from the cached key.

    Definition Classes
    RowBasedKeyValueBatch
  23. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  24. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  25. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  27. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  28. final def numRows(): Int
    Definition Classes
    RowBasedKeyValueBatch
  29. def rowIterator(): KVIterator[UnsafeRow, UnsafeRow]

    Returns an iterator to go through all rows

    Returns an iterator to go through all rows

    Definition Classes
    FixedLengthRowBasedKeyValueBatchRowBasedKeyValueBatch
  30. final def spill(size: Long, trigger: MemoryConsumer): Long

    Sometimes the TaskMemoryManager may call spill() on its associated MemoryConsumers to make space for new consumers.

    Sometimes the TaskMemoryManager may call spill() on its associated MemoryConsumers to make space for new consumers. For RowBasedKeyValueBatch, we do not actually spill and return 0. We should not throw OutOfMemory exception here because other associated consumers might spill

    Definition Classes
    RowBasedKeyValueBatch → MemoryConsumer
  31. def spill(): Unit
    Definition Classes
    MemoryConsumer
    Annotations
    @throws( classOf[java.io.IOException] )
  32. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  33. def toString(): String
    Definition Classes
    AnyRef → Any
  34. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from RowBasedKeyValueBatch

Inherited from Closeable

Inherited from AutoCloseable

Inherited from MemoryConsumer

Inherited from AnyRef

Inherited from Any

Ungrouped