T
- The type of the record to be deserialized.public class SpillingAdaptiveSpanningRecordDeserializer<T extends IOReadableWritable> extends Object implements RecordDeserializer<T>
RecordDeserializer.DeserializationResult
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_FILE_BUFFER_SIZE |
static int |
DEFAULT_THRESHOLD_FOR_SPILLING |
Constructor and Description |
---|
SpillingAdaptiveSpanningRecordDeserializer(String[] tmpDirectories) |
SpillingAdaptiveSpanningRecordDeserializer(String[] tmpDirectories,
int thresholdForSpilling,
int fileBufferSize) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
RecordDeserializer.DeserializationResult |
getNextRecord(T target) |
CloseableIterator<Buffer> |
getUnconsumedBuffer()
Gets the unconsumed buffer which needs to be persisted in unaligned checkpoint scenario.
|
void |
setNextBuffer(Buffer buffer) |
public static final int DEFAULT_THRESHOLD_FOR_SPILLING
public static final int DEFAULT_FILE_BUFFER_SIZE
public SpillingAdaptiveSpanningRecordDeserializer(String[] tmpDirectories)
public SpillingAdaptiveSpanningRecordDeserializer(String[] tmpDirectories, int thresholdForSpilling, int fileBufferSize)
public void setNextBuffer(Buffer buffer) throws IOException
setNextBuffer
in interface RecordDeserializer<T extends IOReadableWritable>
IOException
public CloseableIterator<Buffer> getUnconsumedBuffer() throws IOException
RecordDeserializer
Note that the unconsumed buffer might be null if the whole buffer was already consumed before and there are no partial length or data remained in the end of buffer.
getUnconsumedBuffer
in interface RecordDeserializer<T extends IOReadableWritable>
IOException
public RecordDeserializer.DeserializationResult getNextRecord(T target) throws IOException
getNextRecord
in interface RecordDeserializer<T extends IOReadableWritable>
IOException
public void clear()
clear
in interface RecordDeserializer<T extends IOReadableWritable>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.