Class ArrowSerializer
java.lang.Object
org.apache.flink.table.runtime.arrow.serializers.ArrowSerializer
The base class ArrowSerializer which will serialize/deserialize RowType data to/from arrow bytes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.flink.table.types.logical.RowTypeThe input RowType.protected final org.apache.flink.table.types.logical.RowTypeThe output RowType. -
Constructor Summary
ConstructorsConstructorDescriptionArrowSerializer(org.apache.flink.table.types.logical.RowType inputType, org.apache.flink.table.types.logical.RowType outputType) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()createArrowReader(org.apache.arrow.vector.VectorSchemaRoot root) ArrowWriter<org.apache.flink.table.data.RowData>Creates anArrowWriter.voidForces to finish the processing of the current batch of elements.intload()voidopen(InputStream bais, OutputStream baos) org.apache.flink.table.data.RowDataread(int i) voidvoidvoidwrite(org.apache.flink.table.data.RowData element)
-
Field Details
-
inputType
protected final org.apache.flink.table.types.logical.RowType inputTypeThe input RowType. -
outputType
protected final org.apache.flink.table.types.logical.RowType outputTypeThe output RowType.
-
-
Constructor Details
-
ArrowSerializer
public ArrowSerializer(org.apache.flink.table.types.logical.RowType inputType, org.apache.flink.table.types.logical.RowType outputType)
-
-
Method Details
-
open
- Throws:
Exception
-
load
- Throws:
IOException
-
read
public org.apache.flink.table.data.RowData read(int i) -
write
public void write(org.apache.flink.table.data.RowData element) -
close
- Throws:
Exception
-
createArrowWriter
Creates anArrowWriter. -
createArrowReader
-
finishCurrentBatch
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
- Throws:
IOException
-
resetWriter
- Throws:
IOException
-