public class BinaryRowSerializer extends AbstractRowSerializer<BinaryRow>
BinaryRow.| 限定符和类型 | 类和说明 |
|---|---|
static class |
BinaryRowSerializer.BinaryRowSerializerSnapshot
TypeSerializerSnapshot for BinaryRowSerializer. |
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
LENGTH_SIZE_IN_BYTES |
| 构造器和说明 |
|---|
BinaryRowSerializer(int numFields) |
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
BinaryRow |
copy(BinaryRow from) |
BinaryRow |
copy(BinaryRow from,
BinaryRow 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.
|
BinaryRow |
createInstance() |
BinaryRow |
deserialize(BinaryRow reuse,
org.apache.flink.core.memory.DataInputView source) |
BinaryRow |
deserialize(org.apache.flink.core.memory.DataInputView source) |
BinaryRow |
deserializeFromPages(org.apache.flink.runtime.memory.AbstractPagedInputView headerLessView)
De-serializes a record from the given source paged input view.
|
BinaryRow |
deserializeFromPages(BinaryRow reuse,
org.apache.flink.runtime.memory.AbstractPagedInputView headerLessView)
Reuse version of
AbstractRowSerializer.deserializeFromPages(AbstractPagedInputView). |
org.apache.flink.api.common.typeutils.TypeSerializer<BinaryRow> |
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() |
BinaryRow |
mapFromPages(org.apache.flink.runtime.memory.AbstractPagedInputView headerLessView)
Map a record from the given source paged input view.
|
BinaryRow |
mapFromPages(BinaryRow reuse,
org.apache.flink.runtime.memory.AbstractPagedInputView headerLessView)
Reuse version of
AbstractRowSerializer.mapFromPages(AbstractPagedInputView). |
void |
pointTo(int length,
BinaryRow reuse,
org.apache.flink.runtime.memory.AbstractPagedInputView headerLessView)
Point row to memory segments with offset(in the AbstractPagedInputView) and length.
|
void |
serialize(BinaryRow record,
org.apache.flink.core.memory.DataOutputView target) |
int |
serializeToPages(BinaryRow record,
org.apache.flink.runtime.memory.AbstractPagedOutputView headerLessView)
Serializes the given record to the given target paged output view.
|
static void |
serializeWithoutLengthSlow(BinaryRow record,
org.apache.flink.core.memory.MemorySegmentWritable out) |
org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<BinaryRow> |
snapshotConfiguration() |
BinaryRow |
toBinaryRow(BinaryRow baseRow)
|
public static final int LENGTH_SIZE_IN_BYTES
public boolean isImmutableType()
isImmutableType 在类中 org.apache.flink.api.common.typeutils.TypeSerializer<BinaryRow>public org.apache.flink.api.common.typeutils.TypeSerializer<BinaryRow> duplicate()
duplicate 在类中 org.apache.flink.api.common.typeutils.TypeSerializer<BinaryRow>public BinaryRow createInstance()
createInstance 在类中 org.apache.flink.api.common.typeutils.TypeSerializer<BinaryRow>public BinaryRow copy(BinaryRow from)
copy 在类中 org.apache.flink.api.common.typeutils.TypeSerializer<BinaryRow>public BinaryRow copy(BinaryRow from, BinaryRow reuse)
copy 在类中 org.apache.flink.api.common.typeutils.TypeSerializer<BinaryRow>public int getLength()
getLength 在类中 org.apache.flink.api.common.typeutils.TypeSerializer<BinaryRow>public void serialize(BinaryRow record, org.apache.flink.core.memory.DataOutputView target) throws IOException
serialize 在类中 org.apache.flink.api.common.typeutils.TypeSerializer<BinaryRow>IOExceptionpublic BinaryRow deserialize(org.apache.flink.core.memory.DataInputView source) throws IOException
deserialize 在类中 org.apache.flink.api.common.typeutils.TypeSerializer<BinaryRow>IOExceptionpublic BinaryRow deserialize(BinaryRow reuse, org.apache.flink.core.memory.DataInputView source) throws IOException
deserialize 在类中 org.apache.flink.api.common.typeutils.TypeSerializer<BinaryRow>IOExceptionpublic int getArity()
AbstractRowSerializergetArity 在类中 AbstractRowSerializer<BinaryRow>public BinaryRow toBinaryRow(BinaryRow baseRow) throws IOException
AbstractRowSerializertoBinaryRow 在类中 AbstractRowSerializer<BinaryRow>IOExceptionpublic int serializeToPages(BinaryRow record, org.apache.flink.runtime.memory.AbstractPagedOutputView headerLessView) throws IOException
AbstractRowSerializerBinaryRow.serializeToPages 在类中 AbstractRowSerializer<BinaryRow>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(BinaryRow record, org.apache.flink.core.memory.MemorySegmentWritable out) throws IOException
IOExceptionpublic BinaryRow deserializeFromPages(org.apache.flink.runtime.memory.AbstractPagedInputView headerLessView) 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 在类中 AbstractRowSerializer<BinaryRow>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 BinaryRow deserializeFromPages(BinaryRow reuse, org.apache.flink.runtime.memory.AbstractPagedInputView headerLessView) throws IOException
AbstractRowSerializerAbstractRowSerializer.deserializeFromPages(AbstractPagedInputView).deserializeFromPages 在类中 AbstractRowSerializer<BinaryRow>IOExceptionpublic BinaryRow mapFromPages(org.apache.flink.runtime.memory.AbstractPagedInputView headerLessView) throws IOException
AbstractRowSerializerIf you choose the zero copy way, you have to deal with the lifecycle of the pages properly.
mapFromPages 在类中 AbstractRowSerializer<BinaryRow>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 BinaryRow mapFromPages(BinaryRow reuse, org.apache.flink.runtime.memory.AbstractPagedInputView headerLessView) throws IOException
AbstractRowSerializerAbstractRowSerializer.mapFromPages(AbstractPagedInputView).mapFromPages 在类中 AbstractRowSerializer<BinaryRow>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,
BinaryRow reuse,
org.apache.flink.runtime.memory.AbstractPagedInputView headerLessView)
throws IOException
length - row length.reuse - reuse BinaryRow object.headerLessView - source memory segments container.IOExceptionpublic void checkSkipReadForFixLengthPart(org.apache.flink.runtime.memory.AbstractPagedInputView source)
throws IOException
BinaryRow.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 在类中 org.apache.flink.api.common.typeutils.TypeSerializer<BinaryRow>IOExceptionpublic boolean equals(Object obj)
equals 在类中 org.apache.flink.api.common.typeutils.TypeSerializer<BinaryRow>public int hashCode()
hashCode 在类中 org.apache.flink.api.common.typeutils.TypeSerializer<BinaryRow>Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.