forked from apache/flink-cdc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cdc-base] Improve the Incremental Snapshot Interfaces
- Loading branch information
1 parent
31c6659
commit 3ef4f2f
Showing
110 changed files
with
2,049 additions
and
5,550 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 95 additions & 0 deletions
95
flink-cdc-base/src/main/java/com/ververica/cdc/connectors/base/config/BaseSourceConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.ververica.cdc.connectors.base.config; | ||
|
||
import com.ververica.cdc.connectors.base.options.StartupOptions; | ||
import com.ververica.cdc.connectors.base.source.JdbcIncrementalSource; | ||
import io.debezium.config.Configuration; | ||
|
||
import java.util.Properties; | ||
|
||
/** A basic Source configuration which is used by {@link JdbcIncrementalSource}. */ | ||
public abstract class BaseSourceConfig implements SourceConfig { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
protected final StartupOptions startupOptions; | ||
protected final int splitSize; | ||
protected final int splitMetaGroupSize; | ||
protected final double distributionFactorUpper; | ||
protected final double distributionFactorLower; | ||
protected final boolean includeSchemaChanges; | ||
|
||
// -------------------------------------------------------------------------------------------- | ||
// Debezium Configurations | ||
// -------------------------------------------------------------------------------------------- | ||
protected final Properties dbzProperties; | ||
protected transient Configuration dbzConfiguration; | ||
|
||
public BaseSourceConfig( | ||
StartupOptions startupOptions, | ||
int splitSize, | ||
int splitMetaGroupSize, | ||
double distributionFactorUpper, | ||
double distributionFactorLower, | ||
boolean includeSchemaChanges, | ||
Properties dbzProperties, | ||
Configuration dbzConfiguration) { | ||
this.startupOptions = startupOptions; | ||
this.splitSize = splitSize; | ||
this.splitMetaGroupSize = splitMetaGroupSize; | ||
this.distributionFactorUpper = distributionFactorUpper; | ||
this.distributionFactorLower = distributionFactorLower; | ||
this.includeSchemaChanges = includeSchemaChanges; | ||
this.dbzProperties = dbzProperties; | ||
this.dbzConfiguration = dbzConfiguration; | ||
} | ||
|
||
public StartupOptions getStartupOptions() { | ||
return startupOptions; | ||
} | ||
|
||
public int getSplitSize() { | ||
return splitSize; | ||
} | ||
|
||
public int getSplitMetaGroupSize() { | ||
return splitMetaGroupSize; | ||
} | ||
|
||
public double getDistributionFactorUpper() { | ||
return distributionFactorUpper; | ||
} | ||
|
||
public double getDistributionFactorLower() { | ||
return distributionFactorLower; | ||
} | ||
|
||
public boolean isIncludeSchemaChanges() { | ||
return includeSchemaChanges; | ||
} | ||
|
||
public Properties getDbzProperties() { | ||
return dbzProperties; | ||
} | ||
|
||
public Configuration getDbzConfiguration() { | ||
return Configuration.from(dbzProperties); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.