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
- Alphabetic
- By Inheritance
- FixedLengthRowBasedKeyValueBatch
- RowBasedKeyValueBatch
- Closeable
- AutoCloseable
- MemoryConsumer
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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
- def acquireMemory(arg0: Long): Long
- Definition Classes
- MemoryConsumer
- def allocateArray(arg0: Long): LongArray
- Definition Classes
- MemoryConsumer
- def allocatePage(arg0: Long): MemoryBlock
- Attributes
- protected[memory]
- Definition Classes
- MemoryConsumer
- def appendRow(kbase: AnyRef, koff: Long, klen: Int, vbase: AnyRef, 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
- FixedLengthRowBasedKeyValueBatch → RowBasedKeyValueBatch
- Annotations
- @Override()
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def close(): Unit
- Definition Classes
- RowBasedKeyValueBatch → Closeable → AutoCloseable
- Annotations
- @Override()
- 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])
- def freeArray(arg0: LongArray): Unit
- Definition Classes
- MemoryConsumer
- def freeMemory(arg0: Long): Unit
- Definition Classes
- MemoryConsumer
- def freePage(arg0: MemoryBlock): Unit
- Attributes
- protected[memory]
- Definition Classes
- MemoryConsumer
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- 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
- FixedLengthRowBasedKeyValueBatch → RowBasedKeyValueBatch
- Annotations
- @Override()
- def getMode(): MemoryMode
- Definition Classes
- MemoryConsumer
- def getUsed(): Long
- Definition Classes
- MemoryConsumer
- 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 beforegetValueRow(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 beforegetValueRow(id).- Attributes
- protected[expressions]
- Definition Classes
- FixedLengthRowBasedKeyValueBatch → RowBasedKeyValueBatch
- Annotations
- @Override()
- 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. BecausegetValueRow(id)is always called aftergetKeyRow(id)with the same id, we usegetValueFromKey(id) to retrieve value row, which reuses metadata from the cached key.- Definition Classes
- RowBasedKeyValueBatch
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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()
- final def numRows(): Int
- Definition Classes
- RowBasedKeyValueBatch
- def rowIterator(): KVIterator[UnsafeRow, UnsafeRow]
Returns an iterator to go through all rows
Returns an iterator to go through all rows
- Definition Classes
- FixedLengthRowBasedKeyValueBatch → RowBasedKeyValueBatch
- Annotations
- @Override()
- 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
- Annotations
- @Override()
- def spill(): Unit
- Definition Classes
- MemoryConsumer
- Annotations
- @throws(classOf[java.io.IOException])
- 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()