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.RowTypeinputTypeThe input RowType.protected org.apache.flink.table.types.logical.RowTypeoutputTypeThe 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 voidclose()ArrowReadercreateArrowReader(org.apache.arrow.vector.VectorSchemaRoot root)ArrowWriter<org.apache.flink.table.data.RowData>createArrowWriter()Creates anArrowWriter.voidfinishCurrentBatch()Forces to finish the processing of the current batch of elements.intload()voidopen(InputStream bais, OutputStream baos)org.apache.flink.table.data.RowDataread(int i)voidresetReader()voidresetWriter()voidwrite(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 ExceptionForces 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
-
-