T
- The type of the record to be deserialized.public class SpillingAdaptiveSpanningRecordDeserializer<T extends IOReadableWritable> extends Object implements RecordDeserializer<T>
RecordDeserializer.DeserializationResult
Constructor and Description |
---|
SpillingAdaptiveSpanningRecordDeserializer(String[] tmpDirectories) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
Buffer |
getCurrentBuffer() |
RecordDeserializer.DeserializationResult |
getNextRecord(T target) |
CloseableIterator<Buffer> |
getUnconsumedBuffer()
Gets the unconsumed buffer which needs to be persisted in unaligned checkpoint scenario.
|
boolean |
hasUnfinishedData() |
void |
setNextBuffer(Buffer buffer) |
public SpillingAdaptiveSpanningRecordDeserializer(String[] tmpDirectories)
public void setNextBuffer(Buffer buffer) throws IOException
setNextBuffer
in interface RecordDeserializer<T extends IOReadableWritable>
IOException
public Buffer getCurrentBuffer()
getCurrentBuffer
in interface RecordDeserializer<T extends IOReadableWritable>
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>
public boolean hasUnfinishedData()
hasUnfinishedData
in interface RecordDeserializer<T extends IOReadableWritable>
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.