e-mhui commented on PR #7709:
URL: https://github.com/apache/inlong/pull/7709#issuecomment-1486222731
> @e-mhui `JdbcSourceEventDispatcher` package path of oracle-cdc is same
with cdc-base . I think this is not good. It will cause class conflict when
class load mutil cdc jar.
1. Inlong has multiple versions of dependencies for debezium. cdc-base
depends on version 1.5.4-final, but Oracle CDC depends on version 1.6.4-final.
The method `HistorizedSchema.storeOnlyCapturedTables()` is only available
in version 1.6.4-final. If we change it to use
`historizedSchema.storeOnlyMonitoredTables()` in version 1.5.4-final, it may
cause conflicts . Therefore, the method is overwritten in Oracle. After all
CDCs are upgraded to version 2.3, we can use `JdbcSourceEventDispatcher` in
cdc-base uniformly.
```java
@Override
public void dispatchSchemaChangeEvent(
TableId dataCollectionId, SchemaChangeEventEmitter
schemaChangeEventEmitter)
throws InterruptedException {
if (dataCollectionId != null &&
!filter.isIncluded(dataCollectionId)) {
// TODO `HistorizedSchema.storeOnlyCapturedTables` first
appeared in io.debezium.core: 1.6.4-final,
// which conflicts with io.debezium.core: 15.4-final of cdc-base,
// so we implement this method separately in the sub-module.
// if (historizedSchema == null ||
historizedSchema.storeOnlyCapturedTables()) {
if (historizedSchema == null ||
historizedSchema.storeOnlyMonitoredTables()) {
LOG.trace("Filtering schema change event for {}",
dataCollectionId);
return;
}
}
schemaChangeEventEmitter.emitSchemaChangeEvent(new
SchemaChangeEventReceiver());
}
```
2. If there are conflicts, I suggest resolving them using the shade.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]