@Internal
public abstract class AbstractRowDataSerializer<T extends org.apache.flink.table.data.RowData>
extends org.apache.flink.api.common.typeutils.TypeSerializer<T>
| 构造器和说明 |
|---|
AbstractRowDataSerializer() |
| 限定符和类型 | 方法和说明 |
|---|---|
abstract T |
deserializeFromPages(org.apache.flink.runtime.memory.AbstractPagedInputView source)
De-serializes a record from the given source paged input view.
|
abstract T |
deserializeFromPages(T reuse,
org.apache.flink.runtime.memory.AbstractPagedInputView source)
Reuse version of
deserializeFromPages(AbstractPagedInputView). |
abstract int |
getArity()
Get the number of fields.
|
abstract T |
mapFromPages(org.apache.flink.runtime.memory.AbstractPagedInputView source)
Map a record from the given source paged input view.
|
abstract T |
mapFromPages(T reuse,
org.apache.flink.runtime.memory.AbstractPagedInputView source)
Reuse version of
mapFromPages(AbstractPagedInputView). |
abstract int |
serializeToPages(T record,
org.apache.flink.runtime.memory.AbstractPagedOutputView target)
Serializes the given record to the given target paged output view.
|
abstract org.apache.flink.table.data.binary.BinaryRowData |
toBinaryRow(T rowData)
Convert a
RowData to a BinaryRowData. |
public abstract int getArity()
public abstract org.apache.flink.table.data.binary.BinaryRowData toBinaryRow(T rowData) throws IOException
RowData to a BinaryRowData.IOExceptionpublic abstract int serializeToPages(T record, org.apache.flink.runtime.memory.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(org.apache.flink.runtime.memory.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, org.apache.flink.runtime.memory.AbstractPagedInputView source) throws IOException
deserializeFromPages(AbstractPagedInputView).IOExceptionpublic abstract T mapFromPages(org.apache.flink.runtime.memory.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, org.apache.flink.runtime.memory.AbstractPagedInputView source) throws IOException
mapFromPages(AbstractPagedInputView).IOExceptionCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.