public class PbRowDataSerializationSchema extends Object implements SerializationSchema<RowData>
Serializes a RowData
to protobuf binary data.
Failures during deserialization are forwarded as wrapped FlinkRuntimeException
.
SerializationSchema.InitializationContext
Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID |
Constructor and Description |
---|
PbRowDataSerializationSchema(RowType rowType,
PbFormatConfig pbFormatConfig) |
Modifier and Type | Method and Description |
---|---|
void |
open(SerializationSchema.InitializationContext context)
Initialization method for the schema.
|
byte[] |
serialize(RowData element)
Serializes the incoming element to a specified type.
|
public static final long serialVersionUID
public PbRowDataSerializationSchema(RowType rowType, PbFormatConfig pbFormatConfig)
public void open(SerializationSchema.InitializationContext context) throws Exception
SerializationSchema
SerializationSchema.serialize(Object)
and thus suitable for one time setup work.
The provided SerializationSchema.InitializationContext
can be used to access additional features such
as e.g. registering user metrics.
open
in interface SerializationSchema<RowData>
context
- Contextual information that can be used during initialization.Exception
public byte[] serialize(RowData element)
SerializationSchema
serialize
in interface SerializationSchema<RowData>
element
- The incoming element to be serializedCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.