Class MongoDBTableSource
- java.lang.Object
-
- org.apache.flink.cdc.connectors.mongodb.table.MongoDBTableSource
-
- All Implemented Interfaces:
org.apache.flink.table.connector.source.abilities.SupportsReadingMetadata,org.apache.flink.table.connector.source.DynamicTableSource,org.apache.flink.table.connector.source.ScanTableSource
public class MongoDBTableSource extends Object implements org.apache.flink.table.connector.source.ScanTableSource, org.apache.flink.table.connector.source.abilities.SupportsReadingMetadata
ADynamicTableSourcethat describes how to create a MongoDB change stream events source from a logical description.
-
-
Field Summary
Fields Modifier and Type Field Description protected List<String>metadataKeysMetadata that is appended at the end of a physical source row.protected org.apache.flink.table.types.DataTypeproducedDataTypeData type that describes the final output of the source.
-
Constructor Summary
Constructors Constructor Description MongoDBTableSource(org.apache.flink.table.catalog.ResolvedSchema physicalSchema, String scheme, String hosts, String username, String password, String database, String collection, String connectionOptions, StartupOptions startupOptions, Integer initialSnapshottingQueueSize, Integer initialSnapshottingMaxThreads, String initialSnapshottingPipeline, Integer batchSize, Integer pollMaxBatchSize, Integer pollAwaitTimeMillis, Integer heartbeatIntervalMillis, java.time.ZoneId localTimeZone, boolean enableParallelRead, Integer splitMetaGroupSize, Integer splitSizeMB, Integer samplesPerChunk, boolean closeIdlerReaders, boolean enableFullDocPrePostImage, boolean noCursorTimeout, boolean skipSnapshotBackfill, boolean scanNewlyAddedTableEnabled, boolean assignUnboundedChunkFirst, boolean releaseSnapshotMetadataEnabled, boolean sslEnabled, boolean sslInvalidHostnameAllowed, String sslKeyStore, String sslKeyStorePassword, String sslKeyStoreType, String sslTrustStore, String sslTrustStorePassword, String sslTrustStoreType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyReadableMetadata(List<String> metadataKeys, org.apache.flink.table.types.DataType producedDataType)StringasSummaryString()org.apache.flink.table.connector.source.DynamicTableSourcecopy()booleanequals(Object o)org.apache.flink.table.connector.ChangelogModegetChangelogMode()protected MetadataConverter[]getMetadataConverters()org.apache.flink.table.connector.source.ScanTableSource.ScanRuntimeProvidergetScanRuntimeProvider(org.apache.flink.table.connector.source.ScanTableSource.ScanContext scanContext)inthashCode()Map<String,org.apache.flink.table.types.DataType>listReadableMetadata()
-
-
-
Constructor Detail
-
MongoDBTableSource
public MongoDBTableSource(org.apache.flink.table.catalog.ResolvedSchema physicalSchema, String scheme, String hosts, @Nullable String username, @Nullable String password, @Nullable String database, @Nullable String collection, @Nullable String connectionOptions, StartupOptions startupOptions, @Nullable Integer initialSnapshottingQueueSize, @Nullable Integer initialSnapshottingMaxThreads, @Nullable String initialSnapshottingPipeline, @Nullable Integer batchSize, @Nullable Integer pollMaxBatchSize, @Nullable Integer pollAwaitTimeMillis, @Nullable Integer heartbeatIntervalMillis, java.time.ZoneId localTimeZone, boolean enableParallelRead, @Nullable Integer splitMetaGroupSize, @Nullable Integer splitSizeMB, @Nullable Integer samplesPerChunk, boolean closeIdlerReaders, boolean enableFullDocPrePostImage, boolean noCursorTimeout, boolean skipSnapshotBackfill, boolean scanNewlyAddedTableEnabled, boolean assignUnboundedChunkFirst, boolean releaseSnapshotMetadataEnabled, boolean sslEnabled, boolean sslInvalidHostnameAllowed, @Nullable String sslKeyStore, @Nullable String sslKeyStorePassword, String sslKeyStoreType, @Nullable String sslTrustStore, @Nullable String sslTrustStorePassword, String sslTrustStoreType)
-
-
Method Detail
-
getChangelogMode
public org.apache.flink.table.connector.ChangelogMode getChangelogMode()
- Specified by:
getChangelogModein interfaceorg.apache.flink.table.connector.source.ScanTableSource
-
getScanRuntimeProvider
public org.apache.flink.table.connector.source.ScanTableSource.ScanRuntimeProvider getScanRuntimeProvider(org.apache.flink.table.connector.source.ScanTableSource.ScanContext scanContext)
- Specified by:
getScanRuntimeProviderin interfaceorg.apache.flink.table.connector.source.ScanTableSource
-
getMetadataConverters
protected MetadataConverter[] getMetadataConverters()
-
listReadableMetadata
public Map<String,org.apache.flink.table.types.DataType> listReadableMetadata()
- Specified by:
listReadableMetadatain interfaceorg.apache.flink.table.connector.source.abilities.SupportsReadingMetadata
-
applyReadableMetadata
public void applyReadableMetadata(List<String> metadataKeys, org.apache.flink.table.types.DataType producedDataType)
- Specified by:
applyReadableMetadatain interfaceorg.apache.flink.table.connector.source.abilities.SupportsReadingMetadata
-
copy
public org.apache.flink.table.connector.source.DynamicTableSource copy()
- Specified by:
copyin interfaceorg.apache.flink.table.connector.source.DynamicTableSource
-
asSummaryString
public String asSummaryString()
- Specified by:
asSummaryStringin interfaceorg.apache.flink.table.connector.source.DynamicTableSource
-
-