|
76 | 76 | import static org.apache.flink.cdc.connectors.mysql.source.MySqlDataSourceOptions.PASSWORD; |
77 | 77 | import static org.apache.flink.cdc.connectors.mysql.source.MySqlDataSourceOptions.PORT; |
78 | 78 | import static org.apache.flink.cdc.connectors.mysql.source.MySqlDataSourceOptions.SCAN_BINLOG_NEWLY_ADDED_TABLE_ENABLED; |
| 79 | +import static org.apache.flink.cdc.connectors.mysql.source.MySqlDataSourceOptions.SCAN_BINLOG_SKIP_UNSUBSCRIBED_TABLES_ENABLED; |
79 | 80 | import static org.apache.flink.cdc.connectors.mysql.source.MySqlDataSourceOptions.SCAN_INCREMENTAL_CLOSE_IDLE_READER_ENABLED; |
80 | 81 | import static org.apache.flink.cdc.connectors.mysql.source.MySqlDataSourceOptions.SCAN_INCREMENTAL_SNAPSHOT_BACKFILL_SKIP; |
81 | 82 | import static org.apache.flink.cdc.connectors.mysql.source.MySqlDataSourceOptions.SCAN_INCREMENTAL_SNAPSHOT_CHUNK_KEY_COLUMN; |
@@ -167,6 +168,8 @@ public DataSource createDataSource(Context context) { |
167 | 168 | boolean useLegacyJsonFormat = config.get(USE_LEGACY_JSON_FORMAT); |
168 | 169 | boolean isAssignUnboundedChunkFirst = |
169 | 170 | config.get(SCAN_INCREMENTAL_SNAPSHOT_UNBOUNDED_CHUNK_FIRST_ENABLED); |
| 171 | + boolean skipBinlogDeserializationOfUnsubscribedTables = |
| 172 | + config.get(SCAN_BINLOG_SKIP_UNSUBSCRIBED_TABLES_ENABLED); |
170 | 173 |
|
171 | 174 | validateIntegerOption(SCAN_INCREMENTAL_SNAPSHOT_CHUNK_SIZE, splitSize, 1); |
172 | 175 | validateIntegerOption(CHUNK_META_GROUP_SIZE, splitMetaGroupSize, 1); |
@@ -220,6 +223,8 @@ public DataSource createDataSource(Context context) { |
220 | 223 | .treatTinyInt1AsBoolean(treatTinyInt1AsBoolean) |
221 | 224 | .useLegacyJsonFormat(useLegacyJsonFormat) |
222 | 225 | .assignUnboundedChunkFirst(isAssignUnboundedChunkFirst) |
| 226 | + .skipBinlogDeserializationOfUnsubscribedTables( |
| 227 | + skipBinlogDeserializationOfUnsubscribedTables) |
223 | 228 | .skipSnapshotBackfill(skipSnapshotBackfill); |
224 | 229 |
|
225 | 230 | List<TableId> tableIds = MySqlSchemaUtils.listTables(configFactory.createConfig(0), null); |
@@ -351,6 +356,7 @@ public Set<ConfigOption<?>> optionalOptions() { |
351 | 356 | options.add(CHUNK_KEY_EVEN_DISTRIBUTION_FACTOR_UPPER_BOUND); |
352 | 357 | options.add(CHUNK_KEY_EVEN_DISTRIBUTION_FACTOR_LOWER_BOUND); |
353 | 358 | options.add(SCAN_BINLOG_NEWLY_ADDED_TABLE_ENABLED); |
| 359 | + options.add(SCAN_BINLOG_SKIP_UNSUBSCRIBED_TABLES_ENABLED); |
354 | 360 | options.add(METADATA_LIST); |
355 | 361 | options.add(INCLUDE_COMMENTS_ENABLED); |
356 | 362 | options.add(USE_LEGACY_JSON_FORMAT); |
|
0 commit comments