public class BaseRowSerializer extends AbstractRowSerializer<BaseRow>
| Modifier and Type | Class and Description |
|---|---|
static class |
BaseRowSerializer.BaseRowSerializerSnapshot
TypeSerializerSnapshot for BinaryRowSerializer. |
| Constructor and Description |
|---|
BaseRowSerializer(org.apache.flink.api.common.ExecutionConfig config,
org.apache.flink.table.types.logical.LogicalType... types) |
BaseRowSerializer(org.apache.flink.api.common.ExecutionConfig config,
org.apache.flink.table.types.logical.RowType rowType) |
BaseRowSerializer(org.apache.flink.table.types.logical.LogicalType[] types,
org.apache.flink.api.common.typeutils.TypeSerializer[] fieldSerializers) |
| Modifier and Type | Method and Description |
|---|---|
BaseRow |
copy(BaseRow from) |
BaseRow |
copy(BaseRow from,
BaseRow reuse) |
void |
copy(org.apache.flink.core.memory.DataInputView source,
org.apache.flink.core.memory.DataOutputView target) |
BaseRow |
createInstance() |
BaseRow |
deserialize(BaseRow reuse,
org.apache.flink.core.memory.DataInputView source) |
BaseRow |
deserialize(org.apache.flink.core.memory.DataInputView source) |
BaseRow |
deserializeFromPages(org.apache.flink.runtime.memory.AbstractPagedInputView source)
De-serializes a record from the given source paged input view.
|
BaseRow |
deserializeFromPages(BaseRow reuse,
org.apache.flink.runtime.memory.AbstractPagedInputView source)
Reuse version of
AbstractRowSerializer.deserializeFromPages(AbstractPagedInputView). |
org.apache.flink.api.common.typeutils.TypeSerializer<BaseRow> |
duplicate() |
boolean |
equals(Object obj) |
int |
getArity()
Get the number of fields.
|
int |
getLength() |
int |
hashCode() |
boolean |
isImmutableType() |
BaseRow |
mapFromPages(org.apache.flink.runtime.memory.AbstractPagedInputView source)
Map a record from the given source paged input view.
|
BaseRow |
mapFromPages(BaseRow reuse,
org.apache.flink.runtime.memory.AbstractPagedInputView source)
Reuse version of
AbstractRowSerializer.mapFromPages(AbstractPagedInputView). |
void |
serialize(BaseRow row,
org.apache.flink.core.memory.DataOutputView target) |
int |
serializeToPages(BaseRow row,
org.apache.flink.runtime.memory.AbstractPagedOutputView target)
Serializes the given record to the given target paged output view.
|
org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<BaseRow> |
snapshotConfiguration() |
BinaryRow |
toBinaryRow(BaseRow row)
Convert base row to binary row.
|
public BaseRowSerializer(org.apache.flink.api.common.ExecutionConfig config,
org.apache.flink.table.types.logical.RowType rowType)
public BaseRowSerializer(org.apache.flink.api.common.ExecutionConfig config,
org.apache.flink.table.types.logical.LogicalType... types)
public BaseRowSerializer(org.apache.flink.table.types.logical.LogicalType[] types,
org.apache.flink.api.common.typeutils.TypeSerializer[] fieldSerializers)
public org.apache.flink.api.common.typeutils.TypeSerializer<BaseRow> duplicate()
duplicate in class org.apache.flink.api.common.typeutils.TypeSerializer<BaseRow>public BaseRow createInstance()
createInstance in class org.apache.flink.api.common.typeutils.TypeSerializer<BaseRow>public void serialize(BaseRow row, org.apache.flink.core.memory.DataOutputView target) throws IOException
serialize in class org.apache.flink.api.common.typeutils.TypeSerializer<BaseRow>IOExceptionpublic BaseRow deserialize(org.apache.flink.core.memory.DataInputView source) throws IOException
deserialize in class org.apache.flink.api.common.typeutils.TypeSerializer<BaseRow>IOExceptionpublic BaseRow deserialize(BaseRow reuse, org.apache.flink.core.memory.DataInputView source) throws IOException
deserialize in class org.apache.flink.api.common.typeutils.TypeSerializer<BaseRow>IOExceptionpublic BaseRow copy(BaseRow from)
copy in class org.apache.flink.api.common.typeutils.TypeSerializer<BaseRow>public BaseRow copy(BaseRow from, BaseRow reuse)
copy in class org.apache.flink.api.common.typeutils.TypeSerializer<BaseRow>public void copy(org.apache.flink.core.memory.DataInputView source,
org.apache.flink.core.memory.DataOutputView target)
throws IOException
copy in class org.apache.flink.api.common.typeutils.TypeSerializer<BaseRow>IOExceptionpublic int getArity()
AbstractRowSerializergetArity in class AbstractRowSerializer<BaseRow>public BinaryRow toBinaryRow(BaseRow row)
toBinaryRow in class AbstractRowSerializer<BaseRow>public int serializeToPages(BaseRow row, org.apache.flink.runtime.memory.AbstractPagedOutputView target) throws IOException
AbstractRowSerializerBinaryRow.serializeToPages in class AbstractRowSerializer<BaseRow>row - 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 BaseRow deserializeFromPages(org.apache.flink.runtime.memory.AbstractPagedInputView source) throws IOException
AbstractRowSerializerBinaryRow. 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 AbstractRowSerializer.mapFromPages(AbstractPagedInputView).deserializeFromPages in class AbstractRowSerializer<BaseRow>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 BaseRow deserializeFromPages(BaseRow reuse, org.apache.flink.runtime.memory.AbstractPagedInputView source) throws IOException
AbstractRowSerializerAbstractRowSerializer.deserializeFromPages(AbstractPagedInputView).deserializeFromPages in class AbstractRowSerializer<BaseRow>IOExceptionpublic BaseRow mapFromPages(org.apache.flink.runtime.memory.AbstractPagedInputView source) throws IOException
AbstractRowSerializerIf you choose the zero copy way, you have to deal with the lifecycle of the pages properly.
mapFromPages in class AbstractRowSerializer<BaseRow>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 BaseRow mapFromPages(BaseRow reuse, org.apache.flink.runtime.memory.AbstractPagedInputView source) throws IOException
AbstractRowSerializerAbstractRowSerializer.mapFromPages(AbstractPagedInputView).mapFromPages in class AbstractRowSerializer<BaseRow>IOExceptionpublic boolean equals(Object obj)
equals in class org.apache.flink.api.common.typeutils.TypeSerializer<BaseRow>public int hashCode()
hashCode in class org.apache.flink.api.common.typeutils.TypeSerializer<BaseRow>public boolean isImmutableType()
isImmutableType in class org.apache.flink.api.common.typeutils.TypeSerializer<BaseRow>public int getLength()
getLength in class org.apache.flink.api.common.typeutils.TypeSerializer<BaseRow>Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.