Class JdbcSourceConfigFactory

    • Field Detail

      • port

        protected int port
      • hostname

        protected String hostname
      • username

        protected String username
      • password

        protected String password
      • databaseList

        protected List<String> databaseList
      • includeSchemaChanges

        protected boolean includeSchemaChanges
      • closeIdleReaders

        protected boolean closeIdleReaders
      • distributionFactorUpper

        protected double distributionFactorUpper
      • distributionFactorLower

        protected double distributionFactorLower
      • splitSize

        protected int splitSize
      • splitMetaGroupSize

        protected int splitMetaGroupSize
      • fetchSize

        protected int fetchSize
      • serverTimeZone

        protected String serverTimeZone
      • connectTimeout

        protected java.time.Duration connectTimeout
      • connectMaxRetries

        protected int connectMaxRetries
      • connectionPoolSize

        protected int connectionPoolSize
      • dbzProperties

        protected Properties dbzProperties
      • chunkKeyColumn

        protected String chunkKeyColumn
      • skipSnapshotBackfill

        protected boolean skipSnapshotBackfill
      • scanNewlyAddedTableEnabled

        protected boolean scanNewlyAddedTableEnabled
      • assignUnboundedChunkFirst

        protected boolean assignUnboundedChunkFirst
      • releaseSnapshotMetadataEnabled

        protected boolean releaseSnapshotMetadataEnabled
    • Constructor Detail

      • JdbcSourceConfigFactory

        public JdbcSourceConfigFactory()
    • Method Detail

      • databaseList

        public JdbcSourceConfigFactory databaseList​(String... databaseList)
        An optional list of regular expressions that match database names to be monitored; any database name not included in the whitelist will be excluded from monitoring. By default all databases will be monitored.
      • tableList

        public JdbcSourceConfigFactory tableList​(String... tableList)
        An optional list of regular expressions that match fully-qualified table identifiers for tables to be monitored; any table not included in the list will be excluded from monitoring. Each identifier is of t、he form databaseName.tableName. By default the connector will monitor every non-system table in each monitored database.
      • serverTimeZone

        public JdbcSourceConfigFactory serverTimeZone​(String timeZone)
        The session time zone in database server, e.g. "America/Los_Angeles". It controls how the TIMESTAMP type converted to STRING. See more https://debezium.io/documentation/reference/1.9/connectors/mysql.html#mysql-temporal-types
      • splitSize

        public JdbcSourceConfigFactory splitSize​(int splitSize)
        The split size (number of rows) of table snapshot, captured tables are split into multiple splits when read the snapshot of table.
      • splitMetaGroupSize

        public JdbcSourceConfigFactory splitMetaGroupSize​(int splitMetaGroupSize)
        The group size of split meta, if the meta size exceeds the group size, the meta will be divided into multiple groups.
      • distributionFactorUpper

        public JdbcSourceConfigFactory distributionFactorUpper​(double distributionFactorUpper)
        The upper bound of split key evenly distribution factor, the factor is used to determine whether the table is evenly distribution or not.
      • distributionFactorLower

        public JdbcSourceConfigFactory distributionFactorLower​(double distributionFactorLower)
        The lower bound of split key evenly distribution factor, the factor is used to determine whether the table is evenly distribution or not.
      • fetchSize

        public JdbcSourceConfigFactory fetchSize​(int fetchSize)
        The maximum fetch size for per poll when read table snapshot.
      • connectTimeout

        public JdbcSourceConfigFactory connectTimeout​(java.time.Duration connectTimeout)
        The maximum time that the connector should wait after trying to connect to the database server before timing out.
      • connectionPoolSize

        public JdbcSourceConfigFactory connectionPoolSize​(int connectionPoolSize)
        The connection pool size.
      • connectMaxRetries

        public JdbcSourceConfigFactory connectMaxRetries​(int connectMaxRetries)
        The max retry times to get connection.
      • includeSchemaChanges

        public JdbcSourceConfigFactory includeSchemaChanges​(boolean includeSchemaChanges)
        Whether the SourceConfig should output the schema changes or not.
      • chunkKeyColumn

        public JdbcSourceConfigFactory chunkKeyColumn​(String chunkKeyColumn)
        The chunk key of table snapshot, captured tables are split into multiple chunks by the chunk key column when read the snapshot of table.
      • closeIdleReaders

        public JdbcSourceConfigFactory closeIdleReaders​(boolean closeIdleReaders)
        Whether to close idle readers at the end of the snapshot phase. This feature depends on FLIP-147: Support Checkpoints After Tasks Finished. The flink version is required to be greater than or equal to 1.14, and the configuration 'execution.checkpointing.checkpoints-after-tasks-finish.enabled' needs to be set to true.

        See more https://cwiki.apache.org/confluence/display/FLINK/FLIP-147%3A+Support+Checkpoints+After+Tasks+Finished.

      • skipSnapshotBackfill

        public JdbcSourceConfigFactory skipSnapshotBackfill​(boolean skipSnapshotBackfill)
        Whether to skip backfill in snapshot reading phase.

        If backfill is skipped, changes on captured tables during snapshot phase will be consumed later in stream reading phase instead of being merged into the snapshot.

        WARNING: Skipping backfill might lead to data inconsistency because some change log events happened within the snapshot phase might be replayed (only at-least-once semantic is promised). For example updating an already updated value in snapshot, or deleting an already deleted entry in snapshot. These replayed change log events should be handled specially.

      • scanNewlyAddedTableEnabled

        public JdbcSourceConfigFactory scanNewlyAddedTableEnabled​(boolean scanNewlyAddedTableEnabled)
        Whether the SourceConfig should scan the newly added tables or not.
      • assignUnboundedChunkFirst

        public JdbcSourceConfigFactory assignUnboundedChunkFirst​(boolean assignUnboundedChunkFirst)
        Whether to assign the unbounded chunks first during snapshot reading phase. Defaults to false.
      • releaseSnapshotMetadataEnabled

        public JdbcSourceConfigFactory releaseSnapshotMetadataEnabled​(boolean releaseSnapshotMetadataEnabled)
        Whether to release the snapshot split metadata held by the source coordinator once the stream split is assembled and checkpoint-covered. Defaults to false.