Package org.apache.spark.storage.memory
Class SerializedValuesHolder<T>
Object
org.apache.spark.storage.memory.SerializedValuesHolder<T>
- All Implemented Interfaces:
ValuesHolder<T>
A holder for storing the serialized values.
-
Constructor Summary
ConstructorDescriptionSerializedValuesHolder
(BlockId blockId, int chunkSize, scala.reflect.ClassTag<T> classTag, org.apache.spark.memory.MemoryMode memoryMode, org.apache.spark.serializer.SerializerManager serializerManager) -
Method Summary
Modifier and TypeMethodDescriptionscala.Function1<Object,
ByteBuffer> org.apache.spark.util.io.ChunkedByteBufferOutputStream
bbos()
long
Note: After this method is called, the ValuesHolder is invalid, we can't store data and get estimate size again.org.apache.spark.storage.memory.RedirectableOutputStream
void
storeValue
(T value)
-
Constructor Details
-
SerializedValuesHolder
-
-
Method Details
-
allocator
-
bbos
public org.apache.spark.util.io.ChunkedByteBufferOutputStream bbos() -
estimatedSize
public long estimatedSize()- Specified by:
estimatedSize
in interfaceValuesHolder<T>
-
getBuilder
Description copied from interface:ValuesHolder
Note: After this method is called, the ValuesHolder is invalid, we can't store data and get estimate size again.- Specified by:
getBuilder
in interfaceValuesHolder<T>
- Returns:
- a MemoryEntryBuilder which is used to build a memory entry and get the stored data size.
-
redirectableStream
public org.apache.spark.storage.memory.RedirectableOutputStream redirectableStream() -
serializationStream
-
storeValue
- Specified by:
storeValue
in interfaceValuesHolder<T>
-