Class MaxwellJsonDeserializationSchema
- java.lang.Object
-
- org.apache.flink.formats.json.maxwell.MaxwellJsonDeserializationSchema
-
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.table.data.RowData>,org.apache.flink.api.java.typeutils.ResultTypeQueryable<org.apache.flink.table.data.RowData>
public class MaxwellJsonDeserializationSchema extends Object implements org.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.table.data.RowData>
Deserialization schema from Maxwell JSON to Flink Table/SQL internal data structureRowData. The deserialization schema knows Maxwell's schema definition and can extract the database data and convert intoRowDatawithRowKind.Deserializes a
byte[]message as a JSON object and reads the specified fields.Failures during deserialization are forwarded as wrapped IOExceptions.
- See Also:
- Maxwell, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MaxwellJsonDeserializationSchema(org.apache.flink.table.types.DataType physicalDataType, List<org.apache.flink.formats.json.maxwell.MaxwellJsonDecodingFormat.ReadableMetadata> requestedMetadata, org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> producedTypeInfo, boolean ignoreParseErrors, org.apache.flink.formats.common.TimestampFormat timestampFormat)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.flink.table.data.RowDatadeserialize(byte[] message)voiddeserialize(byte[] message, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out)booleanequals(Object o)org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData>getProducedType()inthashCode()booleanisEndOfStream(org.apache.flink.table.data.RowData nextElement)voidopen(org.apache.flink.api.common.serialization.DeserializationSchema.InitializationContext context)
-
-
-
Constructor Detail
-
MaxwellJsonDeserializationSchema
public MaxwellJsonDeserializationSchema(org.apache.flink.table.types.DataType physicalDataType, List<org.apache.flink.formats.json.maxwell.MaxwellJsonDecodingFormat.ReadableMetadata> requestedMetadata, org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> producedTypeInfo, boolean ignoreParseErrors, org.apache.flink.formats.common.TimestampFormat timestampFormat)
-
-
Method Detail
-
open
public void open(org.apache.flink.api.common.serialization.DeserializationSchema.InitializationContext context) throws Exception- Specified by:
openin interfaceorg.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.table.data.RowData>- Throws:
Exception
-
deserialize
public org.apache.flink.table.data.RowData deserialize(byte[] message) throws IOException- Specified by:
deserializein interfaceorg.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.table.data.RowData>- Throws:
IOException
-
deserialize
public void deserialize(byte[] message, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out) throws IOException- Specified by:
deserializein interfaceorg.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.table.data.RowData>- Throws:
IOException
-
isEndOfStream
public boolean isEndOfStream(org.apache.flink.table.data.RowData nextElement)
- Specified by:
isEndOfStreamin interfaceorg.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.table.data.RowData>
-
getProducedType
public org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> getProducedType()
- Specified by:
getProducedTypein interfaceorg.apache.flink.api.java.typeutils.ResultTypeQueryable<org.apache.flink.table.data.RowData>
-
-