Interface FlussDeserializer<T>
-
- Type Parameters:
T- The type of output records produced by this deserializer.
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
FlussRecordDeserializer
public interface FlussDeserializer<T> extends Serializable
A generic deserializer interface for converting FlussScanRecords into output records of typeT. This interface is intentionally not bound to any specific CDC type, allowing the Fluss source to be reused with different output types.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description List<T>deserialize(FlussSourceRecord element, org.apache.fluss.metadata.TablePath tablePath)Deserializes a FlussScanRecordinto a list of output records.default voidremoveState(org.apache.fluss.metadata.TablePath tablePath)Removes all state retained for an unsubscribed table.default List<T>restoreState(org.apache.fluss.metadata.TablePath tablePath, int schemaId, org.apache.fluss.types.RowType rowType)Restores internal state (e.g., schema caches) from a recovered split.
-
-
-
Method Detail
-
deserialize
List<T> deserialize(FlussSourceRecord element, org.apache.fluss.metadata.TablePath tablePath)
Deserializes a FlussScanRecordinto a list of output records.- Parameters:
element- The Fluss scan record to deserialize.tablePath- The Fluss table path (database.table).- Returns:
- A list of deserialized output records.
-
restoreState
default List<T> restoreState(org.apache.fluss.metadata.TablePath tablePath, int schemaId, org.apache.fluss.types.RowType rowType)
Restores internal state (e.g., schema caches) from a recovered split. Called during split initialization to enable correct schema change detection after failover.The default implementation is a no-op. Override in subclasses that maintain schema caches.
- Parameters:
tablePath- The Fluss table path.schemaId- The schema ID from the checkpointed split.rowType- TheRowTypecorresponding to the schemaId.
-
removeState
default void removeState(org.apache.fluss.metadata.TablePath tablePath)
Removes all state retained for an unsubscribed table.
-
-