@Internal public class BinaryRowDataSerializer extends AbstractRowDataSerializer<org.apache.flink.table.data.binary.BinaryRowData>
BinaryRowData.| Modifier and Type | Class and Description |
|---|---|
static class |
BinaryRowDataSerializer.BinaryRowDataSerializerSnapshot
TypeSerializerSnapshot for BinaryRowDataSerializer. |
| Modifier and Type | Field and Description |
|---|---|
static int |
LENGTH_SIZE_IN_BYTES |
| Constructor and Description |
|---|
BinaryRowDataSerializer(int numFields) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkSkipReadForFixLengthPart(org.apache.flink.runtime.memory.AbstractPagedInputView source)
We need skip bytes to read when the remain bytes of current segment is not enough to write
binary row fixed part.
|
org.apache.flink.table.data.binary.BinaryRowData |
copy(org.apache.flink.table.data.binary.BinaryRowData from) |
org.apache.flink.table.data.binary.BinaryRowData |
copy(org.apache.flink.table.data.binary.BinaryRowData from,
org.apache.flink.table.data.binary.BinaryRowData reuse) |
void |
copy(org.apache.flink.core.memory.DataInputView source,
org.apache.flink.core.memory.DataOutputView target) |
void |
copyFromPagesToView(org.apache.flink.runtime.memory.AbstractPagedInputView source,
org.apache.flink.core.memory.DataOutputView target)
Copy a binaryRow which stored in paged input view to output view.
|
org.apache.flink.table.data.binary.BinaryRowData |
createInstance() |
org.apache.flink.table.data.binary.BinaryRowData |
deserialize(org.apache.flink.table.data.binary.BinaryRowData reuse,
org.apache.flink.core.memory.DataInputView source) |
org.apache.flink.table.data.binary.BinaryRowData |
deserialize(org.apache.flink.core.memory.DataInputView source) |
org.apache.flink.table.data.binary.BinaryRowData |
deserializeFromPages(org.apache.flink.runtime.memory.AbstractPagedInputView headerLessView)
De-serializes a record from the given source paged input view.
|
org.apache.flink.table.data.binary.BinaryRowData |
deserializeFromPages(org.apache.flink.table.data.binary.BinaryRowData reuse,
org.apache.flink.runtime.memory.AbstractPagedInputView headerLessView)
Reuse version of
PagedTypeSerializer.deserializeFromPages(AbstractPagedInputView). |
org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.binary.BinaryRowData> |
duplicate() |
boolean |
equals(Object obj) |
int |
getArity()
Get the number of fields.
|
int |
getFixedLengthPartSize() |
int |
getLength() |
int |
getSerializedRowFixedPartLength()
Return fixed part length to serialize one row.
|
int |
hashCode() |
boolean |
isImmutableType() |
org.apache.flink.table.data.binary.BinaryRowData |
mapFromPages(org.apache.flink.table.data.binary.BinaryRowData reuse,
org.apache.flink.runtime.memory.AbstractPagedInputView headerLessView)
Map a reused record from the given source paged input view.
|
void |
pointTo(int length,
org.apache.flink.table.data.binary.BinaryRowData reuse,
org.apache.flink.runtime.memory.AbstractPagedInputView headerLessView)
Point row to memory segments with offset(in the AbstractPagedInputView) and length.
|
void |
serialize(org.apache.flink.table.data.binary.BinaryRowData record,
org.apache.flink.core.memory.DataOutputView target) |
int |
serializeToPages(org.apache.flink.table.data.binary.BinaryRowData record,
org.apache.flink.runtime.memory.AbstractPagedOutputView headerLessView)
Serializes the given record to the given target paged output view.
|
static void |
serializeWithoutLengthSlow(org.apache.flink.table.data.binary.BinaryRowData record,
org.apache.flink.core.memory.MemorySegmentWritable out) |
void |
skipRecordFromPages(org.apache.flink.runtime.memory.AbstractPagedInputView headerLessView)
Skip over bytes of one record from the paged input view, discarding the skipped bytes.
|
org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<org.apache.flink.table.data.binary.BinaryRowData> |
snapshotConfiguration() |
org.apache.flink.table.data.binary.BinaryRowData |
toBinaryRow(org.apache.flink.table.data.binary.BinaryRowData rowData)
Convert a
RowData to a BinaryRowData. |
public static final int LENGTH_SIZE_IN_BYTES
public boolean isImmutableType()
isImmutableType in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.binary.BinaryRowData>public org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.binary.BinaryRowData> duplicate()
duplicate in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.binary.BinaryRowData>public org.apache.flink.table.data.binary.BinaryRowData createInstance()
createInstance in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.binary.BinaryRowData>public org.apache.flink.table.data.binary.BinaryRowData copy(org.apache.flink.table.data.binary.BinaryRowData from)
copy in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.binary.BinaryRowData>public org.apache.flink.table.data.binary.BinaryRowData copy(org.apache.flink.table.data.binary.BinaryRowData from,
org.apache.flink.table.data.binary.BinaryRowData reuse)
copy in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.binary.BinaryRowData>public int getLength()
getLength in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.binary.BinaryRowData>public void serialize(org.apache.flink.table.data.binary.BinaryRowData record,
org.apache.flink.core.memory.DataOutputView target)
throws IOException
serialize in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.binary.BinaryRowData>IOExceptionpublic org.apache.flink.table.data.binary.BinaryRowData deserialize(org.apache.flink.core.memory.DataInputView source)
throws IOException
deserialize in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.binary.BinaryRowData>IOExceptionpublic org.apache.flink.table.data.binary.BinaryRowData deserialize(org.apache.flink.table.data.binary.BinaryRowData reuse,
org.apache.flink.core.memory.DataInputView source)
throws IOException
deserialize in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.binary.BinaryRowData>IOExceptionpublic int getArity()
AbstractRowDataSerializergetArity in class AbstractRowDataSerializer<org.apache.flink.table.data.binary.BinaryRowData>public org.apache.flink.table.data.binary.BinaryRowData toBinaryRow(org.apache.flink.table.data.binary.BinaryRowData rowData)
throws IOException
AbstractRowDataSerializerRowData to a BinaryRowData.toBinaryRow in class AbstractRowDataSerializer<org.apache.flink.table.data.binary.BinaryRowData>IOExceptionpublic int serializeToPages(org.apache.flink.table.data.binary.BinaryRowData record,
org.apache.flink.runtime.memory.AbstractPagedOutputView headerLessView)
throws IOException
PagedTypeSerializerBinaryRowData.serializeToPages in class PagedTypeSerializer<org.apache.flink.table.data.binary.BinaryRowData>record - The record to serialize.headerLessView - 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 static void serializeWithoutLengthSlow(org.apache.flink.table.data.binary.BinaryRowData record,
org.apache.flink.core.memory.MemorySegmentWritable out)
throws IOException
IOExceptionpublic org.apache.flink.table.data.binary.BinaryRowData deserializeFromPages(org.apache.flink.runtime.memory.AbstractPagedInputView headerLessView)
throws IOException
PagedTypeSerializerBinaryRowData. 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(T, AbstractPagedInputView).deserializeFromPages in class PagedTypeSerializer<org.apache.flink.table.data.binary.BinaryRowData>headerLessView - 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 org.apache.flink.table.data.binary.BinaryRowData deserializeFromPages(org.apache.flink.table.data.binary.BinaryRowData reuse,
org.apache.flink.runtime.memory.AbstractPagedInputView headerLessView)
throws IOException
PagedTypeSerializerPagedTypeSerializer.deserializeFromPages(AbstractPagedInputView).deserializeFromPages in class PagedTypeSerializer<org.apache.flink.table.data.binary.BinaryRowData>IOExceptionpublic org.apache.flink.table.data.binary.BinaryRowData mapFromPages(org.apache.flink.table.data.binary.BinaryRowData reuse,
org.apache.flink.runtime.memory.AbstractPagedInputView headerLessView)
throws IOException
PagedTypeSerializerIf you choose the zero copy way, you have to deal with the lifecycle of the pages properly.
mapFromPages in class PagedTypeSerializer<org.apache.flink.table.data.binary.BinaryRowData>reuse - the reused record to be mappedheaderLessView - 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 void skipRecordFromPages(org.apache.flink.runtime.memory.AbstractPagedInputView headerLessView)
throws IOException
PagedTypeSerializerskipRecordFromPages in class PagedTypeSerializer<org.apache.flink.table.data.binary.BinaryRowData>IOExceptionpublic void copyFromPagesToView(org.apache.flink.runtime.memory.AbstractPagedInputView source,
org.apache.flink.core.memory.DataOutputView target)
throws IOException
source - source paged input view where the binary row storedtarget - the target output view.IOExceptionpublic void pointTo(int length,
org.apache.flink.table.data.binary.BinaryRowData reuse,
org.apache.flink.runtime.memory.AbstractPagedInputView headerLessView)
throws IOException
length - row length.reuse - reuse BinaryRowData object.headerLessView - source memory segments container.IOExceptionpublic void checkSkipReadForFixLengthPart(org.apache.flink.runtime.memory.AbstractPagedInputView source)
throws IOException
BinaryRowData.IOExceptionpublic int getSerializedRowFixedPartLength()
public int getFixedLengthPartSize()
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<org.apache.flink.table.data.binary.BinaryRowData>IOExceptionpublic boolean equals(Object obj)
equals in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.binary.BinaryRowData>public int hashCode()
hashCode in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.binary.BinaryRowData>public org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<org.apache.flink.table.data.binary.BinaryRowData> snapshotConfiguration()
snapshotConfiguration in class org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.binary.BinaryRowData>Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.