T
- The type of the records that are serialized.public class SpanningRecordSerializer<T extends IOReadableWritable> extends Object implements RecordSerializer<T>
continueWritingWithNextBufferBuilder(BufferBuilder)
.RecordSerializer.SerializationResult
Constructor and Description |
---|
SpanningRecordSerializer() |
Modifier and Type | Method and Description |
---|---|
RecordSerializer.SerializationResult |
addRecord(T record)
Serializes the complete record to an intermediate data serialization
buffer and starts copying it to the target buffer (if available).
|
void |
clear()
Clear and release internal state.
|
RecordSerializer.SerializationResult |
continueWritingWithNextBufferBuilder(BufferBuilder buffer)
Sets a (next) target buffer to use and continues writing remaining data
to it until it is full.
|
boolean |
hasSerializedData() |
public RecordSerializer.SerializationResult addRecord(T record) throws IOException
addRecord
in interface RecordSerializer<T extends IOReadableWritable>
record
- the record to serializeIOException
public RecordSerializer.SerializationResult continueWritingWithNextBufferBuilder(BufferBuilder buffer) throws IOException
RecordSerializer
continueWritingWithNextBufferBuilder
in interface RecordSerializer<T extends IOReadableWritable>
buffer
- the new target buffer to useIOException
public void clear()
RecordSerializer
clear
in interface RecordSerializer<T extends IOReadableWritable>
public boolean hasSerializedData()
hasSerializedData
in interface RecordSerializer<T extends IOReadableWritable>
BufferBuilder
.Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.