Class FlussSplitReader
- java.lang.Object
-
- org.apache.flink.cdc.connectors.fluss.source.reader.FlussSplitReader
-
- All Implemented Interfaces:
AutoCloseable,org.apache.flink.connector.base.source.reader.splitreader.SplitReader<FlussSourceRecord,FlussSplitBase>
public class FlussSplitReader extends Object implements org.apache.flink.connector.base.source.reader.splitreader.SplitReader<FlussSourceRecord,FlussSplitBase>
ASplitReaderimplementation for Fluss. It reads change log records from Fluss log scanners and wraps them asFlussSourceRecords, which include the table context (table path and row type) needed for downstream deserialization.For each table, a single Fluss
LogScanneris shared across all bucket-level splits.
-
-
Constructor Summary
Constructors Constructor Description FlussSplitReader(org.apache.fluss.config.Configuration flussConfig, WrapperFlussMetricRegistry metricRegistry, FlussSourceReaderMetrics sourceReaderMetrics)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()org.apache.flink.connector.base.source.reader.RecordsWithSplitIds<FlussSourceRecord>fetch()protected org.apache.fluss.client.table.TablegetOrCreateTable(org.apache.fluss.metadata.TablePath tablePath)protected List<String>getPartitionKeyNames(org.apache.fluss.metadata.TablePath tablePath)protected List<String>getPrimaryKeyNames(org.apache.fluss.metadata.TablePath tablePath)protected org.apache.fluss.types.RowTypegetRowType(org.apache.fluss.metadata.TablePath tablePath)voidhandleSplitsChanges(org.apache.flink.connector.base.source.reader.splitreader.SplitsChange<FlussSplitBase> splitsChanges)voidwakeUp()
-
-
-
Constructor Detail
-
FlussSplitReader
public FlussSplitReader(org.apache.fluss.config.Configuration flussConfig, WrapperFlussMetricRegistry metricRegistry, FlussSourceReaderMetrics sourceReaderMetrics)
-
-
Method Detail
-
fetch
public org.apache.flink.connector.base.source.reader.RecordsWithSplitIds<FlussSourceRecord> fetch() throws IOException
- Specified by:
fetchin interfaceorg.apache.flink.connector.base.source.reader.splitreader.SplitReader<FlussSourceRecord,FlussSplitBase>- Throws:
IOException
-
handleSplitsChanges
public void handleSplitsChanges(org.apache.flink.connector.base.source.reader.splitreader.SplitsChange<FlussSplitBase> splitsChanges)
- Specified by:
handleSplitsChangesin interfaceorg.apache.flink.connector.base.source.reader.splitreader.SplitReader<FlussSourceRecord,FlussSplitBase>
-
getOrCreateTable
protected org.apache.fluss.client.table.Table getOrCreateTable(org.apache.fluss.metadata.TablePath tablePath)
-
getRowType
protected org.apache.fluss.types.RowType getRowType(org.apache.fluss.metadata.TablePath tablePath)
-
getPrimaryKeyNames
protected List<String> getPrimaryKeyNames(org.apache.fluss.metadata.TablePath tablePath)
-
getPartitionKeyNames
protected List<String> getPartitionKeyNames(org.apache.fluss.metadata.TablePath tablePath)
-
wakeUp
public void wakeUp()
- Specified by:
wakeUpin interfaceorg.apache.flink.connector.base.source.reader.splitreader.SplitReader<FlussSourceRecord,FlussSplitBase>
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-