@Internal public abstract class AbstractRowDataSerializer<T extends RowData> extends TypeSerializer<T>
Constructor and Description |
---|
AbstractRowDataSerializer() |
Modifier and Type | Method and Description |
---|---|
abstract T |
deserializeFromPages(AbstractPagedInputView source)
De-serializes a record from the given source paged input view.
|
abstract T |
deserializeFromPages(T reuse,
AbstractPagedInputView source)
Reuse version of
deserializeFromPages(AbstractPagedInputView) . |
abstract int |
getArity()
Get the number of fields.
|
abstract T |
mapFromPages(AbstractPagedInputView source)
Map a record from the given source paged input view.
|
abstract T |
mapFromPages(T reuse,
AbstractPagedInputView source)
Reuse version of
mapFromPages(AbstractPagedInputView) . |
abstract int |
serializeToPages(T record,
AbstractPagedOutputView target)
Serializes the given record to the given target paged output view.
|
abstract BinaryRowData |
toBinaryRow(T rowData)
Convert a
RowData to a BinaryRowData . |
copy, copy, copy, createInstance, deserialize, deserialize, duplicate, equals, getLength, hashCode, isImmutableType, serialize, snapshotConfiguration
public abstract int getArity()
public abstract BinaryRowData toBinaryRow(T rowData) throws IOException
RowData
to a BinaryRowData
.IOException
public abstract int serializeToPages(T record, AbstractPagedOutputView target) throws IOException
BinaryRowData
.record
- The record to serialize.target
- The output view to write the serialized data to.IOException
- Thrown, if the serialization encountered an I/O related error. Typically
raised by the output view, which may have an underlying I/O channel to which it
delegates.public abstract T deserializeFromPages(AbstractPagedInputView source) throws IOException
BinaryRowData
. Typically, the content read from source should be copied out when
de-serializing, and we are not expecting the underlying data from source is reused. If you
have such requirement, see mapFromPages(AbstractPagedInputView)
.source
- The input view from which to read the data.IOException
- Thrown, if the de-serialization encountered an I/O related error.
Typically raised by the input view, which may have an underlying I/O channel from which
it reads.public abstract T deserializeFromPages(T reuse, AbstractPagedInputView source) throws IOException
deserializeFromPages(AbstractPagedInputView)
.IOException
public abstract T mapFromPages(AbstractPagedInputView source) throws IOException
If you choose the zero copy way, you have to deal with the lifecycle of the pages properly.
source
- The input view from which to read the data.IOException
- Thrown, if the de-serialization encountered an I/O related error.
Typically raised by the input view, which may have an underlying I/O channel from which
it reads.public abstract T mapFromPages(T reuse, AbstractPagedInputView source) throws IOException
mapFromPages(AbstractPagedInputView)
.IOException
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.