public final class ChangelogCsvDeserializer extends Object implements DeserializationSchema<RowData>
ChangelogCsvDeserializer
contains a simple parsing logic for converting bytes into
Row
of Integer
and String
with a RowKind
.
The final conversion step converts those into internal data structures.
DeserializationSchema.InitializationContext
Constructor and Description |
---|
ChangelogCsvDeserializer(List<LogicalType> parsingTypes,
DynamicTableSource.DataStructureConverter converter,
TypeInformation<RowData> producedTypeInfo,
String columnDelimiter) |
Modifier and Type | Method and Description |
---|---|
RowData |
deserialize(byte[] message)
Deserializes the byte message.
|
TypeInformation<RowData> |
getProducedType()
Gets the data type (as a
TypeInformation ) produced by this function or input format. |
boolean |
isEndOfStream(RowData nextElement)
Method to decide whether the element signals the end of the stream.
|
void |
open(DeserializationSchema.InitializationContext context)
Initialization method for the schema.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deserialize
public ChangelogCsvDeserializer(List<LogicalType> parsingTypes, DynamicTableSource.DataStructureConverter converter, TypeInformation<RowData> producedTypeInfo, String columnDelimiter)
public TypeInformation<RowData> getProducedType()
ResultTypeQueryable
TypeInformation
) produced by this function or input format.getProducedType
in interface ResultTypeQueryable<RowData>
public void open(DeserializationSchema.InitializationContext context)
DeserializationSchema
DeserializationSchema.deserialize(byte[])
and thus suitable for one time setup work.
The provided DeserializationSchema.InitializationContext
can be used to access additional features such
as e.g. registering user metrics.
open
in interface DeserializationSchema<RowData>
context
- Contextual information that can be used during initialization.public RowData deserialize(byte[] message)
DeserializationSchema
deserialize
in interface DeserializationSchema<RowData>
message
- The message, as a byte array.public boolean isEndOfStream(RowData nextElement)
DeserializationSchema
isEndOfStream
in interface DeserializationSchema<RowData>
nextElement
- The element to test for the end-of-stream signal.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.