Skip to content

Commit

Permalink
Move batchSizeWaitName config to correct class (#521)
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailsimsek authored Feb 24, 2025
1 parent 46d536d commit 32b61af
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.debezium.server.iceberg;

import io.debezium.server.iceberg.batchsizewait.BatchSizeWaitConfig;
import io.quarkus.runtime.annotations.ConfigRoot;
import io.smallrye.config.ConfigMapping;
import io.smallrye.config.WithDefault;
Expand All @@ -17,6 +18,9 @@ public interface GlobalConfig {
@WithParentName
DebeziumConfig debezium();

@WithParentName
BatchSizeWaitConfig batch();

@WithName("quarkus.log.level")
@WithDefault("INFO")
Logger.Level quarkusLogLevel();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void connect() {
config.iceberg().icebergConfigs().forEach(this.hadoopConf::set);

icebergCatalog = CatalogUtil.buildIcebergCatalog(config.iceberg().catalogName(), config.iceberg().icebergConfigs(), hadoopConf);
batchSizeWait = IcebergUtil.selectInstance(batchSizeWaitInstances, config.iceberg().batchSizeWaitName());
batchSizeWait = IcebergUtil.selectInstance(batchSizeWaitInstances, config.batch().batchSizeWaitName());
batchSizeWait.initizalize();

// configure and set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ public interface IcebergConfig {
@WithDefault("true")
boolean createIdentifierFields();

@WithName("debezium.sink.batch.batch-size-wait")
@WithDefault("NoBatchSizeWait")
String batchSizeWaitName();

@WithName("debezium.sink.iceberg." + DEFAULT_FILE_FORMAT)
@WithDefault(DEFAULT_FILE_FORMAT_DEFAULT)
String writeFormat();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void connect() {
// load table
eventTable = icebergCatalog.loadTable(tableIdentifier);

batchSizeWait = IcebergUtil.selectInstance(batchSizeWaitInstances, config.iceberg().batchSizeWaitName());
batchSizeWait = IcebergUtil.selectInstance(batchSizeWaitInstances, config.batch().batchSizeWaitName());
batchSizeWait.initizalize();

// configure and set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ public interface BatchSizeWaitConfig {
@WithDefault("10000")
int batchSizeWaitWaitIntervalMs();

@WithName("debezium.sink.batch.batch-size-wait")
@WithDefault("NoBatchSizeWait")
String batchSizeWaitName();

}

0 comments on commit 32b61af

Please sign in to comment.