Class ArrowSerializer
- java.lang.Object
-
- org.apache.flink.table.runtime.arrow.serializers.ArrowSerializer
-
@Internal public final class ArrowSerializer extends Object
The base class ArrowSerializer which will serialize/deserialize RowType data to/from arrow bytes.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.flink.table.types.logical.RowType
inputType
The input RowType.protected org.apache.flink.table.types.logical.RowType
outputType
The output RowType.
-
Constructor Summary
Constructors Constructor Description ArrowSerializer(org.apache.flink.table.types.logical.RowType inputType, org.apache.flink.table.types.logical.RowType outputType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
ArrowReader
createArrowReader(org.apache.arrow.vector.VectorSchemaRoot root)
ArrowWriter<org.apache.flink.table.data.RowData>
createArrowWriter()
Creates anArrowWriter
.void
finishCurrentBatch()
Forces to finish the processing of the current batch of elements.int
load()
void
open(InputStream bais, OutputStream baos)
org.apache.flink.table.data.RowData
read(int i)
void
resetReader()
void
resetWriter()
void
write(org.apache.flink.table.data.RowData element)
-
-
-
Method Detail
-
open
public void open(InputStream bais, OutputStream baos) throws Exception
- Throws:
Exception
-
load
public int load() throws IOException
- Throws:
IOException
-
read
public org.apache.flink.table.data.RowData read(int i)
-
write
public void write(org.apache.flink.table.data.RowData element)
-
createArrowWriter
public ArrowWriter<org.apache.flink.table.data.RowData> createArrowWriter()
Creates anArrowWriter
.
-
createArrowReader
public ArrowReader createArrowReader(org.apache.arrow.vector.VectorSchemaRoot root)
-
finishCurrentBatch
public void finishCurrentBatch() throws Exception
Forces to finish the processing of the current batch of elements. It will serialize the batch of elements into one arrow batch.- Throws:
Exception
-
resetReader
public void resetReader() throws IOException
- Throws:
IOException
-
resetWriter
public void resetWriter() throws IOException
- Throws:
IOException
-
-