final class VariableLengthRowBasedKeyValueBatch extends RowBasedKeyValueBatch
An implementation of RowBasedKeyValueBatch in which key-value records have variable lengths.
The format for each record looks like this (in case of uaoSize = 4): [4 bytes total size = (klen + vlen + 4)] [4 bytes key size = klen] [UnsafeRow for key of length klen] [UnsafeRow for Value of length vlen] [8 bytes pointer to next] Thus, record length = 4 + 4 + klen + vlen + 8
- Alphabetic
- By Inheritance
- VariableLengthRowBasedKeyValueBatch
- RowBasedKeyValueBatch
- Closeable
- AutoCloseable
- MemoryConsumer
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
VariableLengthRowBasedKeyValueBatch(keySchema: StructType, valueSchema: StructType, maxRows: Int, manager: TaskMemoryManager)
- Attributes
- protected[expressions]
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: 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
- VariableLengthRowBasedKeyValueBatch → RowBasedKeyValueBatch
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
close(): Unit
- Definition Classes
- RowBasedKeyValueBatch → Closeable → AutoCloseable
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): 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[_]
- 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
- VariableLengthRowBasedKeyValueBatch → RowBasedKeyValueBatch
-
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).- Definition Classes
- VariableLengthRowBasedKeyValueBatch → RowBasedKeyValueBatch
-
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
- VariableLengthRowBasedKeyValueBatch → RowBasedKeyValueBatch
-
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
-
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( ... )
-
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()