Class SerializedStorage<T>
java.lang.Object
org.apache.druid.query.aggregation.SerializedStorage<T>
- Type Parameters:
T-
simple utility class useful for when multiple passes of input are needed for encoding (e.g. delta or dictionary
encoding).
This allows objects to be serialized to some temporary storage and iterated over for final processing.
-
Constructor Summary
ConstructorsConstructorDescriptionSerializedStorage(WriteOutBytes writeOutBytes, StagedSerde<T> serde) SerializedStorage(WriteOutBytes writeOutBytes, StagedSerde<T> serde, int chunkSize) -
Method Summary
-
Constructor Details
-
SerializedStorage
-
SerializedStorage
-
-
Method Details
-
store
- Throws:
IOException
-
numStored
public int numStored() -
iterator
Generates an iterator over everything that has been stored. Also signifies the end of storing objects. iterator() can be called multiple times if needed, but after iterator() is called, store() can no longer be called.- Returns:
- an iterator
- Throws:
IOException- on failure
-