public class JsonRowDataSerializationSchema extends Object implements org.apache.flink.api.common.serialization.SerializationSchema<org.apache.flink.table.data.RowData>
Serializes the input Flink object into a JSON string and converts it into byte[]
.
Result byte[]
messages can be deserialized using JsonRowDataDeserializationSchema
.
NOTE: This class was directly copied and modified from upstream Flink in order to use unshaded Jackson dependencies for use with eventutilities-core.
WMF changes from upstream Flink: - Use unshaded jackson dependencies. - added normalization function support
Constructor and Description |
---|
JsonRowDataSerializationSchema(org.apache.flink.table.types.logical.RowType rowType,
Function<Consumer<com.fasterxml.jackson.databind.node.ObjectNode>,com.fasterxml.jackson.databind.node.ObjectNode> normalization,
com.fasterxml.jackson.databind.ObjectMapper mapper,
org.apache.flink.formats.common.TimestampFormat timestampFormat,
org.apache.flink.formats.json.JsonFormatOptions.MapNullKeyMode mapNullKeyMode,
String mapNullKeyLiteral,
boolean encodeDecimalAsPlainNumber) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
hashCode() |
byte[] |
serialize(org.apache.flink.table.data.RowData row) |
public JsonRowDataSerializationSchema(org.apache.flink.table.types.logical.RowType rowType, Function<Consumer<com.fasterxml.jackson.databind.node.ObjectNode>,com.fasterxml.jackson.databind.node.ObjectNode> normalization, com.fasterxml.jackson.databind.ObjectMapper mapper, org.apache.flink.formats.common.TimestampFormat timestampFormat, org.apache.flink.formats.json.JsonFormatOptions.MapNullKeyMode mapNullKeyMode, String mapNullKeyLiteral, boolean encodeDecimalAsPlainNumber)
Copyright © 2024. All rights reserved.