From 1be890dd49589154cc3f331a6839e7daf90138bd Mon Sep 17 00:00:00 2001 From: Vaibhav Kushwaha Date: Tue, 2 Jul 2024 07:16:24 +0530 Subject: [PATCH 01/15] added yb namespace to the postgres package --- .../{ => yb}/postgresql/ChangeEvent.java | 2 +- .../LogicalDecodingMessageFilter.java | 2 +- .../LogicalDecodingMessageMonitor.java | 4 +- .../connector/{ => yb}/postgresql/Module.java | 2 +- .../postgresql/PGTableSchemaBuilder.java | 2 +- .../connector/{ => yb}/postgresql/PgOid.java | 2 +- .../{ => yb}/postgresql/PostgisGeometry.java | 2 +- .../PostgresChangeEventSourceCoordinator.java | 8 ++-- .../PostgresChangeEventSourceFactory.java | 12 +++--- .../PostgresChangeRecordEmitter.java | 9 ++-- .../postgresql/PostgresConnector.java | 4 +- .../postgresql/PostgresConnectorConfig.java | 24 +++++------ .../postgresql/PostgresConnectorTask.java | 16 ++++---- .../postgresql/PostgresErrorHandler.java | 2 +- .../postgresql/PostgresEventDispatcher.java | 6 +-- .../PostgresEventMetadataProvider.java | 2 +- .../postgresql/PostgresOffsetContext.java | 10 ++--- .../postgresql/PostgresPartition.java | 2 +- .../{ => yb}/postgresql/PostgresSchema.java | 8 ++-- .../postgresql/PostgresSchemaFactory.java | 4 +- ...dIncrementalSnapshotChangeEventSource.java | 4 +- .../PostgresSnapshotChangeEventSource.java | 17 ++++---- .../PostgresSourceInfoStructMaker.java | 2 +- .../PostgresStreamingChangeEventSource.java | 23 +++++------ .../postgresql/PostgresTaskContext.java | 8 ++-- .../postgresql/PostgresTopicSelector.java | 2 +- .../{ => yb}/postgresql/PostgresType.java | 2 +- .../postgresql/PostgresValueConverter.java | 8 ++-- .../{ => yb}/postgresql/RecordsProducer.java | 2 +- .../postgresql/ReplicaIdentityMapper.java | 4 +- .../{ => yb}/postgresql/SourceInfo.java | 6 +-- .../{ => yb}/postgresql/TypeRegistry.java | 4 +- .../UnchangedToastedPlaceholder.java | 2 +- ...hangedToastedReplicationMessageColumn.java | 10 +++-- .../{ => yb}/postgresql/YBHeartbeatImpl.java | 2 +- .../YBSnapshotChangeRecordEmitter.java | 4 +- .../{ => yb}/postgresql/YugabyteDBServer.java | 2 +- .../connection/AbstractColumnValue.java | 15 ++++--- .../connection/AbstractMessageDecoder.java | 9 ++-- .../AbstractReplicationMessageColumn.java | 4 +- .../postgresql/connection/DateTimeFormat.java | 5 +-- .../connection/LogicalDecodingMessage.java | 2 +- .../{ => yb}/postgresql/connection/Lsn.java | 2 +- .../postgresql/connection/MessageDecoder.java | 7 ++-- .../connection/MessageDecoderContext.java | 6 +-- .../connection/PostgresConnection.java | 17 ++++---- .../PostgresDefaultValueConverter.java | 8 ++-- .../PostgresReplicationConnection.java | 12 +++--- .../connection/ReplicaIdentityInfo.java | 2 +- .../connection/ReplicationConnection.java | 10 ++--- .../connection/ReplicationMessage.java | 15 ++++--- ...ReplicationMessageColumnValueResolver.java | 12 +++--- .../connection/ReplicationStream.java | 2 +- .../postgresql/connection/ServerInfo.java | 4 +- .../connection/TransactionMessage.java | 2 +- .../connection/WalPositionLocator.java | 9 ++-- .../connection/pgoutput/ColumnMetaData.java | 6 +-- .../pgoutput/PgOutputColumnValue.java | 6 +-- .../pgoutput/PgOutputMessageDecoder.java | 40 +++++++++--------- .../pgoutput/PgOutputRelationMetaData.java | 2 +- .../pgoutput/PgOutputReplicationMessage.java | 14 +++---- .../PgOutputTruncateReplicationMessage.java | 2 +- .../pgproto/PgProtoColumnValue.java | 20 ++++----- .../pgproto/PgProtoMessageDecoder.java | 8 ++-- .../pgproto/PgProtoReplicationMessage.java | 20 ++++----- .../converters/PostgresCloudEventsMaker.java | 2 +- .../PostgresCloudEventsProvider.java | 4 +- .../converters/PostgresRecordParser.java | 2 +- .../{ => yb}/postgresql/data/Ltree.java | 5 +-- .../metadata/PostgresConnectorMetadata.java | 8 ++-- .../PostgresConnectorMetadataProvider.java | 2 +- .../PostgresTransactionMonitor.java | 4 +- .../DebeziumPostgresConnectRestExtension.java | 2 +- .../DebeziumPostgresConnectorResource.java | 6 +-- .../snapshot/AlwaysSnapshotter.java | 2 +- .../snapshot/InitialOnlySnapshotter.java | 8 ++-- .../snapshot/InitialSnapshotter.java | 8 ++-- .../postgresql/snapshot/NeverSnapshotter.java | 10 ++--- .../snapshot/QueryingSnapshotter.java | 14 +++---- .../snapshot/SnapshotterWrapper.java | 10 ++--- .../{ => yb}/postgresql/spi/OffsetState.java | 4 +- .../postgresql/spi/SlotCreationResult.java | 4 +- .../{ => yb}/postgresql/spi/SlotState.java | 4 +- .../{ => yb}/postgresql/spi/Snapshotter.java | 4 +- .../AbstractTimescaleDbMetadata.java | 2 +- .../QueryInformationSchemaMetadata.java | 4 +- .../transforms/timescaledb/TimescaleDb.java | 4 +- .../TimescaleDbConfigDefinition.java | 2 +- .../timescaledb/TimescaleDbMetadata.java | 2 +- .../transforms/yugabytedb/Pair.java | 2 +- .../yugabytedb/YBExtractNewRecordState.java | 2 +- ...ebezium.converters.spi.CloudEventsProvider | 2 +- ...ebezium.metadata.ConnectorMetadataProvider | 2 +- ...he.kafka.connect.rest.ConnectRestExtension | 2 +- ...pache.kafka.connect.source.SourceConnector | 2 +- ...he.kafka.connect.transforms.Transformation | 2 +- .../AbstractRecordsProducerTest.java | 7 ++-- .../postgresql/BlockingSnapshotIT.java | 4 +- .../postgresql/CloudEventsConverterIT.java | 4 +- .../CustomLifecycleHookTestSnapshot.java | 4 +- .../CustomPartialTableTestSnapshot.java | 2 +- .../CustomPostgresSourceInfoStructMaker.java | 4 +- .../CustomStartFromStreamingTestSnapshot.java | 4 +- .../postgresql/CustomTestSnapshot.java | 11 ++--- .../postgresql/CustomTypeEncodingTest.java | 2 +- .../{ => yb}/postgresql/DebeziumEngineIT.java | 2 +- .../postgresql/DecoderDifferences.java | 2 +- .../{ => yb}/postgresql/DomainTypesIT.java | 4 +- .../{ => yb}/postgresql/FieldTest.java | 3 +- .../postgresql/IncrementalSnapshotIT.java | 4 +- .../postgresql/LogicalDecodingMessageIT.java | 8 ++-- .../{ => yb}/postgresql/NotificationsIT.java | 2 +- .../postgresql/OutboxEventRouterIT.java | 4 +- .../PostgresConnectorConfigDefTest.java | 2 +- .../postgresql/PostgresConnectorIT.java | 34 +++++++-------- .../postgresql/PostgresConnectorTaskIT.java | 6 +-- .../PostgresDefaultValueConverterIT.java | 8 ++-- .../postgresql/PostgresErrorHandlerTest.java | 4 +- .../postgresql/PostgresMetricsIT.java | 4 +- .../{ => yb}/postgresql/PostgresMoneyIT.java | 4 +- .../postgresql/PostgresOffsetContextTest.java | 4 +- .../postgresql/PostgresPartitionTest.java | 3 +- .../PostgresReselectColumnsProcessorIT.java | 4 +- .../{ => yb}/postgresql/PostgresSchemaIT.java | 8 ++-- .../postgresql/PostgresShutdownIT.java | 6 +-- ...gresSkipMessagesWithoutChangeConfigIT.java | 4 +- .../{ => yb}/postgresql/PublicGeometryIT.java | 17 ++++---- .../RecordsSnapshotParallelProducerIT.java | 2 +- .../postgresql/RecordsSnapshotProducerIT.java | 8 ++-- .../postgresql/RecordsStreamProducerIT.java | 41 +++++++++---------- .../ReplicaIdentityTestMapperTest.java | 5 ++- .../{ => yb}/postgresql/SignalsIT.java | 6 +-- .../SnapshotWithOverridesProducerIT.java | 6 +-- .../{ => yb}/postgresql/SourceInfoTest.java | 5 ++- .../postgresql/TablesWithoutPrimaryKeyIT.java | 4 +- .../{ => yb}/postgresql/TestHelper.java | 14 +++---- .../postgresql/TransactionMetadataIT.java | 6 +-- .../{ => yb}/postgresql/YBVerifyRecord.java | 2 +- .../postgresql/YugabyteReplicaIdentityIT.java | 6 +-- .../connection/ISODateTimeFormatTest.java | 3 +- .../connection/PostgresConnectionIT.java | 4 +- .../PostgresDefaultValueConverterIT.java | 12 +++--- .../connection/ReplicationConnectionIT.java | 12 +++--- .../PostgresDatabaseVersionResolver.java | 6 +-- ...pTestDependingOnDecoderPluginNameRule.java | 4 +- .../junit/SkipWhenDecoderPluginNameIs.java | 2 +- .../junit/SkipWhenDecoderPluginNameIsNot.java | 2 +- .../DebeziumPostgresConnectorResourceIT.java | 10 +++-- ...PostgresConnectorResourceNoDatabaseIT.java | 8 ++-- .../postgresql/spi/CustomActionProvider.java | 2 +- .../transforms/timescaledb/TestMetadata.java | 3 +- .../timescaledb/TimescaleDbDatabaseTest.java | 12 +++--- .../timescaledb/TimescaleDbTest.java | 2 +- ...peline.signal.actions.SignalActionProvider | 2 +- .../src/test/resources/logback-test.xml | 2 +- 155 files changed, 495 insertions(+), 492 deletions(-) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/ChangeEvent.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/LogicalDecodingMessageFilter.java (95%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/LogicalDecodingMessageMonitor.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/Module.java (94%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/PGTableSchemaBuilder.java (99%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/PgOid.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/PostgisGeometry.java (98%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/PostgresChangeEventSourceCoordinator.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/PostgresChangeEventSourceFactory.java (94%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/PostgresChangeRecordEmitter.java (98%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/PostgresConnector.java (98%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/PostgresConnectorConfig.java (98%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/PostgresConnectorTask.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/PostgresErrorHandler.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/PostgresEventDispatcher.java (94%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/PostgresEventMetadataProvider.java (98%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/PostgresOffsetContext.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/PostgresPartition.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/PostgresSchema.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/PostgresSchemaFactory.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/PostgresSignalBasedIncrementalSnapshotChangeEventSource.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/PostgresSnapshotChangeEventSource.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/PostgresSourceInfoStructMaker.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/PostgresStreamingChangeEventSource.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/PostgresTaskContext.java (95%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/PostgresTopicSelector.java (94%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/PostgresType.java (99%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/PostgresValueConverter.java (99%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/RecordsProducer.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/ReplicaIdentityMapper.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/SourceInfo.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/TypeRegistry.java (99%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/UnchangedToastedPlaceholder.java (98%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/UnchangedToastedReplicationMessageColumn.java (93%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/YBHeartbeatImpl.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/YBSnapshotChangeRecordEmitter.java (89%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/YugabyteDBServer.java (85%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/AbstractColumnValue.java (93%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/AbstractMessageDecoder.java (84%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/AbstractReplicationMessageColumn.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/DateTimeFormat.java (98%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/LogicalDecodingMessage.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/Lsn.java (98%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/MessageDecoder.java (85%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/MessageDecoderContext.java (78%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/PostgresConnection.java (98%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/PostgresDefaultValueConverter.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/PostgresReplicationConnection.java (99%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/ReplicaIdentityInfo.java (98%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/ReplicationConnection.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/ReplicationMessage.java (90%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/ReplicationMessageColumnValueResolver.java (92%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/ReplicationStream.java (98%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/ServerInfo.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/TransactionMessage.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/WalPositionLocator.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/pgoutput/ColumnMetaData.java (95%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/pgoutput/PgOutputColumnValue.java (87%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/pgoutput/PgOutputMessageDecoder.java (95%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/pgoutput/PgOutputRelationMetaData.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/pgoutput/PgOutputReplicationMessage.java (82%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/pgoutput/PgOutputTruncateReplicationMessage.java (92%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/pgproto/PgProtoColumnValue.java (94%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/pgproto/PgProtoMessageDecoder.java (91%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/connection/pgproto/PgProtoReplicationMessage.java (85%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/converters/PostgresCloudEventsMaker.java (95%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/converters/PostgresCloudEventsProvider.java (91%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/converters/PostgresRecordParser.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/data/Ltree.java (90%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/metadata/PostgresConnectorMetadata.java (74%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/metadata/PostgresConnectorMetadataProvider.java (89%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/pipeline/txmetadata/PostgresTransactionMonitor.java (94%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/rest/DebeziumPostgresConnectRestExtension.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/rest/DebeziumPostgresConnectorResource.java (94%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/snapshot/AlwaysSnapshotter.java (91%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/snapshot/InitialOnlySnapshotter.java (83%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/snapshot/InitialSnapshotter.java (84%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/snapshot/NeverSnapshotter.java (83%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/snapshot/QueryingSnapshotter.java (90%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/snapshot/SnapshotterWrapper.java (74%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/spi/OffsetState.java (93%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/spi/SlotCreationResult.java (91%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/spi/SlotState.java (93%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/spi/Snapshotter.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/transforms/timescaledb/AbstractTimescaleDbMetadata.java (92%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/transforms/timescaledb/QueryInformationSchemaMetadata.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/transforms/timescaledb/TimescaleDb.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/transforms/timescaledb/TimescaleDbConfigDefinition.java (95%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/transforms/timescaledb/TimescaleDbMetadata.java (94%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/transforms/yugabytedb/Pair.java (94%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{ => yb}/postgresql/transforms/yugabytedb/YBExtractNewRecordState.java (98%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/AbstractRecordsProducerTest.java (99%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/BlockingSnapshotIT.java (97%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/CloudEventsConverterIT.java (97%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/CustomLifecycleHookTestSnapshot.java (87%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/CustomPartialTableTestSnapshot.java (93%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/CustomPostgresSourceInfoStructMaker.java (89%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/CustomStartFromStreamingTestSnapshot.java (74%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/CustomTestSnapshot.java (83%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/CustomTypeEncodingTest.java (95%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/DebeziumEngineIT.java (99%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/DecoderDifferences.java (97%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/DomainTypesIT.java (96%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/FieldTest.java (77%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/IncrementalSnapshotIT.java (99%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/LogicalDecodingMessageIT.java (97%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/NotificationsIT.java (97%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/OutboxEventRouterIT.java (97%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/PostgresConnectorConfigDefTest.java (98%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/PostgresConnectorIT.java (99%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/PostgresConnectorTaskIT.java (91%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/PostgresDefaultValueConverterIT.java (96%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/PostgresErrorHandlerTest.java (93%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/PostgresMetricsIT.java (99%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/PostgresMoneyIT.java (98%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/PostgresOffsetContextTest.java (92%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/PostgresPartitionTest.java (84%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/PostgresReselectColumnsProcessorIT.java (97%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/PostgresSchemaIT.java (99%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/PostgresShutdownIT.java (97%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/PostgresSkipMessagesWithoutChangeConfigIT.java (98%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/PublicGeometryIT.java (89%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/RecordsSnapshotParallelProducerIT.java (95%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/RecordsSnapshotProducerIT.java (99%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/RecordsStreamProducerIT.java (99%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/ReplicaIdentityTestMapperTest.java (91%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/SignalsIT.java (98%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/SnapshotWithOverridesProducerIT.java (93%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/SourceInfoTest.java (92%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/TablesWithoutPrimaryKeyIT.java (98%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/TestHelper.java (97%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/TransactionMetadataIT.java (96%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/YBVerifyRecord.java (96%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/YugabyteReplicaIdentityIT.java (98%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/connection/ISODateTimeFormatTest.java (98%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/connection/PostgresConnectionIT.java (99%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/connection/PostgresDefaultValueConverterIT.java (92%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/connection/ReplicationConnectionIT.java (98%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/junit/PostgresDatabaseVersionResolver.java (84%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/junit/SkipTestDependingOnDecoderPluginNameRule.java (94%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/junit/SkipWhenDecoderPluginNameIs.java (96%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/junit/SkipWhenDecoderPluginNameIsNot.java (96%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/rest/DebeziumPostgresConnectorResourceIT.java (97%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/rest/DebeziumPostgresConnectorResourceNoDatabaseIT.java (89%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/spi/CustomActionProvider.java (97%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/transforms/timescaledb/TestMetadata.java (88%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/transforms/timescaledb/TimescaleDbDatabaseTest.java (94%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{ => yb}/postgresql/transforms/timescaledb/TimescaleDbTest.java (98%) diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/ChangeEvent.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/ChangeEvent.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/ChangeEvent.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/ChangeEvent.java index 93687814cb2..4902dff0f26 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/ChangeEvent.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/ChangeEvent.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import org.apache.kafka.connect.source.SourceRecord; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/LogicalDecodingMessageFilter.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/LogicalDecodingMessageFilter.java similarity index 95% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/LogicalDecodingMessageFilter.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/LogicalDecodingMessageFilter.java index 5248b6c64f7..69788ddaf4e 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/LogicalDecodingMessageFilter.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/LogicalDecodingMessageFilter.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.util.function.Predicate; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/LogicalDecodingMessageMonitor.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/LogicalDecodingMessageMonitor.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/LogicalDecodingMessageMonitor.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/LogicalDecodingMessageMonitor.java index c201ffb727c..ea9523e9a51 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/LogicalDecodingMessageMonitor.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/LogicalDecodingMessageMonitor.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; @@ -16,7 +16,7 @@ import org.apache.kafka.connect.source.SourceRecord; import io.debezium.config.CommonConnectorConfig.BinaryHandlingMode; -import io.debezium.connector.postgresql.connection.LogicalDecodingMessage; +import io.debezium.connector.yb.postgresql.connection.LogicalDecodingMessage; import io.debezium.data.Envelope; import io.debezium.function.BlockingConsumer; import io.debezium.pipeline.spi.OffsetContext; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/Module.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/Module.java similarity index 94% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/Module.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/Module.java index ea5855305b4..3712070c639 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/Module.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/Module.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.util.Properties; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PGTableSchemaBuilder.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PGTableSchemaBuilder.java similarity index 99% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PGTableSchemaBuilder.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PGTableSchemaBuilder.java index da29fe17134..2a3f1f77c96 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PGTableSchemaBuilder.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PGTableSchemaBuilder.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.sql.Types; import java.util.List; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PgOid.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PgOid.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PgOid.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PgOid.java index 53475640194..5817d458933 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PgOid.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PgOid.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import com.yugabyte.core.Oid; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgisGeometry.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgisGeometry.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgisGeometry.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgisGeometry.java index 2ab16252628..5e32fdef597 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgisGeometry.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgisGeometry.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.nio.ByteBuffer; import java.nio.ByteOrder; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresChangeEventSourceCoordinator.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeEventSourceCoordinator.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresChangeEventSourceCoordinator.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeEventSourceCoordinator.java index 285dd8a1f6d..a8044913c4a 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresChangeEventSourceCoordinator.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeEventSourceCoordinator.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.sql.SQLException; import java.time.Duration; @@ -11,7 +11,7 @@ import java.util.concurrent.atomic.AtomicReference; import io.debezium.connector.common.CdcSourceTaskContext; -import io.debezium.connector.postgresql.spi.OffsetState; +import io.debezium.connector.yb.postgresql.spi.OffsetState; import io.debezium.pipeline.spi.SnapshotResult; import io.debezium.util.Clock; import io.debezium.util.LoggingContext; @@ -22,8 +22,8 @@ import io.debezium.DebeziumException; import io.debezium.config.CommonConnectorConfig; -import io.debezium.connector.postgresql.spi.SlotState; -import io.debezium.connector.postgresql.spi.Snapshotter; +import io.debezium.connector.yb.postgresql.spi.SlotState; +import io.debezium.connector.yb.postgresql.spi.Snapshotter; import io.debezium.pipeline.ChangeEventSourceCoordinator; import io.debezium.pipeline.ErrorHandler; import io.debezium.pipeline.EventDispatcher; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresChangeEventSourceFactory.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeEventSourceFactory.java similarity index 94% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresChangeEventSourceFactory.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeEventSourceFactory.java index 024892eadd5..c4ee9224b94 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresChangeEventSourceFactory.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeEventSourceFactory.java @@ -3,15 +3,15 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.util.Optional; -import io.debezium.connector.postgresql.connection.PostgresConnection; -import io.debezium.connector.postgresql.connection.ReplicationConnection; -import io.debezium.connector.postgresql.spi.SlotCreationResult; -import io.debezium.connector.postgresql.spi.SlotState; -import io.debezium.connector.postgresql.spi.Snapshotter; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection; +import io.debezium.connector.yb.postgresql.connection.ReplicationConnection; +import io.debezium.connector.yb.postgresql.spi.SlotCreationResult; +import io.debezium.connector.yb.postgresql.spi.SlotState; +import io.debezium.connector.yb.postgresql.spi.Snapshotter; import io.debezium.jdbc.MainConnectionProvidingConnectionFactory; import io.debezium.pipeline.ErrorHandler; import io.debezium.pipeline.notification.NotificationService; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresChangeRecordEmitter.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeRecordEmitter.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresChangeRecordEmitter.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeRecordEmitter.java index 8eee5901664..fe852c601e8 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresChangeRecordEmitter.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeRecordEmitter.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.sql.SQLException; import java.util.ArrayList; @@ -17,16 +17,15 @@ import java.util.Set; import java.util.stream.Collectors; -import io.debezium.connector.postgresql.connection.ReplicaIdentityInfo; -import org.apache.kafka.connect.data.SchemaBuilder; +import io.debezium.connector.yb.postgresql.connection.ReplicaIdentityInfo; import org.apache.kafka.connect.data.Struct; import org.apache.kafka.connect.errors.ConnectException; import com.yugabyte.core.BaseConnection; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.postgresql.connection.PostgresConnection; -import io.debezium.connector.postgresql.connection.ReplicationMessage; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection; +import io.debezium.connector.yb.postgresql.connection.ReplicationMessage; import io.debezium.data.Envelope.Operation; import io.debezium.function.Predicates; import io.debezium.pipeline.spi.ChangeRecordEmitter; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnector.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnector.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnector.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnector.java index dabbb3f7ef8..9f10b3ef99b 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnector.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnector.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.sql.SQLException; import java.util.Collections; @@ -23,7 +23,7 @@ import io.debezium.DebeziumException; import io.debezium.config.Configuration; import io.debezium.connector.common.RelationalBaseSourceConnector; -import io.debezium.connector.postgresql.connection.PostgresConnection; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection; import io.debezium.relational.RelationalDatabaseConnectorConfig; import io.debezium.relational.TableId; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorConfig.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnectorConfig.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorConfig.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnectorConfig.java index a8273a86a26..5de47eac961 100755 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorConfig.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnectorConfig.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.time.Duration; import java.util.Arrays; @@ -12,6 +12,12 @@ import java.util.Map; import java.util.Optional; +import io.debezium.connector.yb.postgresql.connection.MessageDecoderContext; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection; +import io.debezium.connector.yb.postgresql.connection.pgoutput.PgOutputMessageDecoder; +import io.debezium.connector.yb.postgresql.connection.pgproto.PgProtoMessageDecoder; +import io.debezium.connector.yb.postgresql.snapshot.InitialSnapshotter; +import io.debezium.connector.yb.postgresql.spi.Snapshotter; import io.debezium.data.Envelope; import io.debezium.heartbeat.Heartbeat; import io.debezium.heartbeat.HeartbeatConnectionProvider; @@ -35,17 +41,11 @@ import io.debezium.config.Field; import io.debezium.connector.AbstractSourceInfo; import io.debezium.connector.SourceInfoStructMaker; -import io.debezium.connector.postgresql.connection.MessageDecoder; -import io.debezium.connector.postgresql.connection.MessageDecoderContext; -import io.debezium.connector.postgresql.connection.PostgresConnection; -import io.debezium.connector.postgresql.connection.ReplicationConnection; -import io.debezium.connector.postgresql.connection.pgoutput.PgOutputMessageDecoder; -import io.debezium.connector.postgresql.connection.pgproto.PgProtoMessageDecoder; -import io.debezium.connector.postgresql.snapshot.AlwaysSnapshotter; -import io.debezium.connector.postgresql.snapshot.InitialOnlySnapshotter; -import io.debezium.connector.postgresql.snapshot.InitialSnapshotter; -import io.debezium.connector.postgresql.snapshot.NeverSnapshotter; -import io.debezium.connector.postgresql.spi.Snapshotter; +import io.debezium.connector.yb.postgresql.connection.MessageDecoder; +import io.debezium.connector.yb.postgresql.connection.ReplicationConnection; +import io.debezium.connector.yb.postgresql.snapshot.AlwaysSnapshotter; +import io.debezium.connector.yb.postgresql.snapshot.InitialOnlySnapshotter; +import io.debezium.connector.yb.postgresql.snapshot.NeverSnapshotter; import io.debezium.jdbc.JdbcConfiguration; import io.debezium.relational.ColumnFilterMode; import io.debezium.relational.RelationalDatabaseConnectorConfig; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorTask.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnectorTask.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorTask.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnectorTask.java index 9921cdeaff0..73676400d12 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorTask.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnectorTask.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.nio.charset.Charset; import java.sql.SQLException; @@ -13,6 +13,7 @@ import java.util.Map; import java.util.stream.Collectors; +import io.debezium.connector.yb.postgresql.spi.Snapshotter; import org.apache.kafka.connect.errors.ConnectException; import org.apache.kafka.connect.errors.RetriableException; import org.apache.kafka.connect.source.SourceRecord; @@ -26,13 +27,12 @@ import io.debezium.config.Field; import io.debezium.connector.base.ChangeEventQueue; import io.debezium.connector.common.BaseSourceTask; -import io.debezium.connector.postgresql.connection.PostgresConnection; -import io.debezium.connector.postgresql.connection.PostgresConnection.PostgresValueConverterBuilder; -import io.debezium.connector.postgresql.connection.PostgresDefaultValueConverter; -import io.debezium.connector.postgresql.connection.ReplicationConnection; -import io.debezium.connector.postgresql.spi.SlotCreationResult; -import io.debezium.connector.postgresql.spi.SlotState; -import io.debezium.connector.postgresql.spi.Snapshotter; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection.PostgresValueConverterBuilder; +import io.debezium.connector.yb.postgresql.connection.PostgresDefaultValueConverter; +import io.debezium.connector.yb.postgresql.connection.ReplicationConnection; +import io.debezium.connector.yb.postgresql.spi.SlotCreationResult; +import io.debezium.connector.yb.postgresql.spi.SlotState; import io.debezium.document.DocumentReader; import io.debezium.jdbc.DefaultMainConnectionProvidingConnectionFactory; import io.debezium.jdbc.MainConnectionProvidingConnectionFactory; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresErrorHandler.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresErrorHandler.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresErrorHandler.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresErrorHandler.java index 472fb5ffb52..4cc768102f4 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresErrorHandler.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresErrorHandler.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.io.IOException; import java.sql.SQLException; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresEventDispatcher.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresEventDispatcher.java similarity index 94% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresEventDispatcher.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresEventDispatcher.java index d8bbf5eac91..b93a28472b4 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresEventDispatcher.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresEventDispatcher.java @@ -4,15 +4,15 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import org.apache.kafka.connect.source.SourceRecord; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import io.debezium.connector.base.ChangeEventQueue; -import io.debezium.connector.postgresql.connection.LogicalDecodingMessage; -import io.debezium.connector.postgresql.pipeline.txmetadata.PostgresTransactionMonitor; +import io.debezium.connector.yb.postgresql.connection.LogicalDecodingMessage; +import io.debezium.connector.yb.postgresql.pipeline.txmetadata.PostgresTransactionMonitor; import io.debezium.heartbeat.Heartbeat; import io.debezium.pipeline.DataChangeEvent; import io.debezium.pipeline.EventDispatcher; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresEventMetadataProvider.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresEventMetadataProvider.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresEventMetadataProvider.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresEventMetadataProvider.java index 2e1980b38f3..faf1163f0b0 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresEventMetadataProvider.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresEventMetadataProvider.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.time.Instant; import java.util.Map; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresOffsetContext.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresOffsetContext.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresOffsetContext.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresOffsetContext.java index 53348ba1915..9873cfdb32f 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresOffsetContext.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresOffsetContext.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.sql.SQLException; import java.time.Instant; @@ -16,10 +16,10 @@ import org.slf4j.LoggerFactory; import io.debezium.connector.SnapshotRecord; -import io.debezium.connector.postgresql.connection.Lsn; -import io.debezium.connector.postgresql.connection.PostgresConnection; -import io.debezium.connector.postgresql.connection.ReplicationMessage.Operation; -import io.debezium.connector.postgresql.spi.OffsetState; +import io.debezium.connector.yb.postgresql.connection.Lsn; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection; +import io.debezium.connector.yb.postgresql.connection.ReplicationMessage.Operation; +import io.debezium.connector.yb.postgresql.spi.OffsetState; import io.debezium.pipeline.CommonOffsetContext; import io.debezium.pipeline.source.snapshot.incremental.IncrementalSnapshotContext; import io.debezium.pipeline.source.snapshot.incremental.SignalBasedIncrementalSnapshotContext; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresPartition.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresPartition.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresPartition.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresPartition.java index 4e28d658bd8..ac2cec6cea2 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresPartition.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresPartition.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import static io.debezium.relational.RelationalDatabaseConnectorConfig.DATABASE_NAME; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSchema.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSchema.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSchema.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSchema.java index d94bace57dd..843c03d7a10 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSchema.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSchema.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.sql.SQLException; import java.util.ArrayList; @@ -20,9 +20,9 @@ import org.slf4j.LoggerFactory; import io.debezium.annotation.NotThreadSafe; -import io.debezium.connector.postgresql.connection.PostgresConnection; -import io.debezium.connector.postgresql.connection.PostgresDefaultValueConverter; -import io.debezium.connector.postgresql.connection.ReplicaIdentityInfo; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection; +import io.debezium.connector.yb.postgresql.connection.PostgresDefaultValueConverter; +import io.debezium.connector.yb.postgresql.connection.ReplicaIdentityInfo; import io.debezium.jdbc.JdbcConnection; import io.debezium.relational.RelationalDatabaseSchema; import io.debezium.relational.Table; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSchemaFactory.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSchemaFactory.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSchemaFactory.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSchemaFactory.java index d64b472fadf..c6503cb4113 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSchemaFactory.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSchemaFactory.java @@ -3,13 +3,13 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import org.apache.kafka.connect.data.Schema; import org.apache.kafka.connect.data.SchemaBuilder; import io.debezium.config.CommonConnectorConfig; -import io.debezium.connector.postgresql.data.Ltree; +import io.debezium.connector.yb.postgresql.data.Ltree; import io.debezium.data.Envelope; import io.debezium.schema.SchemaFactory; import io.debezium.schema.SchemaNameAdjuster; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSignalBasedIncrementalSnapshotChangeEventSource.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSignalBasedIncrementalSnapshotChangeEventSource.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSignalBasedIncrementalSnapshotChangeEventSource.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSignalBasedIncrementalSnapshotChangeEventSource.java index 4fe5363c080..ef9ff136dac 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSignalBasedIncrementalSnapshotChangeEventSource.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSignalBasedIncrementalSnapshotChangeEventSource.java @@ -3,14 +3,14 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.sql.SQLException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.postgresql.connection.PostgresConnection; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection; import io.debezium.jdbc.JdbcConnection; import io.debezium.pipeline.EventDispatcher; import io.debezium.pipeline.notification.NotificationService; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSnapshotChangeEventSource.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSnapshotChangeEventSource.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSnapshotChangeEventSource.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSnapshotChangeEventSource.java index ed247de8cbe..e28208da4e8 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSnapshotChangeEventSource.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSnapshotChangeEventSource.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.sql.SQLException; import java.time.Duration; @@ -14,17 +14,16 @@ import java.util.Set; import java.util.stream.Collectors; +import io.debezium.connector.yb.postgresql.spi.Snapshotter; import io.debezium.pipeline.spi.ChangeRecordEmitter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.postgresql.PostgresOffsetContext.Loader; -import io.debezium.connector.postgresql.connection.Lsn; -import io.debezium.connector.postgresql.connection.PostgresConnection; -import io.debezium.connector.postgresql.snapshot.AlwaysSnapshotter; -import io.debezium.connector.postgresql.spi.SlotCreationResult; -import io.debezium.connector.postgresql.spi.SlotState; -import io.debezium.connector.postgresql.spi.Snapshotter; +import io.debezium.connector.yb.postgresql.connection.Lsn; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection; +import io.debezium.connector.yb.postgresql.snapshot.AlwaysSnapshotter; +import io.debezium.connector.yb.postgresql.spi.SlotCreationResult; +import io.debezium.connector.yb.postgresql.spi.SlotState; import io.debezium.jdbc.MainConnectionProvidingConnectionFactory; import io.debezium.pipeline.EventDispatcher; import io.debezium.pipeline.notification.NotificationService; @@ -307,6 +306,6 @@ private static class PostgresSnapshotContext extends RelationalSnapshotContext

snapshotContext) { - return new Loader(connectorConfig).load(snapshotContext.offset.getOffset()); + return new PostgresOffsetContext.Loader(connectorConfig).load(snapshotContext.offset.getOffset()); } } diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSourceInfoStructMaker.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSourceInfoStructMaker.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSourceInfoStructMaker.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSourceInfoStructMaker.java index 1f75eecd5fd..cadfe19d109 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSourceInfoStructMaker.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSourceInfoStructMaker.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import org.apache.kafka.connect.data.Schema; import org.apache.kafka.connect.data.Struct; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresStreamingChangeEventSource.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresStreamingChangeEventSource.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresStreamingChangeEventSource.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresStreamingChangeEventSource.java index 60897163b14..36f55c6de20 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresStreamingChangeEventSource.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresStreamingChangeEventSource.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.sql.SQLException; import java.util.Map; @@ -11,23 +11,22 @@ import java.util.OptionalLong; import java.util.concurrent.atomic.AtomicReference; -import io.debezium.connector.postgresql.connection.*; +import io.debezium.connector.yb.postgresql.spi.Snapshotter; import org.apache.kafka.connect.errors.ConnectException; import com.yugabyte.core.BaseConnection; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import io.debezium.DebeziumException; -import io.debezium.connector.postgresql.connection.LogicalDecodingMessage; -import io.debezium.connector.postgresql.connection.Lsn; -import io.debezium.connector.postgresql.connection.PostgresConnection; -import io.debezium.connector.postgresql.connection.PostgresReplicationConnection; -import io.debezium.connector.postgresql.connection.ReplicationConnection; -import io.debezium.connector.postgresql.connection.ReplicationMessage; -import io.debezium.connector.postgresql.connection.ReplicationMessage.Operation; -import io.debezium.connector.postgresql.connection.ReplicationStream; -import io.debezium.connector.postgresql.connection.WalPositionLocator; -import io.debezium.connector.postgresql.spi.Snapshotter; +import io.debezium.connector.yb.postgresql.connection.LogicalDecodingMessage; +import io.debezium.connector.yb.postgresql.connection.Lsn; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection; +import io.debezium.connector.yb.postgresql.connection.PostgresReplicationConnection; +import io.debezium.connector.yb.postgresql.connection.ReplicationConnection; +import io.debezium.connector.yb.postgresql.connection.ReplicationMessage; +import io.debezium.connector.yb.postgresql.connection.ReplicationMessage.Operation; +import io.debezium.connector.yb.postgresql.connection.ReplicationStream; +import io.debezium.connector.yb.postgresql.connection.WalPositionLocator; import io.debezium.heartbeat.Heartbeat; import io.debezium.pipeline.ErrorHandler; import io.debezium.pipeline.source.spi.StreamingChangeEventSource; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresTaskContext.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresTaskContext.java similarity index 95% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresTaskContext.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresTaskContext.java index f9b1f711202..da4ae28568d 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresTaskContext.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresTaskContext.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.sql.SQLException; import java.util.Collections; @@ -14,9 +14,9 @@ import io.debezium.annotation.ThreadSafe; import io.debezium.connector.common.CdcSourceTaskContext; -import io.debezium.connector.postgresql.connection.PostgresConnection; -import io.debezium.connector.postgresql.connection.ReplicationConnection; -import io.debezium.connector.postgresql.spi.SlotState; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection; +import io.debezium.connector.yb.postgresql.connection.ReplicationConnection; +import io.debezium.connector.yb.postgresql.spi.SlotState; import io.debezium.relational.TableId; import io.debezium.spi.topic.TopicNamingStrategy; import io.debezium.util.Clock; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresTopicSelector.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresTopicSelector.java similarity index 94% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresTopicSelector.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresTopicSelector.java index 3222691e409..2e8945ca9c1 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresTopicSelector.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresTopicSelector.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import io.debezium.relational.TableId; import io.debezium.schema.TopicSelector; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresType.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresType.java similarity index 99% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresType.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresType.java index 2a7f3155350..5081e68d71e 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresType.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresType.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.util.List; import java.util.Objects; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresValueConverter.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresValueConverter.java similarity index 99% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresValueConverter.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresValueConverter.java index 29da417c526..e2e975b7b96 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresValueConverter.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresValueConverter.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import static java.time.ZoneId.systemDefault; @@ -52,9 +52,9 @@ import com.fasterxml.jackson.core.JsonGenerator; import io.debezium.config.CommonConnectorConfig.BinaryHandlingMode; -import io.debezium.connector.postgresql.PostgresConnectorConfig.HStoreHandlingMode; -import io.debezium.connector.postgresql.PostgresConnectorConfig.IntervalHandlingMode; -import io.debezium.connector.postgresql.data.Ltree; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.HStoreHandlingMode; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.IntervalHandlingMode; +import io.debezium.connector.yb.postgresql.data.Ltree; import io.debezium.connector.postgresql.proto.PgProto; import io.debezium.data.Bits; import io.debezium.data.Json; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/RecordsProducer.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/RecordsProducer.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/RecordsProducer.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/RecordsProducer.java index b5a845a594f..98260ef5195 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/RecordsProducer.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/RecordsProducer.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.util.function.Consumer; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/ReplicaIdentityMapper.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/ReplicaIdentityMapper.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/ReplicaIdentityMapper.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/ReplicaIdentityMapper.java index 0f7ab45e540..e35122d2f7f 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/ReplicaIdentityMapper.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/ReplicaIdentityMapper.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.util.Arrays; import java.util.Collections; @@ -16,7 +16,7 @@ import io.debezium.DebeziumException; import io.debezium.annotation.Immutable; -import io.debezium.connector.postgresql.connection.ReplicaIdentityInfo; +import io.debezium.connector.yb.postgresql.connection.ReplicaIdentityInfo; import io.debezium.function.Predicates; import io.debezium.relational.TableId; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/SourceInfo.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/SourceInfo.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/SourceInfo.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/SourceInfo.java index 0b07b3d24de..4c96c343b3f 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/SourceInfo.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/SourceInfo.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.time.Instant; import java.util.ArrayList; @@ -15,8 +15,8 @@ import io.debezium.annotation.NotThreadSafe; import io.debezium.connector.common.BaseSourceInfo; -import io.debezium.connector.postgresql.connection.Lsn; -import io.debezium.connector.postgresql.connection.ReplicationMessage.Operation; +import io.debezium.connector.yb.postgresql.connection.Lsn; +import io.debezium.connector.yb.postgresql.connection.ReplicationMessage.Operation; import io.debezium.relational.TableId; /** diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/TypeRegistry.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/TypeRegistry.java similarity index 99% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/TypeRegistry.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/TypeRegistry.java index 45c31abfe19..283b805b675 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/TypeRegistry.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/TypeRegistry.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.sql.PreparedStatement; import java.sql.ResultSet; @@ -18,6 +18,7 @@ import java.util.Map; import java.util.Set; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection; import org.apache.kafka.connect.errors.ConnectException; import com.yugabyte.core.BaseConnection; import com.yugabyte.core.TypeInfo; @@ -27,7 +28,6 @@ import io.debezium.DebeziumException; import io.debezium.annotation.Immutable; -import io.debezium.connector.postgresql.connection.PostgresConnection; import io.debezium.util.Collect; /** diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/UnchangedToastedPlaceholder.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/UnchangedToastedPlaceholder.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/UnchangedToastedPlaceholder.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/UnchangedToastedPlaceholder.java index a3d8baafd7c..5a0c5f29580 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/UnchangedToastedPlaceholder.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/UnchangedToastedPlaceholder.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.util.ArrayList; import java.util.Arrays; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/UnchangedToastedReplicationMessageColumn.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/UnchangedToastedReplicationMessageColumn.java similarity index 93% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/UnchangedToastedReplicationMessageColumn.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/UnchangedToastedReplicationMessageColumn.java index 49297e29023..ab3eba2c027 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/UnchangedToastedReplicationMessageColumn.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/UnchangedToastedReplicationMessageColumn.java @@ -3,20 +3,22 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.util.Arrays; import java.util.HashSet; import java.util.Set; -import io.debezium.connector.postgresql.connection.AbstractReplicationMessageColumn; +import io.debezium.connector.yb.postgresql.connection.AbstractReplicationMessageColumn; +import io.debezium.connector.yb.postgresql.connection.ReplicationMessage; +import io.debezium.connector.yb.postgresql.connection.ReplicationStream; /** - * Represents a toasted column in a {@link io.debezium.connector.postgresql.connection.ReplicationStream}. + * Represents a toasted column in a {@link ReplicationStream}. * * Some decoder implementations may stream information about a column but provide an indicator that the field was not * changed and therefore toasted. This implementation acts as an indicator for such fields that are contained within - * a {@link io.debezium.connector.postgresql.connection.ReplicationMessage}. + * a {@link ReplicationMessage}. * * @author Chris Cranford */ diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YBHeartbeatImpl.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/YBHeartbeatImpl.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YBHeartbeatImpl.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/YBHeartbeatImpl.java index dd87850c9fc..52ce359cc38 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YBHeartbeatImpl.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/YBHeartbeatImpl.java @@ -1,4 +1,4 @@ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import io.debezium.function.BlockingConsumer; import io.debezium.heartbeat.HeartbeatImpl; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YBSnapshotChangeRecordEmitter.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/YBSnapshotChangeRecordEmitter.java similarity index 89% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YBSnapshotChangeRecordEmitter.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/YBSnapshotChangeRecordEmitter.java index 0c339a08354..a51c6f9a599 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YBSnapshotChangeRecordEmitter.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/YBSnapshotChangeRecordEmitter.java @@ -1,10 +1,8 @@ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; -import io.debezium.connector.postgresql.connection.ReplicaIdentityInfo; import io.debezium.data.Envelope; import io.debezium.pipeline.spi.OffsetContext; import io.debezium.relational.RelationalChangeRecordEmitter; -import io.debezium.relational.RelationalDatabaseConnectorConfig; import io.debezium.util.Clock; /** diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YugabyteDBServer.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/YugabyteDBServer.java similarity index 85% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YugabyteDBServer.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/YugabyteDBServer.java index dcaa291f54e..399b3940dd5 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YugabyteDBServer.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/YugabyteDBServer.java @@ -1,4 +1,4 @@ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; /** * Helper class to add server related methods to aid in code execution for YugabyteDB specific flow. diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/AbstractColumnValue.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractColumnValue.java similarity index 93% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/AbstractColumnValue.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractColumnValue.java index 576f1bc713f..8c6242b7747 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/AbstractColumnValue.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractColumnValue.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection; +package io.debezium.connector.yb.postgresql.connection; import java.math.BigDecimal; import java.sql.SQLException; @@ -13,6 +13,10 @@ import java.time.OffsetTime; import java.time.ZoneOffset; +import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; +import io.debezium.connector.yb.postgresql.PostgresType; +import io.debezium.connector.yb.postgresql.PostgresValueConverter; +import io.debezium.connector.yb.postgresql.TypeRegistry; import org.apache.kafka.connect.errors.ConnectException; import com.yugabyte.geometric.PGbox; import com.yugabyte.geometric.PGcircle; @@ -27,11 +31,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; -import io.debezium.connector.postgresql.PostgresType; -import io.debezium.connector.postgresql.PostgresValueConverter; -import io.debezium.connector.postgresql.TypeRegistry; - /** * @author Chris Cranford */ @@ -190,7 +189,7 @@ public boolean isArray(PostgresType type) { } @Override - public Object asArray(String columnName, PostgresType type, String fullType, PgConnectionSupplier connection) { + public Object asArray(String columnName, PostgresType type, String fullType, PostgresStreamingChangeEventSource.PgConnectionSupplier connection) { try { final String dataString = asString(); return new PgArray(connection.get(), type.getOid(), dataString); @@ -203,7 +202,7 @@ public Object asArray(String columnName, PostgresType type, String fullType, PgC @Override public Object asDefault(TypeRegistry typeRegistry, int columnType, String columnName, String fullType, boolean includeUnknownDatatypes, - PgConnectionSupplier connection) { + PostgresStreamingChangeEventSource.PgConnectionSupplier connection) { if (includeUnknownDatatypes) { // this includes things like PostGIS geoemetries or other custom types // leave up to the downstream message recipient to deal with diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/AbstractMessageDecoder.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractMessageDecoder.java similarity index 84% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/AbstractMessageDecoder.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractMessageDecoder.java index 1813b1ba982..abb9d139c25 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/AbstractMessageDecoder.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractMessageDecoder.java @@ -3,17 +3,16 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection; +package io.debezium.connector.yb.postgresql.connection; import java.nio.ByteBuffer; import java.sql.SQLException; import java.time.Duration; +import io.debezium.connector.yb.postgresql.TypeRegistry; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.postgresql.TypeRegistry; -import io.debezium.connector.postgresql.connection.ReplicationStream.ReplicationMessageProcessor; import io.debezium.util.Clock; import io.debezium.util.Threads; import io.debezium.util.Threads.Timer; @@ -32,7 +31,7 @@ public abstract class AbstractMessageDecoder implements MessageDecoder { private Timer timer = null; @Override - public void processMessage(ByteBuffer buffer, ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException { + public void processMessage(ByteBuffer buffer, ReplicationStream.ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException { // if message is empty pass control right to ReplicationMessageProcessor to update WAL position info if (buffer == null) { processor.process(null); @@ -42,7 +41,7 @@ public void processMessage(ByteBuffer buffer, ReplicationMessageProcessor proces } } - protected abstract void processNotEmptyMessage(ByteBuffer buffer, ReplicationMessageProcessor processor, TypeRegistry typeRegistry) + protected abstract void processNotEmptyMessage(ByteBuffer buffer, ReplicationStream.ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException; @Override diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/AbstractReplicationMessageColumn.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractReplicationMessageColumn.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/AbstractReplicationMessageColumn.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractReplicationMessageColumn.java index 5498bf4a713..dd094f36081 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/AbstractReplicationMessageColumn.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractReplicationMessageColumn.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection; +package io.debezium.connector.yb.postgresql.connection; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -12,7 +12,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.postgresql.PostgresType; +import io.debezium.connector.yb.postgresql.PostgresType; /** * Extracts type information from replication messages and associates them with each column. diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/DateTimeFormat.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/DateTimeFormat.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/DateTimeFormat.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/DateTimeFormat.java index e766002c68e..a90b7d56b9e 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/DateTimeFormat.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/DateTimeFormat.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection; +package io.debezium.connector.yb.postgresql.connection; import java.time.Instant; import java.time.LocalDate; @@ -21,12 +21,11 @@ import java.time.temporal.TemporalAccessor; import java.util.function.Supplier; +import io.debezium.connector.yb.postgresql.PostgresValueConverter; import org.apache.kafka.connect.errors.ConnectException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.postgresql.PostgresValueConverter; - /** * Transformer for time/date related string representations in replication messages. * diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/LogicalDecodingMessage.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/LogicalDecodingMessage.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/LogicalDecodingMessage.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/LogicalDecodingMessage.java index b450ee3bbae..641d8114299 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/LogicalDecodingMessage.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/LogicalDecodingMessage.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection; +package io.debezium.connector.yb.postgresql.connection; import java.time.Instant; import java.util.List; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/Lsn.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/Lsn.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/Lsn.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/Lsn.java index b9f4b7dc8fe..a879b94a54a 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/Lsn.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/Lsn.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection; +package io.debezium.connector.yb.postgresql.connection; import java.nio.ByteBuffer; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/MessageDecoder.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/MessageDecoder.java similarity index 85% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/MessageDecoder.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/MessageDecoder.java index 8406c9b3ab7..aec6462570a 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/MessageDecoder.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/MessageDecoder.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection; +package io.debezium.connector.yb.postgresql.connection; import java.nio.ByteBuffer; import java.sql.SQLException; @@ -12,8 +12,7 @@ import com.yugabyte.replication.fluent.logical.ChainedLogicalStreamBuilder; -import io.debezium.connector.postgresql.TypeRegistry; -import io.debezium.connector.postgresql.connection.ReplicationStream.ReplicationMessageProcessor; +import io.debezium.connector.yb.postgresql.TypeRegistry; /** * A class that is able to deserialize/decode binary representation of a batch of replication messages generated by @@ -31,7 +30,7 @@ public interface MessageDecoder { * @param processor - message processing on arrival * @param typeRegistry - registry with known types */ - void processMessage(ByteBuffer buffer, ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException; + void processMessage(ByteBuffer buffer, ReplicationStream.ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException; /** * Allows MessageDecoder to configure options with which the replication stream is started. diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/MessageDecoderContext.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/MessageDecoderContext.java similarity index 78% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/MessageDecoderContext.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/MessageDecoderContext.java index f79093d4a11..c092e7ee9db 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/MessageDecoderContext.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/MessageDecoderContext.java @@ -3,10 +3,10 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection; +package io.debezium.connector.yb.postgresql.connection; -import io.debezium.connector.postgresql.PostgresConnectorConfig; -import io.debezium.connector.postgresql.PostgresSchema; +import io.debezium.connector.yb.postgresql.PostgresSchema; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; /** * Contextual data required by {@link MessageDecoder}s. diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/PostgresConnection.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/PostgresConnection.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/PostgresConnection.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/PostgresConnection.java index 822b8ab4d7c..c49b33d0272 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/PostgresConnection.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/PostgresConnection.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection; +package io.debezium.connector.yb.postgresql.connection; import java.nio.charset.Charset; import java.sql.DatabaseMetaData; @@ -21,9 +21,12 @@ import java.util.concurrent.atomic.AtomicLong; import java.util.regex.Pattern; +import io.debezium.connector.yb.postgresql.PgOid; +import io.debezium.connector.yb.postgresql.PostgresType; +import io.debezium.connector.yb.postgresql.PostgresValueConverter; +import io.debezium.connector.yb.postgresql.YugabyteDBServer; import org.apache.kafka.connect.errors.ConnectException; import com.yugabyte.core.BaseConnection; -import com.yugabyte.jdbc.PgConnection; import com.yugabyte.jdbc.TimestampUtils; import com.yugabyte.replication.LogSequenceNumber; import com.yugabyte.util.PGmoney; @@ -34,13 +37,9 @@ import io.debezium.DebeziumException; import io.debezium.annotation.VisibleForTesting; import io.debezium.config.Configuration; -import io.debezium.connector.postgresql.PgOid; -import io.debezium.connector.postgresql.PostgresConnectorConfig; -import io.debezium.connector.postgresql.PostgresType; -import io.debezium.connector.postgresql.PostgresValueConverter; -import io.debezium.connector.postgresql.TypeRegistry; -import io.debezium.connector.postgresql.YugabyteDBServer; -import io.debezium.connector.postgresql.spi.SlotState; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; +import io.debezium.connector.yb.postgresql.TypeRegistry; +import io.debezium.connector.yb.postgresql.spi.SlotState; import io.debezium.data.SpecialValueDecimal; import io.debezium.jdbc.JdbcConfiguration; import io.debezium.jdbc.JdbcConnection; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/PostgresDefaultValueConverter.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/PostgresDefaultValueConverter.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/PostgresDefaultValueConverter.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/PostgresDefaultValueConverter.java index 78a801786d6..6729a6b7f22 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/PostgresDefaultValueConverter.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/PostgresDefaultValueConverter.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection; +package io.debezium.connector.yb.postgresql.connection; import java.math.BigDecimal; import java.math.RoundingMode; @@ -17,6 +17,8 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; +import io.debezium.connector.yb.postgresql.PostgresType; +import io.debezium.connector.yb.postgresql.PostgresValueConverter; import org.apache.kafka.connect.data.Field; import org.apache.kafka.connect.data.Schema; import org.apache.kafka.connect.data.SchemaBuilder; @@ -27,9 +29,7 @@ import org.slf4j.LoggerFactory; import io.debezium.annotation.ThreadSafe; -import io.debezium.connector.postgresql.PostgresType; -import io.debezium.connector.postgresql.PostgresValueConverter; -import io.debezium.connector.postgresql.TypeRegistry; +import io.debezium.connector.yb.postgresql.TypeRegistry; import io.debezium.relational.Column; import io.debezium.relational.DefaultValueConverter; import io.debezium.relational.ValueConverter; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/PostgresReplicationConnection.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/PostgresReplicationConnection.java similarity index 99% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/PostgresReplicationConnection.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/PostgresReplicationConnection.java index a95d46c239d..a695e5db1ed 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/PostgresReplicationConnection.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/PostgresReplicationConnection.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection; +package io.debezium.connector.yb.postgresql.connection; import static java.lang.Math.toIntExact; @@ -27,6 +27,8 @@ import java.util.function.Function; import java.util.stream.Collectors; +import io.debezium.connector.yb.postgresql.PostgresSchema; +import io.debezium.connector.yb.postgresql.ReplicaIdentityMapper; import org.apache.kafka.connect.errors.ConnectException; import com.yugabyte.core.BaseConnection; import com.yugabyte.core.ServerVersion; @@ -38,11 +40,9 @@ import org.slf4j.LoggerFactory; import io.debezium.DebeziumException; -import io.debezium.connector.postgresql.PostgresConnectorConfig; -import io.debezium.connector.postgresql.PostgresSchema; -import io.debezium.connector.postgresql.ReplicaIdentityMapper; -import io.debezium.connector.postgresql.TypeRegistry; -import io.debezium.connector.postgresql.spi.SlotCreationResult; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; +import io.debezium.connector.yb.postgresql.TypeRegistry; +import io.debezium.connector.yb.postgresql.spi.SlotCreationResult; import io.debezium.jdbc.JdbcConfiguration; import io.debezium.jdbc.JdbcConnection; import io.debezium.jdbc.JdbcConnectionException; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicaIdentityInfo.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicaIdentityInfo.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicaIdentityInfo.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicaIdentityInfo.java index db8e4cf10da..3caec718e17 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicaIdentityInfo.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicaIdentityInfo.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection; +package io.debezium.connector.yb.postgresql.connection; /** * Class to encapsulate {@link ReplicaIdentityInfo.ReplicaIdentity} enumerator, adding the name of the index diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicationConnection.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationConnection.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicationConnection.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationConnection.java index d4fa5460b0e..86538bfe87e 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicationConnection.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationConnection.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection; +package io.debezium.connector.yb.postgresql.connection; import java.sql.SQLException; import java.time.Duration; @@ -13,10 +13,10 @@ import com.yugabyte.replication.PGReplicationStream; import io.debezium.annotation.NotThreadSafe; -import io.debezium.connector.postgresql.PostgresConnectorConfig; -import io.debezium.connector.postgresql.PostgresSchema; -import io.debezium.connector.postgresql.TypeRegistry; -import io.debezium.connector.postgresql.spi.SlotCreationResult; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; +import io.debezium.connector.yb.postgresql.PostgresSchema; +import io.debezium.connector.yb.postgresql.TypeRegistry; +import io.debezium.connector.yb.postgresql.spi.SlotCreationResult; import io.debezium.relational.RelationalTableFilters; /** diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicationMessage.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessage.java similarity index 90% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicationMessage.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessage.java index c0a951a8622..ecc98361f03 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicationMessage.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessage.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection; +package io.debezium.connector.yb.postgresql.connection; import java.time.Instant; import java.time.LocalDate; @@ -20,10 +20,9 @@ import com.yugabyte.geometric.PGpoint; import com.yugabyte.geometric.PGpolygon; -import io.debezium.connector.postgresql.PostgresStreamingChangeEventSource; -import io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; -import io.debezium.connector.postgresql.PostgresType; -import io.debezium.connector.postgresql.TypeRegistry; +import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; +import io.debezium.connector.yb.postgresql.PostgresType; +import io.debezium.connector.yb.postgresql.TypeRegistry; /** * An abstract representation of a replication message that is sent by a PostgreSQL logical decoding plugin and @@ -63,7 +62,7 @@ interface Column { */ ColumnTypeMetadata getTypeMetadata(); - Object getValue(PgConnectionSupplier connection, boolean includeUnknownDatatypes); + Object getValue(PostgresStreamingChangeEventSource.PgConnectionSupplier connection, boolean includeUnknownDatatypes); boolean isOptional(); @@ -131,9 +130,9 @@ interface ColumnValue { boolean isArray(PostgresType type); - Object asArray(String columnName, PostgresType type, String fullType, PgConnectionSupplier connection); + Object asArray(String columnName, PostgresType type, String fullType, PostgresStreamingChangeEventSource.PgConnectionSupplier connection); - Object asDefault(TypeRegistry typeRegistry, int columnType, String columnName, String fullType, boolean includeUnknownDatatypes, PgConnectionSupplier connection); + Object asDefault(TypeRegistry typeRegistry, int columnType, String columnName, String fullType, boolean includeUnknownDatatypes, PostgresStreamingChangeEventSource.PgConnectionSupplier connection); } /** diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicationMessageColumnValueResolver.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessageColumnValueResolver.java similarity index 92% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicationMessageColumnValueResolver.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessageColumnValueResolver.java index 8dc814e29b8..5338a511c14 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicationMessageColumnValueResolver.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessageColumnValueResolver.java @@ -3,15 +3,15 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection; +package io.debezium.connector.yb.postgresql.connection; +import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; +import io.debezium.connector.yb.postgresql.PostgresType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; -import io.debezium.connector.postgresql.PostgresType; -import io.debezium.connector.postgresql.TypeRegistry; -import io.debezium.connector.postgresql.connection.ReplicationMessage.ColumnValue; +import io.debezium.connector.yb.postgresql.TypeRegistry; +import io.debezium.connector.yb.postgresql.connection.ReplicationMessage.ColumnValue; /** * @author Chris Cranford @@ -32,7 +32,7 @@ public class ReplicationMessageColumnValueResolver { * @param typeRegistry the postgres type registry * @return */ - public static Object resolveValue(String columnName, PostgresType type, String fullType, ColumnValue value, final PgConnectionSupplier connection, + public static Object resolveValue(String columnName, PostgresType type, String fullType, ColumnValue value, final PostgresStreamingChangeEventSource.PgConnectionSupplier connection, boolean includeUnknownDatatypes, TypeRegistry typeRegistry) { if (value.isNull()) { // nulls are null diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicationStream.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationStream.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicationStream.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationStream.java index beaa90c8c7d..2efa32e5995 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicationStream.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationStream.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection; +package io.debezium.connector.yb.postgresql.connection; import java.sql.SQLException; import java.util.concurrent.ExecutorService; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ServerInfo.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ServerInfo.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ServerInfo.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ServerInfo.java index ff1afe99ae5..57a92e77971 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ServerInfo.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ServerInfo.java @@ -4,13 +4,13 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection; +package io.debezium.connector.yb.postgresql.connection; import java.util.HashMap; import java.util.Map; import java.util.stream.Collectors; -import io.debezium.connector.postgresql.spi.SlotState; +import io.debezium.connector.yb.postgresql.spi.SlotState; /** * Information about a running Postgres instance. diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/TransactionMessage.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/TransactionMessage.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/TransactionMessage.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/TransactionMessage.java index 9ff93f99e23..7e4468b99d8 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/TransactionMessage.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/TransactionMessage.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection; +package io.debezium.connector.yb.postgresql.connection; import java.time.Instant; import java.util.List; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/WalPositionLocator.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/WalPositionLocator.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/WalPositionLocator.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/WalPositionLocator.java index 9d9cb4fa6f7..097cad33786 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/WalPositionLocator.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/WalPositionLocator.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection; +package io.debezium.connector.yb.postgresql.connection; import java.util.HashSet; import java.util.Optional; @@ -13,7 +13,6 @@ import org.slf4j.LoggerFactory; import io.debezium.DebeziumException; -import io.debezium.connector.postgresql.connection.ReplicationMessage.Operation; /** * This class is responsible for finding out a LSN from which Debezium should @@ -31,7 +30,7 @@ public class WalPositionLocator { private final Lsn lastCommitStoredLsn; private final Lsn lastEventStoredLsn; - private final Operation lastProcessedMessageType; + private final ReplicationMessage.Operation lastProcessedMessageType; private Lsn txStartLsn = null; private Lsn lsnAfterLastEventStoredLsn = null; private Lsn firstLsnReceived = null; @@ -40,7 +39,7 @@ public class WalPositionLocator { private boolean storeLsnAfterLastEventStoredLsn = false; private Set lsnSeen = new HashSet<>(1_000); - public WalPositionLocator(Lsn lastCommitStoredLsn, Lsn lastEventStoredLsn, Operation lastProcessedMessageType) { + public WalPositionLocator(Lsn lastCommitStoredLsn, Lsn lastEventStoredLsn, ReplicationMessage.Operation lastProcessedMessageType) { this.lastCommitStoredLsn = lastCommitStoredLsn; this.lastEventStoredLsn = lastEventStoredLsn; this.lastProcessedMessageType = lastProcessedMessageType; @@ -76,7 +75,7 @@ public Optional resumeFromLsn(Lsn currentLsn, ReplicationMessage message) { if (currentLsn.equals(lastEventStoredLsn)) { // BEGIN and first message after change have the same LSN if (txStartLsn != null - && (lastProcessedMessageType == null || lastProcessedMessageType == Operation.BEGIN || lastProcessedMessageType == Operation.COMMIT)) { + && (lastProcessedMessageType == null || lastProcessedMessageType == ReplicationMessage.Operation.BEGIN || lastProcessedMessageType == ReplicationMessage.Operation.COMMIT)) { // start from the BEGIN tx; prevent skipping of unprocessed event after BEGIN or previous tx COMMIT LOGGER.info("Will restart from LSN '{}' corresponding to the event following the BEGIN event", txStartLsn); startStreamingLsn = txStartLsn; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/ColumnMetaData.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/ColumnMetaData.java similarity index 95% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/ColumnMetaData.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/ColumnMetaData.java index 62615cf4d5b..f40dccab52d 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/ColumnMetaData.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/ColumnMetaData.java @@ -3,11 +3,11 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection.pgoutput; +package io.debezium.connector.yb.postgresql.connection.pgoutput; import io.debezium.annotation.Immutable; -import io.debezium.connector.postgresql.PostgresType; -import io.debezium.connector.postgresql.TypeRegistry; +import io.debezium.connector.yb.postgresql.PostgresType; +import io.debezium.connector.yb.postgresql.TypeRegistry; /** * Defines the relational column mapping for a table. diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputColumnValue.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputColumnValue.java similarity index 87% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputColumnValue.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputColumnValue.java index d424b83bc65..44321e5bba4 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputColumnValue.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputColumnValue.java @@ -3,12 +3,12 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection.pgoutput; +package io.debezium.connector.yb.postgresql.connection.pgoutput; import java.math.BigDecimal; -import io.debezium.connector.postgresql.PostgresValueConverter; -import io.debezium.connector.postgresql.connection.AbstractColumnValue; +import io.debezium.connector.yb.postgresql.PostgresValueConverter; +import io.debezium.connector.yb.postgresql.connection.AbstractColumnValue; import io.debezium.data.SpecialValueDecimal; import io.debezium.util.Strings; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputMessageDecoder.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputMessageDecoder.java similarity index 95% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputMessageDecoder.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputMessageDecoder.java index cad9fe02b00..b51690a96b4 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputMessageDecoder.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputMessageDecoder.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection.pgoutput; +package io.debezium.connector.yb.postgresql.connection.pgoutput; import static java.util.stream.Collectors.toMap; @@ -27,26 +27,26 @@ import java.util.function.Function; import com.yugabyte.replication.fluent.logical.ChainedLogicalStreamBuilder; -import io.debezium.connector.postgresql.YugabyteDBServer; +import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; +import io.debezium.connector.yb.postgresql.UnchangedToastedReplicationMessageColumn; +import io.debezium.connector.yb.postgresql.YugabyteDBServer; +import io.debezium.connector.yb.postgresql.connection.AbstractReplicationMessageColumn; +import io.debezium.connector.yb.postgresql.connection.TransactionMessage; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; -import io.debezium.connector.postgresql.PostgresType; -import io.debezium.connector.postgresql.TypeRegistry; -import io.debezium.connector.postgresql.UnchangedToastedReplicationMessageColumn; -import io.debezium.connector.postgresql.connection.AbstractMessageDecoder; -import io.debezium.connector.postgresql.connection.AbstractReplicationMessageColumn; -import io.debezium.connector.postgresql.connection.LogicalDecodingMessage; -import io.debezium.connector.postgresql.connection.Lsn; -import io.debezium.connector.postgresql.connection.MessageDecoderContext; -import io.debezium.connector.postgresql.connection.PostgresConnection; -import io.debezium.connector.postgresql.connection.ReplicationMessage.Column; -import io.debezium.connector.postgresql.connection.ReplicationMessage.NoopMessage; -import io.debezium.connector.postgresql.connection.ReplicationMessage.Operation; -import io.debezium.connector.postgresql.connection.ReplicationStream.ReplicationMessageProcessor; -import io.debezium.connector.postgresql.connection.TransactionMessage; -import io.debezium.connector.postgresql.connection.WalPositionLocator; +import io.debezium.connector.yb.postgresql.PostgresType; +import io.debezium.connector.yb.postgresql.TypeRegistry; +import io.debezium.connector.yb.postgresql.connection.AbstractMessageDecoder; +import io.debezium.connector.yb.postgresql.connection.LogicalDecodingMessage; +import io.debezium.connector.yb.postgresql.connection.Lsn; +import io.debezium.connector.yb.postgresql.connection.MessageDecoderContext; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection; +import io.debezium.connector.yb.postgresql.connection.ReplicationMessage.Column; +import io.debezium.connector.yb.postgresql.connection.ReplicationMessage.NoopMessage; +import io.debezium.connector.yb.postgresql.connection.ReplicationMessage.Operation; +import io.debezium.connector.yb.postgresql.connection.ReplicationStream.ReplicationMessageProcessor; +import io.debezium.connector.yb.postgresql.connection.WalPositionLocator; import io.debezium.data.Envelope; import io.debezium.relational.ColumnEditor; import io.debezium.relational.Table; @@ -749,7 +749,7 @@ private static List resolveColumnsFromStreamTupleData(ByteBuffer buffer, final String valueStr = readColumnValueAsString(buffer); replicationMessageColumn = new AbstractReplicationMessageColumn(columnName, columnType, typeExpression, optional) { @Override - public Object getValue(PgConnectionSupplier connection, boolean includeUnknownDatatypes) { + public Object getValue(PostgresStreamingChangeEventSource.PgConnectionSupplier connection, boolean includeUnknownDatatypes) { return PgOutputReplicationMessage.getValue(columnName, columnType, typeExpression, valueStr, connection, includeUnknownDatatypes, typeRegistry); } @@ -771,7 +771,7 @@ public String toString() { else if (type == 'n') { replicationMessageColumn = new AbstractReplicationMessageColumn(columnName, columnType, typeExpression, true) { @Override - public Object getValue(PgConnectionSupplier connection, boolean includeUnknownDatatypes) { + public Object getValue(PostgresStreamingChangeEventSource.PgConnectionSupplier connection, boolean includeUnknownDatatypes) { return null; } }; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputRelationMetaData.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputRelationMetaData.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputRelationMetaData.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputRelationMetaData.java index 86709dad24f..2b5f04a82c9 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputRelationMetaData.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputRelationMetaData.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection.pgoutput; +package io.debezium.connector.yb.postgresql.connection.pgoutput; import java.util.List; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputReplicationMessage.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputReplicationMessage.java similarity index 82% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputReplicationMessage.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputReplicationMessage.java index fd7f80e1b5a..dada83595c7 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputReplicationMessage.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputReplicationMessage.java @@ -3,17 +3,17 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection.pgoutput; +package io.debezium.connector.yb.postgresql.connection.pgoutput; import java.time.Instant; import java.util.List; import java.util.OptionalLong; -import io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; -import io.debezium.connector.postgresql.PostgresType; -import io.debezium.connector.postgresql.TypeRegistry; -import io.debezium.connector.postgresql.connection.ReplicationMessage; -import io.debezium.connector.postgresql.connection.ReplicationMessageColumnValueResolver; +import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; +import io.debezium.connector.yb.postgresql.PostgresType; +import io.debezium.connector.yb.postgresql.TypeRegistry; +import io.debezium.connector.yb.postgresql.connection.ReplicationMessage; +import io.debezium.connector.yb.postgresql.connection.ReplicationMessageColumnValueResolver; /** * @author Gunnar Morling @@ -86,7 +86,7 @@ public boolean shouldSchemaBeSynchronized() { * * @return the value; may be null */ - public static Object getValue(String columnName, PostgresType type, String fullType, String rawValue, final PgConnectionSupplier connection, + public static Object getValue(String columnName, PostgresType type, String fullType, String rawValue, final PostgresStreamingChangeEventSource.PgConnectionSupplier connection, boolean includeUnknownDataTypes, TypeRegistry typeRegistry) { final PgOutputColumnValue columnValue = new PgOutputColumnValue(rawValue); return ReplicationMessageColumnValueResolver.resolveValue(columnName, type, fullType, columnValue, connection, includeUnknownDataTypes, typeRegistry); diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputTruncateReplicationMessage.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputTruncateReplicationMessage.java similarity index 92% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputTruncateReplicationMessage.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputTruncateReplicationMessage.java index 25980afe4ff..aea15ec4b8b 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputTruncateReplicationMessage.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputTruncateReplicationMessage.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection.pgoutput; +package io.debezium.connector.yb.postgresql.connection.pgoutput; import java.time.Instant; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgproto/PgProtoColumnValue.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoColumnValue.java similarity index 94% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgproto/PgProtoColumnValue.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoColumnValue.java index 7710eb5a648..f31f8fa21d5 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgproto/PgProtoColumnValue.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoColumnValue.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection.pgproto; +package io.debezium.connector.yb.postgresql.connection.pgproto; import java.math.BigDecimal; import java.nio.charset.Charset; @@ -19,16 +19,16 @@ import com.yugabyte.geometric.PGpoint; import com.yugabyte.jdbc.PgArray; +import io.debezium.connector.yb.postgresql.PgOid; +import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; +import io.debezium.connector.yb.postgresql.PostgresType; +import io.debezium.connector.yb.postgresql.PostgresValueConverter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.postgresql.PgOid; -import io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; -import io.debezium.connector.postgresql.PostgresType; -import io.debezium.connector.postgresql.PostgresValueConverter; -import io.debezium.connector.postgresql.TypeRegistry; -import io.debezium.connector.postgresql.connection.AbstractColumnValue; -import io.debezium.connector.postgresql.connection.DateTimeFormat; +import io.debezium.connector.yb.postgresql.TypeRegistry; +import io.debezium.connector.yb.postgresql.connection.AbstractColumnValue; +import io.debezium.connector.yb.postgresql.connection.DateTimeFormat; import io.debezium.connector.postgresql.proto.PgProto; import io.debezium.data.SpecialValueDecimal; import io.debezium.time.Conversions; @@ -310,7 +310,7 @@ public boolean isArray(PostgresType type) { } @Override - public Object asArray(String columnName, PostgresType type, String fullType, PgConnectionSupplier connection) { + public Object asArray(String columnName, PostgresType type, String fullType, PostgresStreamingChangeEventSource.PgConnectionSupplier connection) { // Currently the logical decoding plugin sends unhandled types as a byte array containing the string // representation (in Postgres) of the array value. // The approach to decode this is sub-optimal but the only way to improve this is to update the plugin. @@ -338,7 +338,7 @@ public Object asArray(String columnName, PostgresType type, String fullType, PgC @Override public Object asDefault(TypeRegistry typeRegistry, int columnType, String columnName, String fullType, boolean includeUnknownDatatypes, - PgConnectionSupplier connection) { + PostgresStreamingChangeEventSource.PgConnectionSupplier connection) { final PostgresType type = typeRegistry.get(columnType); if (type.getOid() == typeRegistry.geometryOid() || type.getOid() == typeRegistry.geographyOid() || diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgproto/PgProtoMessageDecoder.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoMessageDecoder.java similarity index 91% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgproto/PgProtoMessageDecoder.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoMessageDecoder.java index d246fe3f86e..3808cc0cb1f 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgproto/PgProtoMessageDecoder.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoMessageDecoder.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection.pgproto; +package io.debezium.connector.yb.postgresql.connection.pgproto; import java.nio.ByteBuffer; import java.sql.SQLException; @@ -18,9 +18,9 @@ import com.google.protobuf.InvalidProtocolBufferException; -import io.debezium.connector.postgresql.TypeRegistry; -import io.debezium.connector.postgresql.connection.AbstractMessageDecoder; -import io.debezium.connector.postgresql.connection.ReplicationStream.ReplicationMessageProcessor; +import io.debezium.connector.yb.postgresql.TypeRegistry; +import io.debezium.connector.yb.postgresql.connection.AbstractMessageDecoder; +import io.debezium.connector.yb.postgresql.connection.ReplicationStream.ReplicationMessageProcessor; import io.debezium.connector.postgresql.proto.PgProto; import io.debezium.connector.postgresql.proto.PgProto.Op; import io.debezium.connector.postgresql.proto.PgProto.RowMessage; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgproto/PgProtoReplicationMessage.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoReplicationMessage.java similarity index 85% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgproto/PgProtoReplicationMessage.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoReplicationMessage.java index d3f649351df..6cd1a8197ba 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgproto/PgProtoReplicationMessage.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoReplicationMessage.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection.pgproto; +package io.debezium.connector.yb.postgresql.connection.pgproto; import java.time.Instant; import java.util.List; @@ -14,13 +14,13 @@ import java.util.stream.IntStream; import io.debezium.DebeziumException; -import io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; -import io.debezium.connector.postgresql.PostgresType; -import io.debezium.connector.postgresql.TypeRegistry; -import io.debezium.connector.postgresql.UnchangedToastedReplicationMessageColumn; -import io.debezium.connector.postgresql.connection.AbstractReplicationMessageColumn; -import io.debezium.connector.postgresql.connection.ReplicationMessage; -import io.debezium.connector.postgresql.connection.ReplicationMessageColumnValueResolver; +import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; +import io.debezium.connector.yb.postgresql.PostgresType; +import io.debezium.connector.yb.postgresql.UnchangedToastedReplicationMessageColumn; +import io.debezium.connector.yb.postgresql.connection.AbstractReplicationMessageColumn; +import io.debezium.connector.yb.postgresql.TypeRegistry; +import io.debezium.connector.yb.postgresql.connection.ReplicationMessage; +import io.debezium.connector.yb.postgresql.connection.ReplicationMessageColumnValueResolver; import io.debezium.connector.postgresql.proto.PgProto; import io.debezium.connector.postgresql.proto.PgProto.Op; import io.debezium.util.Strings; @@ -112,7 +112,7 @@ private List transform(List mes typeInfo.map(PgProto.TypeInfo::getValueOptional).orElse(Boolean.FALSE)) { @Override - public Object getValue(PgConnectionSupplier connection, boolean includeUnknownDatatypes) { + public Object getValue(PostgresStreamingChangeEventSource.PgConnectionSupplier connection, boolean includeUnknownDatatypes) { return PgProtoReplicationMessage.this.getValue(columnName, type, fullType, datum, connection, includeUnknownDatatypes); } @@ -130,7 +130,7 @@ public boolean isLastEventForLsn() { return true; } - public Object getValue(String columnName, PostgresType type, String fullType, PgProto.DatumMessage datumMessage, final PgConnectionSupplier connection, + public Object getValue(String columnName, PostgresType type, String fullType, PgProto.DatumMessage datumMessage, final PostgresStreamingChangeEventSource.PgConnectionSupplier connection, boolean includeUnknownDatatypes) { final PgProtoColumnValue columnValue = new PgProtoColumnValue(datumMessage); return ReplicationMessageColumnValueResolver.resolveValue(columnName, type, fullType, columnValue, connection, includeUnknownDatatypes, typeRegistry); diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/converters/PostgresCloudEventsMaker.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/converters/PostgresCloudEventsMaker.java similarity index 95% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/converters/PostgresCloudEventsMaker.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/converters/PostgresCloudEventsMaker.java index 6c89f436d9c..57d0fdc8a7b 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/converters/PostgresCloudEventsMaker.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/converters/PostgresCloudEventsMaker.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.converters; +package io.debezium.connector.yb.postgresql.converters; import io.debezium.connector.AbstractSourceInfo; import io.debezium.converters.spi.CloudEventsMaker; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/converters/PostgresCloudEventsProvider.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/converters/PostgresCloudEventsProvider.java similarity index 91% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/converters/PostgresCloudEventsProvider.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/converters/PostgresCloudEventsProvider.java index b797fcfb9c8..1cb45781d92 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/converters/PostgresCloudEventsProvider.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/converters/PostgresCloudEventsProvider.java @@ -3,9 +3,9 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.converters; +package io.debezium.connector.yb.postgresql.converters; -import io.debezium.connector.postgresql.Module; +import io.debezium.connector.yb.postgresql.Module; import io.debezium.converters.recordandmetadata.RecordAndMetadata; import io.debezium.converters.spi.CloudEventsMaker; import io.debezium.converters.spi.CloudEventsProvider; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/converters/PostgresRecordParser.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/converters/PostgresRecordParser.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/converters/PostgresRecordParser.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/converters/PostgresRecordParser.java index babd0004437..36d2e654d03 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/converters/PostgresRecordParser.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/converters/PostgresRecordParser.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.converters; +package io.debezium.connector.yb.postgresql.converters; import java.util.Set; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/data/Ltree.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/data/Ltree.java similarity index 90% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/data/Ltree.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/data/Ltree.java index a988c741b2d..c90fd84c56d 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/data/Ltree.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/data/Ltree.java @@ -3,13 +3,12 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.data; +package io.debezium.connector.yb.postgresql.data; +import io.debezium.connector.yb.postgresql.PostgresSchemaFactory; import org.apache.kafka.connect.data.Schema; import org.apache.kafka.connect.data.SchemaBuilder; -import io.debezium.connector.postgresql.PostgresSchemaFactory; - /** * A semantic type for a Ltree string. * diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/metadata/PostgresConnectorMetadata.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/metadata/PostgresConnectorMetadata.java similarity index 74% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/metadata/PostgresConnectorMetadata.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/metadata/PostgresConnectorMetadata.java index 02879619214..1526203d73b 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/metadata/PostgresConnectorMetadata.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/metadata/PostgresConnectorMetadata.java @@ -3,12 +3,12 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.metadata; +package io.debezium.connector.yb.postgresql.metadata; import io.debezium.config.Field; -import io.debezium.connector.postgresql.Module; -import io.debezium.connector.postgresql.PostgresConnector; -import io.debezium.connector.postgresql.PostgresConnectorConfig; +import io.debezium.connector.yb.postgresql.Module; +import io.debezium.connector.yb.postgresql.PostgresConnector; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; import io.debezium.metadata.ConnectorDescriptor; import io.debezium.metadata.ConnectorMetadata; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/metadata/PostgresConnectorMetadataProvider.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/metadata/PostgresConnectorMetadataProvider.java similarity index 89% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/metadata/PostgresConnectorMetadataProvider.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/metadata/PostgresConnectorMetadataProvider.java index e285e7a50e1..d8b08109d3b 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/metadata/PostgresConnectorMetadataProvider.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/metadata/PostgresConnectorMetadataProvider.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.metadata; +package io.debezium.connector.yb.postgresql.metadata; import io.debezium.metadata.ConnectorMetadata; import io.debezium.metadata.ConnectorMetadataProvider; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/pipeline/txmetadata/PostgresTransactionMonitor.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/pipeline/txmetadata/PostgresTransactionMonitor.java similarity index 94% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/pipeline/txmetadata/PostgresTransactionMonitor.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/pipeline/txmetadata/PostgresTransactionMonitor.java index d49d356b566..f278cfd64a5 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/pipeline/txmetadata/PostgresTransactionMonitor.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/pipeline/txmetadata/PostgresTransactionMonitor.java @@ -3,15 +3,15 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.pipeline.txmetadata; +package io.debezium.connector.yb.postgresql.pipeline.txmetadata; import java.time.Instant; +import io.debezium.connector.yb.postgresql.PostgresOffsetContext; import org.apache.kafka.connect.data.Struct; import org.apache.kafka.connect.source.SourceRecord; import io.debezium.config.CommonConnectorConfig; -import io.debezium.connector.postgresql.PostgresOffsetContext; import io.debezium.function.BlockingConsumer; import io.debezium.pipeline.source.spi.EventMetadataProvider; import io.debezium.pipeline.spi.OffsetContext; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectRestExtension.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/rest/DebeziumPostgresConnectRestExtension.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectRestExtension.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/rest/DebeziumPostgresConnectRestExtension.java index db62abd445c..78c278a0ad4 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectRestExtension.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/rest/DebeziumPostgresConnectRestExtension.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.rest; +package io.debezium.connector.yb.postgresql.rest; import java.util.Map; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResource.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/rest/DebeziumPostgresConnectorResource.java similarity index 94% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResource.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/rest/DebeziumPostgresConnectorResource.java index 16e0ee9d8ff..0ac3acd7dcf 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResource.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/rest/DebeziumPostgresConnectorResource.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.rest; +package io.debezium.connector.yb.postgresql.rest; import java.util.List; import java.util.Map; @@ -16,11 +16,11 @@ import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; +import io.debezium.connector.yb.postgresql.Module; +import io.debezium.connector.yb.postgresql.PostgresConnector; import org.apache.kafka.connect.health.ConnectClusterState; import io.debezium.config.Configuration; -import io.debezium.connector.postgresql.Module; -import io.debezium.connector.postgresql.PostgresConnector; import io.debezium.rest.ConnectionValidationResource; import io.debezium.rest.FilterValidationResource; import io.debezium.rest.MetricsResource; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/AlwaysSnapshotter.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/AlwaysSnapshotter.java similarity index 91% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/AlwaysSnapshotter.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/AlwaysSnapshotter.java index 792d6d09a66..ebae15ce6b5 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/AlwaysSnapshotter.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/AlwaysSnapshotter.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.snapshot; +package io.debezium.connector.yb.postgresql.snapshot; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/InitialOnlySnapshotter.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/InitialOnlySnapshotter.java similarity index 83% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/InitialOnlySnapshotter.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/InitialOnlySnapshotter.java index b3d6e6e6ee7..b4b216cb3f8 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/InitialOnlySnapshotter.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/InitialOnlySnapshotter.java @@ -3,14 +3,14 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.snapshot; +package io.debezium.connector.yb.postgresql.snapshot; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; +import io.debezium.connector.yb.postgresql.spi.SlotState; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.postgresql.PostgresConnectorConfig; -import io.debezium.connector.postgresql.spi.OffsetState; -import io.debezium.connector.postgresql.spi.SlotState; +import io.debezium.connector.yb.postgresql.spi.OffsetState; public class InitialOnlySnapshotter extends QueryingSnapshotter { diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/InitialSnapshotter.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/InitialSnapshotter.java similarity index 84% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/InitialSnapshotter.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/InitialSnapshotter.java index 4e7b9ac97c8..ed8fc36aaa9 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/InitialSnapshotter.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/InitialSnapshotter.java @@ -3,14 +3,14 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.snapshot; +package io.debezium.connector.yb.postgresql.snapshot; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.postgresql.PostgresConnectorConfig; -import io.debezium.connector.postgresql.spi.OffsetState; -import io.debezium.connector.postgresql.spi.SlotState; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; +import io.debezium.connector.yb.postgresql.spi.OffsetState; +import io.debezium.connector.yb.postgresql.spi.SlotState; public class InitialSnapshotter extends QueryingSnapshotter { diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/NeverSnapshotter.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/NeverSnapshotter.java similarity index 83% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/NeverSnapshotter.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/NeverSnapshotter.java index 2df93f0ede9..cba828e33bc 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/NeverSnapshotter.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/NeverSnapshotter.java @@ -3,19 +3,19 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.snapshot; +package io.debezium.connector.yb.postgresql.snapshot; import java.util.List; import java.util.Optional; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; +import io.debezium.connector.yb.postgresql.spi.OffsetState; +import io.debezium.connector.yb.postgresql.spi.SlotState; +import io.debezium.connector.yb.postgresql.spi.Snapshotter; import org.apache.kafka.connect.errors.ConnectException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.postgresql.PostgresConnectorConfig; -import io.debezium.connector.postgresql.spi.OffsetState; -import io.debezium.connector.postgresql.spi.SlotState; -import io.debezium.connector.postgresql.spi.Snapshotter; import io.debezium.relational.TableId; public class NeverSnapshotter implements Snapshotter { diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/QueryingSnapshotter.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/QueryingSnapshotter.java similarity index 90% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/QueryingSnapshotter.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/QueryingSnapshotter.java index 4182db952c1..5195ad4ceb2 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/QueryingSnapshotter.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/QueryingSnapshotter.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.snapshot; +package io.debezium.connector.yb.postgresql.snapshot; import java.time.Duration; import java.util.List; @@ -11,12 +11,12 @@ import java.util.Set; import java.util.stream.Collectors; -import io.debezium.connector.postgresql.PostgresConnectorConfig; -import io.debezium.connector.postgresql.YugabyteDBServer; -import io.debezium.connector.postgresql.spi.OffsetState; -import io.debezium.connector.postgresql.spi.SlotCreationResult; -import io.debezium.connector.postgresql.spi.SlotState; -import io.debezium.connector.postgresql.spi.Snapshotter; +import io.debezium.connector.yb.postgresql.YugabyteDBServer; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; +import io.debezium.connector.yb.postgresql.spi.OffsetState; +import io.debezium.connector.yb.postgresql.spi.SlotCreationResult; +import io.debezium.connector.yb.postgresql.spi.SlotState; +import io.debezium.connector.yb.postgresql.spi.Snapshotter; import io.debezium.relational.TableId; public abstract class QueryingSnapshotter implements Snapshotter { diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/SnapshotterWrapper.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/SnapshotterWrapper.java similarity index 74% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/SnapshotterWrapper.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/SnapshotterWrapper.java index ddcbca49fa9..941f0fe3845 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/SnapshotterWrapper.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/SnapshotterWrapper.java @@ -3,12 +3,12 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.snapshot; +package io.debezium.connector.yb.postgresql.snapshot; -import io.debezium.connector.postgresql.PostgresConnectorConfig; -import io.debezium.connector.postgresql.spi.OffsetState; -import io.debezium.connector.postgresql.spi.SlotState; -import io.debezium.connector.postgresql.spi.Snapshotter; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; +import io.debezium.connector.yb.postgresql.spi.OffsetState; +import io.debezium.connector.yb.postgresql.spi.SlotState; +import io.debezium.connector.yb.postgresql.spi.Snapshotter; /** * This class is a small wrapper around the snapshotter that takes care of initialization diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/spi/OffsetState.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/spi/OffsetState.java similarity index 93% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/spi/OffsetState.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/spi/OffsetState.java index c483033c0bf..5b7ea0339df 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/spi/OffsetState.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/spi/OffsetState.java @@ -3,12 +3,12 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.spi; +package io.debezium.connector.yb.postgresql.spi; import java.time.Instant; import io.debezium.common.annotation.Incubating; -import io.debezium.connector.postgresql.connection.Lsn; +import io.debezium.connector.yb.postgresql.connection.Lsn; /** * A simple data container that represents the last seen offset diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/spi/SlotCreationResult.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/spi/SlotCreationResult.java similarity index 91% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/spi/SlotCreationResult.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/spi/SlotCreationResult.java index f5fb7a0aca7..e1cb5dd194d 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/spi/SlotCreationResult.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/spi/SlotCreationResult.java @@ -3,10 +3,10 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.spi; +package io.debezium.connector.yb.postgresql.spi; import io.debezium.common.annotation.Incubating; -import io.debezium.connector.postgresql.connection.Lsn; +import io.debezium.connector.yb.postgresql.connection.Lsn; /** * A simple data container representing the creation of a newly created replication slot. diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/spi/SlotState.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/spi/SlotState.java similarity index 93% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/spi/SlotState.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/spi/SlotState.java index f34af961777..04653fecc67 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/spi/SlotState.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/spi/SlotState.java @@ -3,10 +3,10 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.spi; +package io.debezium.connector.yb.postgresql.spi; import io.debezium.common.annotation.Incubating; -import io.debezium.connector.postgresql.connection.Lsn; +import io.debezium.connector.yb.postgresql.connection.Lsn; /** * A simple data container that holds the state of the current slot diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/spi/Snapshotter.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/spi/Snapshotter.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/spi/Snapshotter.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/spi/Snapshotter.java index 75aa638ebdb..31b87468f6d 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/spi/Snapshotter.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/spi/Snapshotter.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.spi; +package io.debezium.connector.yb.postgresql.spi; import java.time.Duration; import java.util.List; @@ -11,7 +11,7 @@ import java.util.Set; import io.debezium.common.annotation.Incubating; -import io.debezium.connector.postgresql.PostgresConnectorConfig; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; import io.debezium.relational.TableId; /** diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/AbstractTimescaleDbMetadata.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/AbstractTimescaleDbMetadata.java similarity index 92% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/AbstractTimescaleDbMetadata.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/AbstractTimescaleDbMetadata.java index 211e0a24218..ab309e4ed43 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/AbstractTimescaleDbMetadata.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/AbstractTimescaleDbMetadata.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.transforms.timescaledb; +package io.debezium.connector.yb.postgresql.transforms.timescaledb; import java.util.HashSet; import java.util.Set; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/QueryInformationSchemaMetadata.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/QueryInformationSchemaMetadata.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/QueryInformationSchemaMetadata.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/QueryInformationSchemaMetadata.java index 7e1528bfee2..07ff6b324f3 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/QueryInformationSchemaMetadata.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/QueryInformationSchemaMetadata.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.transforms.timescaledb; +package io.debezium.connector.yb.postgresql.transforms.timescaledb; import java.io.IOException; import java.sql.SQLException; @@ -11,13 +11,13 @@ import java.util.Map; import java.util.Optional; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import io.debezium.DebeziumException; import io.debezium.config.CommonConnectorConfig; import io.debezium.config.Configuration; -import io.debezium.connector.postgresql.connection.PostgresConnection; import io.debezium.jdbc.JdbcConfiguration; import io.debezium.relational.TableId; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDb.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDb.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDb.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDb.java index 427f0d1d794..7988a65d5db 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDb.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDb.java @@ -3,12 +3,13 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.transforms.timescaledb; +package io.debezium.connector.yb.postgresql.transforms.timescaledb; import java.io.IOException; import java.util.Map; import java.util.Optional; +import io.debezium.connector.yb.postgresql.SourceInfo; import org.apache.kafka.common.config.ConfigDef; import org.apache.kafka.connect.connector.ConnectRecord; import org.apache.kafka.connect.data.Struct; @@ -20,7 +21,6 @@ import io.debezium.annotation.VisibleForTesting; import io.debezium.config.Configuration; import io.debezium.config.Field; -import io.debezium.connector.postgresql.SourceInfo; import io.debezium.data.Envelope; import io.debezium.relational.TableId; import io.debezium.transforms.SmtManager; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbConfigDefinition.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDbConfigDefinition.java similarity index 95% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbConfigDefinition.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDbConfigDefinition.java index 83e3351d511..1daa1034fac 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbConfigDefinition.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDbConfigDefinition.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.transforms.timescaledb; +package io.debezium.connector.yb.postgresql.transforms.timescaledb; import org.apache.kafka.common.config.ConfigDef; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbMetadata.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDbMetadata.java similarity index 94% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbMetadata.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDbMetadata.java index c8207173dc9..82f0106f71a 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbMetadata.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDbMetadata.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.transforms.timescaledb; +package io.debezium.connector.yb.postgresql.transforms.timescaledb; import java.io.Closeable; import java.util.Optional; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/yugabytedb/Pair.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/yugabytedb/Pair.java similarity index 94% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/yugabytedb/Pair.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/yugabytedb/Pair.java index 8de3f6ceca7..f7164d330d9 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/yugabytedb/Pair.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/yugabytedb/Pair.java @@ -1,4 +1,4 @@ -package io.debezium.connector.postgresql.transforms.yugabytedb; +package io.debezium.connector.yb.postgresql.transforms.yugabytedb; import java.util.Objects; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/yugabytedb/YBExtractNewRecordState.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/yugabytedb/YBExtractNewRecordState.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/yugabytedb/YBExtractNewRecordState.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/yugabytedb/YBExtractNewRecordState.java index 17ed72e903b..0add7a221b9 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/yugabytedb/YBExtractNewRecordState.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/yugabytedb/YBExtractNewRecordState.java @@ -1,4 +1,4 @@ -package io.debezium.connector.postgresql.transforms.yugabytedb; +package io.debezium.connector.yb.postgresql.transforms.yugabytedb; import java.util.Map; import java.util.Objects; diff --git a/debezium-connector-postgres/src/main/resources/META-INF/services/io.debezium.converters.spi.CloudEventsProvider b/debezium-connector-postgres/src/main/resources/META-INF/services/io.debezium.converters.spi.CloudEventsProvider index d7fbe52474b..fd150ed7ad3 100644 --- a/debezium-connector-postgres/src/main/resources/META-INF/services/io.debezium.converters.spi.CloudEventsProvider +++ b/debezium-connector-postgres/src/main/resources/META-INF/services/io.debezium.converters.spi.CloudEventsProvider @@ -1 +1 @@ -io.debezium.connector.postgresql.converters.PostgresCloudEventsProvider \ No newline at end of file +io.debezium.connector.yb.postgresql.converters.PostgresCloudEventsProvider \ No newline at end of file diff --git a/debezium-connector-postgres/src/main/resources/META-INF/services/io.debezium.metadata.ConnectorMetadataProvider b/debezium-connector-postgres/src/main/resources/META-INF/services/io.debezium.metadata.ConnectorMetadataProvider index 0b9baa6a2e7..af37a7cf3cd 100644 --- a/debezium-connector-postgres/src/main/resources/META-INF/services/io.debezium.metadata.ConnectorMetadataProvider +++ b/debezium-connector-postgres/src/main/resources/META-INF/services/io.debezium.metadata.ConnectorMetadataProvider @@ -1 +1 @@ -io.debezium.connector.postgresql.metadata.PostgresConnectorMetadataProvider +io.debezium.connector.yb.postgresql.metadata.PostgresConnectorMetadataProvider diff --git a/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.rest.ConnectRestExtension b/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.rest.ConnectRestExtension index 93e7adc153b..2f3416f161e 100644 --- a/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.rest.ConnectRestExtension +++ b/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.rest.ConnectRestExtension @@ -1 +1 @@ -io.debezium.connector.postgresql.rest.DebeziumPostgresConnectRestExtension +io.debezium.connector.yb.postgresql.rest.DebeziumPostgresConnectRestExtension diff --git a/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.source.SourceConnector b/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.source.SourceConnector index 58de09f1bbf..6bfaced2443 100644 --- a/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.source.SourceConnector +++ b/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.source.SourceConnector @@ -1 +1 @@ -io.debezium.connector.postgresql.PostgresConnector \ No newline at end of file +io.debezium.connector.yb.postgresql.PostgresConnector \ No newline at end of file diff --git a/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.transforms.Transformation b/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.transforms.Transformation index f63e1f87484..df7ca6785f7 100644 --- a/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.transforms.Transformation +++ b/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.transforms.Transformation @@ -1 +1 @@ -io.debezium.connector.postgresql.transforms.timescaledb.TimescaleDb \ No newline at end of file +io.debezium.connector.yb.postgresql.transforms.timescaledb.TimescaleDb \ No newline at end of file diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/AbstractRecordsProducerTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/AbstractRecordsProducerTest.java similarity index 99% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/AbstractRecordsProducerTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/AbstractRecordsProducerTest.java index 95f5cd8a991..4d3ba5407f2 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/AbstractRecordsProducerTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/AbstractRecordsProducerTest.java @@ -4,9 +4,8 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; -import static io.debezium.connector.postgresql.TestHelper.PK_FIELD; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; @@ -59,7 +58,7 @@ import org.slf4j.LoggerFactory; import io.debezium.connector.SnapshotRecord; -import io.debezium.connector.postgresql.data.Ltree; +import io.debezium.connector.yb.postgresql.data.Ltree; import io.debezium.data.Bits; import io.debezium.data.Envelope; import io.debezium.data.Json; @@ -972,7 +971,7 @@ protected List schemasAndValuesForDomainAliasTypes(boolean final ByteBuffer polygonByteBuffer = ByteBuffer.wrap("((0.0,0.0),(0.0,1.0),(1.0,0.0),(0.0,0.0))".getBytes()); return Arrays.asList( - new SchemaAndValueField(PK_FIELD, SchemaBuilder.int32().defaultValue(0).build(), 1), + new SchemaAndValueField(TestHelper.PK_FIELD, SchemaBuilder.int32().defaultValue(0).build(), 1), new SchemaAndValueField("bit_base", Bits.builder(3).build(), new byte[]{ 5 }), new SchemaAndValueField("bit_alias", Bits.builder(3).build(), new byte[]{ 5 }), new SchemaAndValueField("smallint_base", SchemaBuilder.INT16_SCHEMA, (short) 1), diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/BlockingSnapshotIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/BlockingSnapshotIT.java similarity index 97% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/BlockingSnapshotIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/BlockingSnapshotIT.java index 7f5d129a0de..2a7a300d6d1 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/BlockingSnapshotIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/BlockingSnapshotIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import static io.debezium.pipeline.signal.actions.AbstractSnapshotSignal.SnapshotType.BLOCKING; @@ -17,7 +17,7 @@ import io.debezium.config.CommonConnectorConfig; import io.debezium.config.Configuration; -import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; import io.debezium.doc.FixFor; import io.debezium.jdbc.JdbcConnection; import io.debezium.pipeline.AbstractBlockingSnapshotTest; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CloudEventsConverterIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CloudEventsConverterIT.java similarity index 97% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CloudEventsConverterIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CloudEventsConverterIT.java index 59d59bc2e58..3958afa8337 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CloudEventsConverterIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CloudEventsConverterIT.java @@ -4,14 +4,14 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.util.UUID; import org.junit.Before; import io.debezium.config.Configuration; -import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; import io.debezium.converters.AbstractCloudEventsConverterTest; import io.debezium.jdbc.JdbcConnection; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomLifecycleHookTestSnapshot.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomLifecycleHookTestSnapshot.java similarity index 87% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomLifecycleHookTestSnapshot.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomLifecycleHookTestSnapshot.java index 3e2565033f2..acfb1fcf773 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomLifecycleHookTestSnapshot.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomLifecycleHookTestSnapshot.java @@ -4,9 +4,9 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; -import io.debezium.connector.postgresql.snapshot.AlwaysSnapshotter; +import io.debezium.connector.yb.postgresql.snapshot.AlwaysSnapshotter; public class CustomLifecycleHookTestSnapshot extends AlwaysSnapshotter { diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomPartialTableTestSnapshot.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomPartialTableTestSnapshot.java similarity index 93% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomPartialTableTestSnapshot.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomPartialTableTestSnapshot.java index 02723389b50..9e4654ec435 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomPartialTableTestSnapshot.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomPartialTableTestSnapshot.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.util.List; import java.util.Optional; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomPostgresSourceInfoStructMaker.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomPostgresSourceInfoStructMaker.java similarity index 89% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomPostgresSourceInfoStructMaker.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomPostgresSourceInfoStructMaker.java index 370bce6327b..bc2c5129ef9 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomPostgresSourceInfoStructMaker.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomPostgresSourceInfoStructMaker.java @@ -4,8 +4,10 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; +import io.debezium.connector.yb.postgresql.PostgresSourceInfoStructMaker; +import io.debezium.connector.yb.postgresql.SourceInfo; import org.apache.kafka.connect.data.Schema; import org.apache.kafka.connect.data.Struct; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomStartFromStreamingTestSnapshot.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomStartFromStreamingTestSnapshot.java similarity index 74% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomStartFromStreamingTestSnapshot.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomStartFromStreamingTestSnapshot.java index 9e13d245150..154ebdd7274 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomStartFromStreamingTestSnapshot.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomStartFromStreamingTestSnapshot.java @@ -4,9 +4,9 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; -import io.debezium.connector.postgresql.snapshot.AlwaysSnapshotter; +import io.debezium.connector.yb.postgresql.snapshot.AlwaysSnapshotter; public class CustomStartFromStreamingTestSnapshot extends AlwaysSnapshotter { @Override diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomTestSnapshot.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomTestSnapshot.java similarity index 83% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomTestSnapshot.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomTestSnapshot.java index f5ea83d4a70..4dfbaaf68a0 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomTestSnapshot.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomTestSnapshot.java @@ -3,16 +3,17 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; -import io.debezium.connector.postgresql.spi.OffsetState; -import io.debezium.connector.postgresql.spi.SlotCreationResult; -import io.debezium.connector.postgresql.spi.SlotState; -import io.debezium.connector.postgresql.spi.Snapshotter; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; +import io.debezium.connector.yb.postgresql.spi.OffsetState; +import io.debezium.connector.yb.postgresql.spi.SlotCreationResult; +import io.debezium.connector.yb.postgresql.spi.SlotState; +import io.debezium.connector.yb.postgresql.spi.Snapshotter; import io.debezium.relational.TableId; /** diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomTypeEncodingTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomTypeEncodingTest.java similarity index 95% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomTypeEncodingTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomTypeEncodingTest.java index 706eb67494c..416c96d8106 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomTypeEncodingTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomTypeEncodingTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import static org.junit.Assert.assertEquals; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DebeziumEngineIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/DebeziumEngineIT.java similarity index 99% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DebeziumEngineIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/DebeziumEngineIT.java index 8d2cae40ae1..975c6fa915d 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DebeziumEngineIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/DebeziumEngineIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import static org.assertj.core.api.Assertions.assertThat; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DecoderDifferences.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/DecoderDifferences.java similarity index 97% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DecoderDifferences.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/DecoderDifferences.java index 7a2da2c0898..45b37863a55 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DecoderDifferences.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/DecoderDifferences.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.util.List; import java.util.stream.Collectors; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DomainTypesIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/DomainTypesIT.java similarity index 96% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DomainTypesIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/DomainTypesIT.java index fc78d6e9fb3..c99db5757f7 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DomainTypesIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/DomainTypesIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import static io.debezium.junit.EqualityCheck.LESS_THAN; import static org.assertj.core.api.Assertions.assertThat; @@ -22,7 +22,7 @@ import org.junit.Before; import org.junit.Test; -import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; import io.debezium.doc.FixFor; import io.debezium.junit.SkipWhenDatabaseVersion; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/FieldTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/FieldTest.java similarity index 77% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/FieldTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/FieldTest.java index c72abda9c09..cd6ff58bcb5 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/FieldTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/FieldTest.java @@ -4,8 +4,9 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; import org.junit.Before; import io.debezium.config.AbstractFieldTest; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/IncrementalSnapshotIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/IncrementalSnapshotIT.java similarity index 99% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/IncrementalSnapshotIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/IncrementalSnapshotIT.java index 57f6ce31180..2932eefbe2a 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/IncrementalSnapshotIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/IncrementalSnapshotIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import static io.debezium.junit.EqualityCheck.LESS_THAN; import static org.assertj.core.api.Assertions.assertThat; @@ -29,7 +29,7 @@ import io.debezium.config.CommonConnectorConfig; import io.debezium.config.Configuration; -import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; import io.debezium.data.VariableScaleDecimal; import io.debezium.doc.FixFor; import io.debezium.jdbc.JdbcConnection; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/LogicalDecodingMessageIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/LogicalDecodingMessageIT.java similarity index 97% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/LogicalDecodingMessageIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/LogicalDecodingMessageIT.java index f5a28ac5622..d11b936b8c4 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/LogicalDecodingMessageIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/LogicalDecodingMessageIT.java @@ -4,9 +4,9 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; -import static io.debezium.connector.postgresql.TestHelper.topicName; +import static io.debezium.connector.yb.postgresql.TestHelper.topicName; import static io.debezium.junit.EqualityCheck.LESS_THAN; import static junit.framework.TestCase.assertEquals; import static org.assertj.core.api.Assertions.assertThat; @@ -18,6 +18,7 @@ import java.util.Base64; import java.util.List; +import io.debezium.connector.yb.postgresql.junit.SkipWhenDecoderPluginNameIsNot; import org.apache.kafka.connect.data.Struct; import org.apache.kafka.connect.source.SourceRecord; import org.junit.After; @@ -28,8 +29,7 @@ import org.junit.rules.TestRule; import io.debezium.config.Configuration; -import io.debezium.connector.postgresql.junit.SkipTestDependingOnDecoderPluginNameRule; -import io.debezium.connector.postgresql.junit.SkipWhenDecoderPluginNameIsNot; +import io.debezium.connector.yb.postgresql.junit.SkipTestDependingOnDecoderPluginNameRule; import io.debezium.data.Envelope; import io.debezium.doc.FixFor; import io.debezium.embedded.AbstractConnectorTest; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/NotificationsIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/NotificationsIT.java similarity index 97% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/NotificationsIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/NotificationsIT.java index 8c6d01c4167..3c5e8798991 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/NotificationsIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/NotificationsIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.sql.SQLException; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/OutboxEventRouterIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/OutboxEventRouterIT.java similarity index 97% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/OutboxEventRouterIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/OutboxEventRouterIT.java index 25a9f024181..464beda45cb 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/OutboxEventRouterIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/OutboxEventRouterIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.util.UUID; @@ -12,7 +12,7 @@ import org.junit.Before; import io.debezium.config.Configuration; -import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; import io.debezium.data.Json; import io.debezium.data.Uuid; import io.debezium.jdbc.JdbcConnection; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorConfigDefTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresConnectorConfigDefTest.java similarity index 98% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorConfigDefTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresConnectorConfigDefTest.java index debbe9b8227..eeddee9e9ef 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorConfigDefTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresConnectorConfigDefTest.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import static org.assertj.core.api.Assertions.assertThat; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresConnectorIT.java similarity index 99% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresConnectorIT.java index 818ada97539..eac256ea6b6 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresConnectorIT.java @@ -4,11 +4,11 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; -import static io.debezium.connector.postgresql.TestHelper.PK_FIELD; -import static io.debezium.connector.postgresql.TestHelper.getDefaultReplicationSlot; -import static io.debezium.connector.postgresql.TestHelper.topicName; +import static io.debezium.connector.yb.postgresql.TestHelper.PK_FIELD; +import static io.debezium.connector.yb.postgresql.TestHelper.getDefaultReplicationSlot; +import static io.debezium.connector.yb.postgresql.TestHelper.topicName; import static io.debezium.junit.EqualityCheck.LESS_THAN; import static junit.framework.TestCase.assertEquals; import static org.assertj.core.api.Assertions.assertThat; @@ -42,6 +42,9 @@ import javax.management.InstanceNotFoundException; +import io.debezium.connector.yb.postgresql.junit.SkipTestDependingOnDecoderPluginNameRule; +import io.debezium.connector.yb.postgresql.junit.SkipWhenDecoderPluginNameIs; +import io.debezium.connector.yb.postgresql.junit.SkipWhenDecoderPluginNameIsNot; import org.apache.commons.lang3.RandomStringUtils; import org.apache.kafka.common.config.Config; import org.apache.kafka.common.config.ConfigDef; @@ -69,19 +72,16 @@ import io.debezium.config.Configuration; import io.debezium.config.EnumeratedValue; import io.debezium.config.Field; -import io.debezium.connector.postgresql.PostgresConnectorConfig.LogicalDecoder; -import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; -import io.debezium.connector.postgresql.connection.AbstractMessageDecoder; -import io.debezium.connector.postgresql.connection.PostgresConnection; -import io.debezium.connector.postgresql.connection.PostgresReplicationConnection; -import io.debezium.connector.postgresql.connection.ReplicaIdentityInfo; -import io.debezium.connector.postgresql.connection.ReplicationConnection; -import io.debezium.connector.postgresql.connection.pgoutput.PgOutputMessageDecoder; -import io.debezium.connector.postgresql.junit.SkipTestDependingOnDecoderPluginNameRule; -import io.debezium.connector.postgresql.junit.SkipWhenDecoderPluginNameIs; -import io.debezium.connector.postgresql.junit.SkipWhenDecoderPluginNameIsNot; -import io.debezium.connector.postgresql.snapshot.InitialOnlySnapshotter; -import io.debezium.connector.postgresql.spi.SlotState; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.LogicalDecoder; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.yb.postgresql.connection.AbstractMessageDecoder; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection; +import io.debezium.connector.yb.postgresql.connection.PostgresReplicationConnection; +import io.debezium.connector.yb.postgresql.connection.ReplicaIdentityInfo; +import io.debezium.connector.yb.postgresql.connection.ReplicationConnection; +import io.debezium.connector.yb.postgresql.connection.pgoutput.PgOutputMessageDecoder; +import io.debezium.connector.yb.postgresql.snapshot.InitialOnlySnapshotter; +import io.debezium.connector.yb.postgresql.spi.SlotState; import io.debezium.converters.CloudEventsConverterTest; import io.debezium.data.Envelope; import io.debezium.data.VerifyRecord; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorTaskIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresConnectorTaskIT.java similarity index 91% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorTaskIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresConnectorTaskIT.java index 172fd53545b..8ddbe8a9a3a 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorTaskIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresConnectorTaskIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.sql.SQLException; import java.time.Duration; @@ -13,8 +13,8 @@ import org.junit.Assert; import org.junit.Test; -import io.debezium.connector.postgresql.connection.PostgresConnection; -import io.debezium.connector.postgresql.connection.ReplicationConnection; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection; +import io.debezium.connector.yb.postgresql.connection.ReplicationConnection; import io.debezium.doc.FixFor; import io.debezium.schema.SchemaTopicNamingStrategy; import io.debezium.spi.topic.TopicNamingStrategy; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresDefaultValueConverterIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresDefaultValueConverterIT.java similarity index 96% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresDefaultValueConverterIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresDefaultValueConverterIT.java index 77302cae90d..395b12dcc6f 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresDefaultValueConverterIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresDefaultValueConverterIT.java @@ -3,9 +3,9 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; -import static io.debezium.connector.postgresql.TestHelper.topicName; +import static io.debezium.connector.yb.postgresql.TestHelper.topicName; import static org.assertj.core.api.Assertions.assertThat; import java.sql.SQLException; @@ -19,8 +19,8 @@ import org.junit.Test; import io.debezium.config.Configuration; -import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; -import io.debezium.connector.postgresql.connection.PostgresDefaultValueConverter; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.yb.postgresql.connection.PostgresDefaultValueConverter; import io.debezium.data.Envelope; import io.debezium.doc.FixFor; import io.debezium.embedded.AbstractConnectorTest; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresErrorHandlerTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresErrorHandlerTest.java similarity index 93% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresErrorHandlerTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresErrorHandlerTest.java index 1c812fc10c8..460a33aadf4 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresErrorHandlerTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresErrorHandlerTest.java @@ -3,10 +3,12 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import static org.assertj.core.api.Assertions.assertThat; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; +import io.debezium.connector.yb.postgresql.PostgresErrorHandler; import org.junit.Test; import com.yugabyte.util.PSQLException; import com.yugabyte.util.PSQLState; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMetricsIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresMetricsIT.java similarity index 99% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMetricsIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresMetricsIT.java index 7ff4d50f290..8bb98db4a02 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMetricsIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresMetricsIT.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import static org.assertj.core.api.Assertions.assertThat; @@ -27,7 +27,7 @@ import org.slf4j.LoggerFactory; import io.debezium.config.Configuration; -import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; import io.debezium.doc.FixFor; import io.debezium.junit.EqualityCheck; import io.debezium.junit.SkipWhenJavaVersion; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMoneyIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresMoneyIT.java similarity index 98% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMoneyIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresMoneyIT.java index 2d7192e414c..a31967fbeee 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMoneyIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresMoneyIT.java @@ -4,9 +4,9 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; -import static io.debezium.connector.postgresql.TestHelper.topicName; +import static io.debezium.connector.yb.postgresql.TestHelper.topicName; import static org.assertj.core.api.Assertions.assertThat; import java.math.BigDecimal; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresOffsetContextTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresOffsetContextTest.java similarity index 92% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresOffsetContextTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresOffsetContextTest.java index aa58cc6bc72..2c5fd65e703 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresOffsetContextTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresOffsetContextTest.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import static org.assertj.core.api.Assertions.assertThat; @@ -13,7 +13,7 @@ import org.junit.Before; import org.junit.Test; -import io.debezium.connector.postgresql.connection.Lsn; +import io.debezium.connector.yb.postgresql.connection.Lsn; import io.debezium.doc.FixFor; import io.debezium.pipeline.spi.OffsetContext; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresPartitionTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresPartitionTest.java similarity index 84% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresPartitionTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresPartitionTest.java index 1a12573ab91..022399909ba 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresPartitionTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresPartitionTest.java @@ -3,9 +3,10 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import io.debezium.connector.common.AbstractPartitionTest; +import io.debezium.connector.yb.postgresql.PostgresPartition; public class PostgresPartitionTest extends AbstractPartitionTest { diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresReselectColumnsProcessorIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresReselectColumnsProcessorIT.java similarity index 97% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresReselectColumnsProcessorIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresReselectColumnsProcessorIT.java index a3548342e69..b22bef27a9a 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresReselectColumnsProcessorIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresReselectColumnsProcessorIT.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import static org.assertj.core.api.Assertions.assertThat; @@ -17,7 +17,7 @@ import org.junit.Test; import io.debezium.config.Configuration; -import io.debezium.connector.postgresql.connection.PostgresConnection; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection; import io.debezium.data.Envelope; import io.debezium.data.VerifyRecord; import io.debezium.doc.FixFor; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresSchemaIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresSchemaIT.java similarity index 99% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresSchemaIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresSchemaIT.java index c8b9609def7..9d59c25329d 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresSchemaIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresSchemaIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import static io.debezium.junit.EqualityCheck.LESS_THAN; import static io.debezium.relational.RelationalDatabaseConnectorConfig.SCHEMA_EXCLUDE_LIST; @@ -31,9 +31,9 @@ import org.junit.Rule; import org.junit.Test; -import io.debezium.connector.postgresql.connection.PostgresConnection; -import io.debezium.connector.postgresql.connection.PostgresDefaultValueConverter; -import io.debezium.connector.postgresql.data.Ltree; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection; +import io.debezium.connector.yb.postgresql.connection.PostgresDefaultValueConverter; +import io.debezium.connector.yb.postgresql.data.Ltree; import io.debezium.data.Bits; import io.debezium.data.Json; import io.debezium.data.Uuid; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresShutdownIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresShutdownIT.java similarity index 97% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresShutdownIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresShutdownIT.java index 92420fa6d9b..b59222fd998 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresShutdownIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresShutdownIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import java.sql.SQLException; import java.util.concurrent.TimeUnit; @@ -22,8 +22,8 @@ import io.debezium.config.CommonConnectorConfig; import io.debezium.config.Configuration; -import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; -import io.debezium.connector.postgresql.connection.PostgresConnection; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection; import io.debezium.doc.FixFor; import io.debezium.embedded.AbstractConnectorTest; import io.debezium.embedded.EmbeddedEngine; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresSkipMessagesWithoutChangeConfigIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresSkipMessagesWithoutChangeConfigIT.java similarity index 98% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresSkipMessagesWithoutChangeConfigIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresSkipMessagesWithoutChangeConfigIT.java index 1b4fef818a4..866930aee8e 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresSkipMessagesWithoutChangeConfigIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresSkipMessagesWithoutChangeConfigIT.java @@ -4,9 +4,9 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; -import static io.debezium.connector.postgresql.TestHelper.topicName; +import static io.debezium.connector.yb.postgresql.TestHelper.topicName; import static org.assertj.core.api.Assertions.assertThat; import java.util.List; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PublicGeometryIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PublicGeometryIT.java similarity index 89% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PublicGeometryIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PublicGeometryIT.java index 624fbcd4620..1c40d8bb2ab 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PublicGeometryIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PublicGeometryIT.java @@ -4,16 +4,16 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; -import static io.debezium.connector.postgresql.TestHelper.PK_FIELD; -import static io.debezium.connector.postgresql.TestHelper.topicName; import static junit.framework.TestCase.assertEquals; import static org.junit.Assert.assertFalse; import java.util.List; import java.util.concurrent.TimeUnit; +import io.debezium.connector.yb.postgresql.junit.SkipTestDependingOnDecoderPluginNameRule; +import junit.framework.TestCase; import org.apache.kafka.connect.source.SourceRecord; import org.junit.Before; import org.junit.Rule; @@ -22,10 +22,9 @@ import io.debezium.config.Configuration; import io.debezium.connector.SnapshotRecord; -import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; -import io.debezium.connector.postgresql.connection.PostgresConnection; -import io.debezium.connector.postgresql.connection.ReplicationConnection; -import io.debezium.connector.postgresql.junit.SkipTestDependingOnDecoderPluginNameRule; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection; +import io.debezium.connector.yb.postgresql.connection.ReplicationConnection; import io.debezium.data.Envelope; import io.debezium.data.VerifyRecord; import io.debezium.doc.FixFor; @@ -103,7 +102,7 @@ private void assertInsert(String statement, Integer pk, List config .with(PostgresConnectorConfig.SCHEMA_REFRESH_MODE, PostgresConnectorConfig.SchemaRefreshMode.COLUMNS_DIFF_EXCLUDE_UNCHANGED_TOAST)); @@ -3835,7 +3834,7 @@ private String getReplicationSlotChangesQuery() { case DECODERBUFS: return "SELECT pg_logical_slot_get_binary_changes('" + ReplicationConnection.Builder.DEFAULT_SLOT_NAME + "', " + "NULL, NULL)"; - case PGOUTPUT: + case SkipWhenDecoderPluginNameIs.DecoderPluginName.PGOUTPUT: return "SELECT pg_logical_slot_get_binary_changes('" + ReplicationConnection.Builder.DEFAULT_SLOT_NAME + "', " + "NULL, NULL, 'proto_version', '1', 'publication_names', '" + ReplicationConnection.Builder.DEFAULT_PUBLICATION_NAME + "')"; } diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/ReplicaIdentityTestMapperTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/ReplicaIdentityTestMapperTest.java similarity index 91% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/ReplicaIdentityTestMapperTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/ReplicaIdentityTestMapperTest.java index e2c47e5b1e7..02df11fd33a 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/ReplicaIdentityTestMapperTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/ReplicaIdentityTestMapperTest.java @@ -4,13 +4,14 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import static org.junit.Assert.assertEquals; +import io.debezium.connector.yb.postgresql.ReplicaIdentityMapper; import org.junit.Test; -import io.debezium.connector.postgresql.connection.ReplicaIdentityInfo; +import io.debezium.connector.yb.postgresql.connection.ReplicaIdentityInfo; import io.debezium.relational.TableId; public class ReplicaIdentityTestMapperTest { diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SignalsIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/SignalsIT.java similarity index 98% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SignalsIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/SignalsIT.java index 68090504f21..16a64b4e9d4 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SignalsIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/SignalsIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import static org.assertj.core.api.Assertions.assertThat; @@ -28,8 +28,8 @@ import io.debezium.config.CommonConnectorConfig; import io.debezium.config.Configuration; -import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; -import io.debezium.connector.postgresql.spi.CustomActionProvider; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.yb.postgresql.spi.CustomActionProvider; import io.debezium.embedded.AbstractConnectorTest; import io.debezium.junit.logging.LogInterceptor; import io.debezium.pipeline.signal.actions.Log; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SnapshotWithOverridesProducerIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/SnapshotWithOverridesProducerIT.java similarity index 93% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SnapshotWithOverridesProducerIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/SnapshotWithOverridesProducerIT.java index 60b654e387b..c84880e4af0 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SnapshotWithOverridesProducerIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/SnapshotWithOverridesProducerIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import static org.assertj.core.api.Assertions.assertThat; @@ -18,10 +18,10 @@ import org.junit.Test; import io.debezium.config.Configuration; -import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; /** - * Integration test for {@link io.debezium.connector.postgresql.PostgresConnectorConfig.SNAPSHOT_SELECT_STATEMENT_OVERRIDES_BY_TABLE} + * Integration test for {@link PostgresConnectorConfig.SNAPSHOT_SELECT_STATEMENT_OVERRIDES_BY_TABLE} * * @author Jiri Pechanec (jpechane@redhat.com) */ diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SourceInfoTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/SourceInfoTest.java similarity index 92% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SourceInfoTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/SourceInfoTest.java index a61065bd883..737663f1a87 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SourceInfoTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/SourceInfoTest.java @@ -3,10 +3,13 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import static org.assertj.core.api.Assertions.assertThat; +import io.debezium.connector.yb.postgresql.Module; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; +import io.debezium.connector.yb.postgresql.SourceInfo; import org.apache.kafka.connect.data.Schema; import org.apache.kafka.connect.data.SchemaBuilder; import org.junit.Before; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TablesWithoutPrimaryKeyIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/TablesWithoutPrimaryKeyIT.java similarity index 98% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TablesWithoutPrimaryKeyIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/TablesWithoutPrimaryKeyIT.java index 345a989d894..468dab54f7b 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TablesWithoutPrimaryKeyIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/TablesWithoutPrimaryKeyIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import static org.assertj.core.api.Assertions.assertThat; @@ -18,7 +18,7 @@ import org.junit.Before; import org.junit.Test; -import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; /** * Integration test to verify behaviour of tables that do not have primary key diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TestHelper.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/TestHelper.java similarity index 97% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TestHelper.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/TestHelper.java index eb9df058f6e..7dd8056a509 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TestHelper.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/TestHelper.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.fail; @@ -34,12 +34,12 @@ import io.debezium.config.CommonConnectorConfig; import io.debezium.config.Configuration; -import io.debezium.connector.postgresql.PostgresConnectorConfig.SecureConnectionMode; -import io.debezium.connector.postgresql.connection.PostgresConnection; -import io.debezium.connector.postgresql.connection.PostgresConnection.PostgresValueConverterBuilder; -import io.debezium.connector.postgresql.connection.PostgresDefaultValueConverter; -import io.debezium.connector.postgresql.connection.ReplicationConnection; -import io.debezium.connector.postgresql.spi.SlotState; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SecureConnectionMode; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection.PostgresValueConverterBuilder; +import io.debezium.connector.yb.postgresql.connection.PostgresDefaultValueConverter; +import io.debezium.connector.yb.postgresql.connection.ReplicationConnection; +import io.debezium.connector.yb.postgresql.spi.SlotState; import io.debezium.jdbc.JdbcConfiguration; import io.debezium.schema.SchemaTopicNamingStrategy; import io.debezium.spi.topic.TopicNamingStrategy; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TransactionMetadataIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/TransactionMetadataIT.java similarity index 96% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TransactionMetadataIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/TransactionMetadataIT.java index bd65c93c538..5a0b20fb95f 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TransactionMetadataIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/TransactionMetadataIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import static org.assertj.core.api.Assertions.assertThat; @@ -17,6 +17,7 @@ import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; +import io.debezium.connector.yb.postgresql.junit.SkipTestDependingOnDecoderPluginNameRule; import org.apache.kafka.connect.data.Struct; import org.apache.kafka.connect.source.SourceRecord; import org.awaitility.Awaitility; @@ -28,8 +29,7 @@ import org.junit.rules.TestRule; import io.debezium.config.Configuration; -import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; -import io.debezium.connector.postgresql.junit.SkipTestDependingOnDecoderPluginNameRule; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; import io.debezium.embedded.AbstractConnectorTest; import io.debezium.junit.EqualityCheck; import io.debezium.junit.SkipWhenKafkaVersion; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YBVerifyRecord.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/YBVerifyRecord.java similarity index 96% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YBVerifyRecord.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/YBVerifyRecord.java index 1f08a6b9332..b6d310a7bf0 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YBVerifyRecord.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/YBVerifyRecord.java @@ -1,4 +1,4 @@ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import io.debezium.data.Envelope; import io.debezium.data.VerifyRecord; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteReplicaIdentityIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/YugabyteReplicaIdentityIT.java similarity index 98% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteReplicaIdentityIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/YugabyteReplicaIdentityIT.java index fef97945de6..3e8c8168aeb 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteReplicaIdentityIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/YugabyteReplicaIdentityIT.java @@ -1,4 +1,4 @@ -package io.debezium.connector.postgresql; +package io.debezium.connector.yb.postgresql; import io.debezium.config.Configuration; import io.debezium.data.Envelope; @@ -17,8 +17,8 @@ import java.util.List; import java.util.concurrent.TimeUnit; -import static io.debezium.connector.postgresql.TestHelper.PK_FIELD; -import static io.debezium.connector.postgresql.TestHelper.topicName; +import static io.debezium.connector.yb.postgresql.TestHelper.PK_FIELD; +import static io.debezium.connector.yb.postgresql.TestHelper.topicName; import static org.assertj.core.api.Assertions.assertThat; /** diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/connection/ISODateTimeFormatTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/connection/ISODateTimeFormatTest.java similarity index 98% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/connection/ISODateTimeFormatTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/connection/ISODateTimeFormatTest.java index 915d1a398a2..d8c2d563282 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/connection/ISODateTimeFormatTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/connection/ISODateTimeFormatTest.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection; +package io.debezium.connector.yb.postgresql.connection; import static org.assertj.core.api.Assertions.assertThat; @@ -17,6 +17,7 @@ import java.time.format.TextStyle; import java.util.Locale; +import io.debezium.connector.yb.postgresql.connection.DateTimeFormat; import org.junit.Test; public class ISODateTimeFormatTest { diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/connection/PostgresConnectionIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/connection/PostgresConnectionIT.java similarity index 99% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/connection/PostgresConnectionIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/connection/PostgresConnectionIT.java index 1defabb8e99..756f47d0588 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/connection/PostgresConnectionIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/connection/PostgresConnectionIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection; +package io.debezium.connector.yb.postgresql.connection; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -24,7 +24,7 @@ import org.junit.Test; import com.yugabyte.jdbc.PgConnection; -import io.debezium.connector.postgresql.TestHelper; +import io.debezium.connector.yb.postgresql.TestHelper; import io.debezium.doc.FixFor; import io.debezium.jdbc.JdbcConfiguration; import io.debezium.jdbc.JdbcConnection; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/connection/PostgresDefaultValueConverterIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/connection/PostgresDefaultValueConverterIT.java similarity index 92% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/connection/PostgresDefaultValueConverterIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/connection/PostgresDefaultValueConverterIT.java index e509a35fc43..36dee202eb0 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/connection/PostgresDefaultValueConverterIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/connection/PostgresDefaultValueConverterIT.java @@ -3,9 +3,9 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection; +package io.debezium.connector.yb.postgresql.connection; -import static io.debezium.connector.postgresql.TestHelper.defaultJdbcConfig; +import static io.debezium.connector.yb.postgresql.TestHelper.defaultJdbcConfig; import java.nio.charset.Charset; import java.sql.SQLException; @@ -18,10 +18,10 @@ import org.junit.Test; import io.debezium.config.Configuration; -import io.debezium.connector.postgresql.PostgresConnectorConfig; -import io.debezium.connector.postgresql.PostgresValueConverter; -import io.debezium.connector.postgresql.TestHelper; -import io.debezium.connector.postgresql.TypeRegistry; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; +import io.debezium.connector.yb.postgresql.PostgresValueConverter; +import io.debezium.connector.yb.postgresql.TestHelper; +import io.debezium.connector.yb.postgresql.TypeRegistry; import io.debezium.doc.FixFor; import io.debezium.relational.Column; import io.debezium.relational.RelationalDatabaseConnectorConfig.DecimalHandlingMode; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/connection/ReplicationConnectionIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/connection/ReplicationConnectionIT.java similarity index 98% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/connection/ReplicationConnectionIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/connection/ReplicationConnectionIT.java index bb796ca011a..6c76313388f 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/connection/ReplicationConnectionIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/connection/ReplicationConnectionIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.connection; +package io.debezium.connector.yb.postgresql.connection; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; @@ -33,11 +33,11 @@ import org.slf4j.LoggerFactory; import io.debezium.DebeziumException; -import io.debezium.connector.postgresql.PostgresConnectorConfig; -import io.debezium.connector.postgresql.TestHelper; -import io.debezium.connector.postgresql.junit.SkipTestDependingOnDecoderPluginNameRule; -import io.debezium.connector.postgresql.junit.SkipWhenDecoderPluginNameIs; -import io.debezium.connector.postgresql.junit.SkipWhenDecoderPluginNameIsNot; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; +import io.debezium.connector.yb.postgresql.TestHelper; +import io.debezium.connector.yb.postgresql.junit.SkipTestDependingOnDecoderPluginNameRule; +import io.debezium.connector.yb.postgresql.junit.SkipWhenDecoderPluginNameIs; +import io.debezium.connector.yb.postgresql.junit.SkipWhenDecoderPluginNameIsNot; import io.debezium.doc.FixFor; import io.debezium.jdbc.JdbcConnection.ResultSetMapper; import io.debezium.junit.TestLogger; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/junit/PostgresDatabaseVersionResolver.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/junit/PostgresDatabaseVersionResolver.java similarity index 84% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/junit/PostgresDatabaseVersionResolver.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/junit/PostgresDatabaseVersionResolver.java index 9aecf37f354..82143f59f9f 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/junit/PostgresDatabaseVersionResolver.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/junit/PostgresDatabaseVersionResolver.java @@ -3,13 +3,13 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.junit; +package io.debezium.connector.yb.postgresql.junit; import java.sql.DatabaseMetaData; import java.sql.SQLException; -import io.debezium.connector.postgresql.TestHelper; -import io.debezium.connector.postgresql.connection.PostgresConnection; +import io.debezium.connector.yb.postgresql.TestHelper; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection; import io.debezium.junit.DatabaseVersionResolver; /** diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/junit/SkipTestDependingOnDecoderPluginNameRule.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/junit/SkipTestDependingOnDecoderPluginNameRule.java similarity index 94% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/junit/SkipTestDependingOnDecoderPluginNameRule.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/junit/SkipTestDependingOnDecoderPluginNameRule.java index 78a75643db1..e6249a1842f 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/junit/SkipTestDependingOnDecoderPluginNameRule.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/junit/SkipTestDependingOnDecoderPluginNameRule.java @@ -3,12 +3,12 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.junit; +package io.debezium.connector.yb.postgresql.junit; import org.junit.runner.Description; import org.junit.runners.model.Statement; -import io.debezium.connector.postgresql.TestHelper; +import io.debezium.connector.yb.postgresql.TestHelper; import io.debezium.junit.AnnotationBasedTestRule; /** diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/junit/SkipWhenDecoderPluginNameIs.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/junit/SkipWhenDecoderPluginNameIs.java similarity index 96% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/junit/SkipWhenDecoderPluginNameIs.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/junit/SkipWhenDecoderPluginNameIs.java index 2613beeab0d..a9bd05c5a7b 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/junit/SkipWhenDecoderPluginNameIs.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/junit/SkipWhenDecoderPluginNameIs.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.junit; +package io.debezium.connector.yb.postgresql.junit; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/junit/SkipWhenDecoderPluginNameIsNot.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/junit/SkipWhenDecoderPluginNameIsNot.java similarity index 96% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/junit/SkipWhenDecoderPluginNameIsNot.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/junit/SkipWhenDecoderPluginNameIsNot.java index 1ac27cc7b9e..b9b01747fc0 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/junit/SkipWhenDecoderPluginNameIsNot.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/junit/SkipWhenDecoderPluginNameIsNot.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.junit; +package io.debezium.connector.yb.postgresql.junit; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/rest/DebeziumPostgresConnectorResourceIT.java similarity index 97% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/rest/DebeziumPostgresConnectorResourceIT.java index 5b0f17e4520..951b501e35e 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/rest/DebeziumPostgresConnectorResourceIT.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.rest; +package io.debezium.connector.yb.postgresql.rest; import static io.debezium.testing.testcontainers.testhelper.RestExtensionTestInfrastructure.DATABASE; import static io.restassured.RestAssured.given; @@ -14,15 +14,17 @@ import java.util.Locale; import java.util.Map; +import io.debezium.connector.yb.postgresql.rest.DebeziumPostgresConnectRestExtension; +import io.debezium.connector.yb.postgresql.rest.DebeziumPostgresConnectorResource; import org.junit.After; import org.junit.Assume; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import io.debezium.connector.postgresql.Module; -import io.debezium.connector.postgresql.PostgresConnector; -import io.debezium.connector.postgresql.PostgresConnectorConfig; +import io.debezium.connector.yb.postgresql.Module; +import io.debezium.connector.yb.postgresql.PostgresConnector; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; import io.debezium.testing.testcontainers.Connector; import io.debezium.testing.testcontainers.ConnectorConfiguration; import io.debezium.testing.testcontainers.testhelper.RestExtensionTestInfrastructure; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceNoDatabaseIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/rest/DebeziumPostgresConnectorResourceNoDatabaseIT.java similarity index 89% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceNoDatabaseIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/rest/DebeziumPostgresConnectorResourceNoDatabaseIT.java index c9d7a8bc7c6..cad6a10e686 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceNoDatabaseIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/rest/DebeziumPostgresConnectorResourceNoDatabaseIT.java @@ -3,21 +3,23 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.rest; +package io.debezium.connector.yb.postgresql.rest; import static io.debezium.testing.testcontainers.testhelper.RestExtensionTestInfrastructure.DATABASE; import static io.restassured.RestAssured.given; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.Matchers.hasKey; +import io.debezium.connector.yb.postgresql.rest.DebeziumPostgresConnectRestExtension; +import io.debezium.connector.yb.postgresql.rest.DebeziumPostgresConnectorResource; import org.junit.After; import org.junit.Assume; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import io.debezium.connector.postgresql.Module; -import io.debezium.connector.postgresql.PostgresConnector; +import io.debezium.connector.yb.postgresql.Module; +import io.debezium.connector.yb.postgresql.PostgresConnector; import io.debezium.testing.testcontainers.testhelper.RestExtensionTestInfrastructure; public class DebeziumPostgresConnectorResourceNoDatabaseIT { diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/spi/CustomActionProvider.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/spi/CustomActionProvider.java similarity index 97% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/spi/CustomActionProvider.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/spi/CustomActionProvider.java index 9e7a2c2ee23..fb0b0ae3017 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/spi/CustomActionProvider.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/spi/CustomActionProvider.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.spi; +package io.debezium.connector.yb.postgresql.spi; import java.util.Map; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TestMetadata.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TestMetadata.java similarity index 88% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TestMetadata.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TestMetadata.java index 63ac6516bfc..f4e66203e18 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TestMetadata.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TestMetadata.java @@ -3,12 +3,13 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.transforms.timescaledb; +package io.debezium.connector.yb.postgresql.transforms.timescaledb; import java.io.IOException; import java.util.Optional; import io.debezium.config.Configuration; +import io.debezium.connector.yb.postgresql.transforms.timescaledb.AbstractTimescaleDbMetadata; import io.debezium.relational.TableId; public class TestMetadata extends AbstractTimescaleDbMetadata { diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbDatabaseTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDbDatabaseTest.java similarity index 94% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbDatabaseTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDbDatabaseTest.java index 87724c29914..ae760223fdd 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbDatabaseTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDbDatabaseTest.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.transforms.timescaledb; +package io.debezium.connector.yb.postgresql.transforms.timescaledb; import static org.assertj.core.api.Assertions.assertThat; @@ -19,11 +19,11 @@ import org.testcontainers.lifecycle.Startables; import io.debezium.config.Configuration; -import io.debezium.connector.postgresql.PostgresConnector; -import io.debezium.connector.postgresql.PostgresConnectorConfig; -import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; -import io.debezium.connector.postgresql.TestHelper; -import io.debezium.connector.postgresql.connection.PostgresConnection; +import io.debezium.connector.yb.postgresql.PostgresConnector; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; +import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.yb.postgresql.TestHelper; +import io.debezium.connector.yb.postgresql.connection.PostgresConnection; import io.debezium.embedded.AbstractConnectorTest; import io.debezium.testing.testcontainers.ImageNames; import io.debezium.util.Testing; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDbTest.java similarity index 98% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDbTest.java index 4f14b5241b7..073004d8e1f 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDbTest.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.postgresql.transforms.timescaledb; +package io.debezium.connector.yb.postgresql.transforms.timescaledb; import static org.assertj.core.api.Assertions.assertThat; diff --git a/debezium-connector-postgres/src/test/resources/META-INF/services/io.debezium.pipeline.signal.actions.SignalActionProvider b/debezium-connector-postgres/src/test/resources/META-INF/services/io.debezium.pipeline.signal.actions.SignalActionProvider index ce1c76b5d4c..e6f4fa306ca 100644 --- a/debezium-connector-postgres/src/test/resources/META-INF/services/io.debezium.pipeline.signal.actions.SignalActionProvider +++ b/debezium-connector-postgres/src/test/resources/META-INF/services/io.debezium.pipeline.signal.actions.SignalActionProvider @@ -1 +1 @@ -io.debezium.connector.postgresql.spi.CustomActionProvider \ No newline at end of file +io.debezium.connector.yb.postgresql.spi.CustomActionProvider \ No newline at end of file diff --git a/debezium-connector-postgres/src/test/resources/logback-test.xml b/debezium-connector-postgres/src/test/resources/logback-test.xml index c2bf2d54754..de49babc671 100644 --- a/debezium-connector-postgres/src/test/resources/logback-test.xml +++ b/debezium-connector-postgres/src/test/resources/logback-test.xml @@ -35,7 +35,7 @@ From a5fcb34c7461baea2e56f09266bd551cc580ac17 Mon Sep 17 00:00:00 2001 From: Vaibhav Kushwaha Date: Tue, 2 Jul 2024 07:49:24 +0530 Subject: [PATCH 02/15] keeping only package rename changes --- .../PostgresSnapshotChangeEventSource.java | 5 +++-- .../connection/AbstractColumnValue.java | 13 +++++++------ .../connection/AbstractMessageDecoder.java | 7 ++++--- .../postgresql/connection/MessageDecoder.java | 3 ++- .../connection/ReplicationMessage.java | 7 ++++--- .../ReplicationMessageColumnValueResolver.java | 6 +++--- .../connection/WalPositionLocator.java | 7 ++++--- .../pgoutput/PgOutputMessageDecoder.java | 12 ++++++------ .../pgoutput/PgOutputReplicationMessage.java | 4 ++-- .../connection/pgproto/PgProtoColumnValue.java | 12 ++++++------ .../pgproto/PgProtoReplicationMessage.java | 6 +++--- .../postgresql/AbstractRecordsProducerTest.java | 3 ++- .../yb/postgresql/PublicGeometryIT.java | 9 +++++---- .../yb/postgresql/RecordsStreamProducerIT.java | 17 +++++++++-------- 14 files changed, 60 insertions(+), 51 deletions(-) diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSnapshotChangeEventSource.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSnapshotChangeEventSource.java index e28208da4e8..bc0693c6c3e 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSnapshotChangeEventSource.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSnapshotChangeEventSource.java @@ -14,16 +14,17 @@ import java.util.Set; import java.util.stream.Collectors; -import io.debezium.connector.yb.postgresql.spi.Snapshotter; import io.debezium.pipeline.spi.ChangeRecordEmitter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import io.debezium.connector.yb.postgresql.PostgresOffsetContext.Loader; import io.debezium.connector.yb.postgresql.connection.Lsn; import io.debezium.connector.yb.postgresql.connection.PostgresConnection; import io.debezium.connector.yb.postgresql.snapshot.AlwaysSnapshotter; import io.debezium.connector.yb.postgresql.spi.SlotCreationResult; import io.debezium.connector.yb.postgresql.spi.SlotState; +import io.debezium.connector.yb.postgresql.spi.Snapshotter; import io.debezium.jdbc.MainConnectionProvidingConnectionFactory; import io.debezium.pipeline.EventDispatcher; import io.debezium.pipeline.notification.NotificationService; @@ -306,6 +307,6 @@ private static class PostgresSnapshotContext extends RelationalSnapshotContext

snapshotContext) { - return new PostgresOffsetContext.Loader(connectorConfig).load(snapshotContext.offset.getOffset()); + return new Loader(connectorConfig).load(snapshotContext.offset.getOffset()); } } diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractColumnValue.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractColumnValue.java index 8c6242b7747..65d6475f476 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractColumnValue.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractColumnValue.java @@ -13,10 +13,6 @@ import java.time.OffsetTime; import java.time.ZoneOffset; -import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; -import io.debezium.connector.yb.postgresql.PostgresType; -import io.debezium.connector.yb.postgresql.PostgresValueConverter; -import io.debezium.connector.yb.postgresql.TypeRegistry; import org.apache.kafka.connect.errors.ConnectException; import com.yugabyte.geometric.PGbox; import com.yugabyte.geometric.PGcircle; @@ -31,6 +27,11 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; +import io.debezium.connector.yb.postgresql.PostgresType; +import io.debezium.connector.yb.postgresql.PostgresValueConverter; +import io.debezium.connector.yb.postgresql.TypeRegistry; + /** * @author Chris Cranford */ @@ -189,7 +190,7 @@ public boolean isArray(PostgresType type) { } @Override - public Object asArray(String columnName, PostgresType type, String fullType, PostgresStreamingChangeEventSource.PgConnectionSupplier connection) { + public Object asArray(String columnName, PostgresType type, String fullType, PgConnectionSupplier connection) { try { final String dataString = asString(); return new PgArray(connection.get(), type.getOid(), dataString); @@ -202,7 +203,7 @@ public Object asArray(String columnName, PostgresType type, String fullType, Pos @Override public Object asDefault(TypeRegistry typeRegistry, int columnType, String columnName, String fullType, boolean includeUnknownDatatypes, - PostgresStreamingChangeEventSource.PgConnectionSupplier connection) { + PgConnectionSupplier connection) { if (includeUnknownDatatypes) { // this includes things like PostGIS geoemetries or other custom types // leave up to the downstream message recipient to deal with diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractMessageDecoder.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractMessageDecoder.java index abb9d139c25..bd51fb2bf20 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractMessageDecoder.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractMessageDecoder.java @@ -9,10 +9,11 @@ import java.sql.SQLException; import java.time.Duration; -import io.debezium.connector.yb.postgresql.TypeRegistry; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import io.debezium.connector.yb.postgresql.TypeRegistry; +import io.debezium.connector.yb.postgresql.connection.ReplicationStream.ReplicationMessageProcessor; import io.debezium.util.Clock; import io.debezium.util.Threads; import io.debezium.util.Threads.Timer; @@ -31,7 +32,7 @@ public abstract class AbstractMessageDecoder implements MessageDecoder { private Timer timer = null; @Override - public void processMessage(ByteBuffer buffer, ReplicationStream.ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException { + public void processMessage(ByteBuffer buffer, ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException { // if message is empty pass control right to ReplicationMessageProcessor to update WAL position info if (buffer == null) { processor.process(null); @@ -41,7 +42,7 @@ public void processMessage(ByteBuffer buffer, ReplicationStream.ReplicationMessa } } - protected abstract void processNotEmptyMessage(ByteBuffer buffer, ReplicationStream.ReplicationMessageProcessor processor, TypeRegistry typeRegistry) + protected abstract void processNotEmptyMessage(ByteBuffer buffer, ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException; @Override diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/MessageDecoder.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/MessageDecoder.java index aec6462570a..07e4c8de773 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/MessageDecoder.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/MessageDecoder.java @@ -13,6 +13,7 @@ import com.yugabyte.replication.fluent.logical.ChainedLogicalStreamBuilder; import io.debezium.connector.yb.postgresql.TypeRegistry; +import io.debezium.connector.yb.postgresql.connection.ReplicationStream.ReplicationMessageProcessor; /** * A class that is able to deserialize/decode binary representation of a batch of replication messages generated by @@ -30,7 +31,7 @@ public interface MessageDecoder { * @param processor - message processing on arrival * @param typeRegistry - registry with known types */ - void processMessage(ByteBuffer buffer, ReplicationStream.ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException; + void processMessage(ByteBuffer buffer, ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException; /** * Allows MessageDecoder to configure options with which the replication stream is started. diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessage.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessage.java index ecc98361f03..63597988dee 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessage.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessage.java @@ -21,6 +21,7 @@ import com.yugabyte.geometric.PGpolygon; import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; +import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; import io.debezium.connector.yb.postgresql.PostgresType; import io.debezium.connector.yb.postgresql.TypeRegistry; @@ -62,7 +63,7 @@ interface Column { */ ColumnTypeMetadata getTypeMetadata(); - Object getValue(PostgresStreamingChangeEventSource.PgConnectionSupplier connection, boolean includeUnknownDatatypes); + Object getValue(PgConnectionSupplier connection, boolean includeUnknownDatatypes); boolean isOptional(); @@ -130,9 +131,9 @@ interface ColumnValue { boolean isArray(PostgresType type); - Object asArray(String columnName, PostgresType type, String fullType, PostgresStreamingChangeEventSource.PgConnectionSupplier connection); + Object asArray(String columnName, PostgresType type, String fullType, PgConnectionSupplier connection); - Object asDefault(TypeRegistry typeRegistry, int columnType, String columnName, String fullType, boolean includeUnknownDatatypes, PostgresStreamingChangeEventSource.PgConnectionSupplier connection); + Object asDefault(TypeRegistry typeRegistry, int columnType, String columnName, String fullType, boolean includeUnknownDatatypes, PgConnectionSupplier connection); } /** diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessageColumnValueResolver.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessageColumnValueResolver.java index 5338a511c14..70adb7854b2 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessageColumnValueResolver.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessageColumnValueResolver.java @@ -5,11 +5,11 @@ */ package io.debezium.connector.yb.postgresql.connection; -import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; -import io.debezium.connector.yb.postgresql.PostgresType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; +import io.debezium.connector.yb.postgresql.PostgresType; import io.debezium.connector.yb.postgresql.TypeRegistry; import io.debezium.connector.yb.postgresql.connection.ReplicationMessage.ColumnValue; @@ -32,7 +32,7 @@ public class ReplicationMessageColumnValueResolver { * @param typeRegistry the postgres type registry * @return */ - public static Object resolveValue(String columnName, PostgresType type, String fullType, ColumnValue value, final PostgresStreamingChangeEventSource.PgConnectionSupplier connection, + public static Object resolveValue(String columnName, PostgresType type, String fullType, ColumnValue value, final PgConnectionSupplier connection, boolean includeUnknownDatatypes, TypeRegistry typeRegistry) { if (value.isNull()) { // nulls are null diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/WalPositionLocator.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/WalPositionLocator.java index 097cad33786..e0571fad7e3 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/WalPositionLocator.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/WalPositionLocator.java @@ -13,6 +13,7 @@ import org.slf4j.LoggerFactory; import io.debezium.DebeziumException; +import io.debezium.connector.yb.postgresql.connection.ReplicationMessage.Operation; /** * This class is responsible for finding out a LSN from which Debezium should @@ -30,7 +31,7 @@ public class WalPositionLocator { private final Lsn lastCommitStoredLsn; private final Lsn lastEventStoredLsn; - private final ReplicationMessage.Operation lastProcessedMessageType; + private final Operation lastProcessedMessageType; private Lsn txStartLsn = null; private Lsn lsnAfterLastEventStoredLsn = null; private Lsn firstLsnReceived = null; @@ -39,7 +40,7 @@ public class WalPositionLocator { private boolean storeLsnAfterLastEventStoredLsn = false; private Set lsnSeen = new HashSet<>(1_000); - public WalPositionLocator(Lsn lastCommitStoredLsn, Lsn lastEventStoredLsn, ReplicationMessage.Operation lastProcessedMessageType) { + public WalPositionLocator(Lsn lastCommitStoredLsn, Lsn lastEventStoredLsn, Operation lastProcessedMessageType) { this.lastCommitStoredLsn = lastCommitStoredLsn; this.lastEventStoredLsn = lastEventStoredLsn; this.lastProcessedMessageType = lastProcessedMessageType; @@ -75,7 +76,7 @@ public Optional resumeFromLsn(Lsn currentLsn, ReplicationMessage message) { if (currentLsn.equals(lastEventStoredLsn)) { // BEGIN and first message after change have the same LSN if (txStartLsn != null - && (lastProcessedMessageType == null || lastProcessedMessageType == ReplicationMessage.Operation.BEGIN || lastProcessedMessageType == ReplicationMessage.Operation.COMMIT)) { + && (lastProcessedMessageType == null || lastProcessedMessageType == Operation.BEGIN || lastProcessedMessageType == Operation.COMMIT)) { // start from the BEGIN tx; prevent skipping of unprocessed event after BEGIN or previous tx COMMIT LOGGER.info("Will restart from LSN '{}' corresponding to the event following the BEGIN event", txStartLsn); startStreamingLsn = txStartLsn; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputMessageDecoder.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputMessageDecoder.java index b51690a96b4..51a794c07c1 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputMessageDecoder.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputMessageDecoder.java @@ -27,17 +27,16 @@ import java.util.function.Function; import com.yugabyte.replication.fluent.logical.ChainedLogicalStreamBuilder; -import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; -import io.debezium.connector.yb.postgresql.UnchangedToastedReplicationMessageColumn; import io.debezium.connector.yb.postgresql.YugabyteDBServer; -import io.debezium.connector.yb.postgresql.connection.AbstractReplicationMessageColumn; -import io.debezium.connector.yb.postgresql.connection.TransactionMessage; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; import io.debezium.connector.yb.postgresql.PostgresType; import io.debezium.connector.yb.postgresql.TypeRegistry; +import io.debezium.connector.yb.postgresql.UnchangedToastedReplicationMessageColumn; import io.debezium.connector.yb.postgresql.connection.AbstractMessageDecoder; +import io.debezium.connector.yb.postgresql.connection.AbstractReplicationMessageColumn; import io.debezium.connector.yb.postgresql.connection.LogicalDecodingMessage; import io.debezium.connector.yb.postgresql.connection.Lsn; import io.debezium.connector.yb.postgresql.connection.MessageDecoderContext; @@ -46,6 +45,7 @@ import io.debezium.connector.yb.postgresql.connection.ReplicationMessage.NoopMessage; import io.debezium.connector.yb.postgresql.connection.ReplicationMessage.Operation; import io.debezium.connector.yb.postgresql.connection.ReplicationStream.ReplicationMessageProcessor; +import io.debezium.connector.yb.postgresql.connection.TransactionMessage; import io.debezium.connector.yb.postgresql.connection.WalPositionLocator; import io.debezium.data.Envelope; import io.debezium.relational.ColumnEditor; @@ -749,7 +749,7 @@ private static List resolveColumnsFromStreamTupleData(ByteBuffer buffer, final String valueStr = readColumnValueAsString(buffer); replicationMessageColumn = new AbstractReplicationMessageColumn(columnName, columnType, typeExpression, optional) { @Override - public Object getValue(PostgresStreamingChangeEventSource.PgConnectionSupplier connection, boolean includeUnknownDatatypes) { + public Object getValue(PgConnectionSupplier connection, boolean includeUnknownDatatypes) { return PgOutputReplicationMessage.getValue(columnName, columnType, typeExpression, valueStr, connection, includeUnknownDatatypes, typeRegistry); } @@ -771,7 +771,7 @@ public String toString() { else if (type == 'n') { replicationMessageColumn = new AbstractReplicationMessageColumn(columnName, columnType, typeExpression, true) { @Override - public Object getValue(PostgresStreamingChangeEventSource.PgConnectionSupplier connection, boolean includeUnknownDatatypes) { + public Object getValue(PgConnectionSupplier connection, boolean includeUnknownDatatypes) { return null; } }; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputReplicationMessage.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputReplicationMessage.java index dada83595c7..1d751ebfa7d 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputReplicationMessage.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputReplicationMessage.java @@ -9,7 +9,7 @@ import java.util.List; import java.util.OptionalLong; -import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; +import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; import io.debezium.connector.yb.postgresql.PostgresType; import io.debezium.connector.yb.postgresql.TypeRegistry; import io.debezium.connector.yb.postgresql.connection.ReplicationMessage; @@ -86,7 +86,7 @@ public boolean shouldSchemaBeSynchronized() { * * @return the value; may be null */ - public static Object getValue(String columnName, PostgresType type, String fullType, String rawValue, final PostgresStreamingChangeEventSource.PgConnectionSupplier connection, + public static Object getValue(String columnName, PostgresType type, String fullType, String rawValue, final PgConnectionSupplier connection, boolean includeUnknownDataTypes, TypeRegistry typeRegistry) { final PgOutputColumnValue columnValue = new PgOutputColumnValue(rawValue); return ReplicationMessageColumnValueResolver.resolveValue(columnName, type, fullType, columnValue, connection, includeUnknownDataTypes, typeRegistry); diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoColumnValue.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoColumnValue.java index f31f8fa21d5..7bc6467d660 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoColumnValue.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoColumnValue.java @@ -19,13 +19,13 @@ import com.yugabyte.geometric.PGpoint; import com.yugabyte.jdbc.PgArray; -import io.debezium.connector.yb.postgresql.PgOid; -import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; -import io.debezium.connector.yb.postgresql.PostgresType; -import io.debezium.connector.yb.postgresql.PostgresValueConverter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import io.debezium.connector.yb.postgresql.PgOid; +import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; +import io.debezium.connector.yb.postgresql.PostgresType; +import io.debezium.connector.yb.postgresql.PostgresValueConverter; import io.debezium.connector.yb.postgresql.TypeRegistry; import io.debezium.connector.yb.postgresql.connection.AbstractColumnValue; import io.debezium.connector.yb.postgresql.connection.DateTimeFormat; @@ -310,7 +310,7 @@ public boolean isArray(PostgresType type) { } @Override - public Object asArray(String columnName, PostgresType type, String fullType, PostgresStreamingChangeEventSource.PgConnectionSupplier connection) { + public Object asArray(String columnName, PostgresType type, String fullType, PgConnectionSupplier connection) { // Currently the logical decoding plugin sends unhandled types as a byte array containing the string // representation (in Postgres) of the array value. // The approach to decode this is sub-optimal but the only way to improve this is to update the plugin. @@ -338,7 +338,7 @@ public Object asArray(String columnName, PostgresType type, String fullType, Pos @Override public Object asDefault(TypeRegistry typeRegistry, int columnType, String columnName, String fullType, boolean includeUnknownDatatypes, - PostgresStreamingChangeEventSource.PgConnectionSupplier connection) { + PgConnectionSupplier connection) { final PostgresType type = typeRegistry.get(columnType); if (type.getOid() == typeRegistry.geometryOid() || type.getOid() == typeRegistry.geographyOid() || diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoReplicationMessage.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoReplicationMessage.java index 6cd1a8197ba..c4baa72f029 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoReplicationMessage.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoReplicationMessage.java @@ -14,7 +14,7 @@ import java.util.stream.IntStream; import io.debezium.DebeziumException; -import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; +import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; import io.debezium.connector.yb.postgresql.PostgresType; import io.debezium.connector.yb.postgresql.UnchangedToastedReplicationMessageColumn; import io.debezium.connector.yb.postgresql.connection.AbstractReplicationMessageColumn; @@ -112,7 +112,7 @@ private List transform(List mes typeInfo.map(PgProto.TypeInfo::getValueOptional).orElse(Boolean.FALSE)) { @Override - public Object getValue(PostgresStreamingChangeEventSource.PgConnectionSupplier connection, boolean includeUnknownDatatypes) { + public Object getValue(PgConnectionSupplier connection, boolean includeUnknownDatatypes) { return PgProtoReplicationMessage.this.getValue(columnName, type, fullType, datum, connection, includeUnknownDatatypes); } @@ -130,7 +130,7 @@ public boolean isLastEventForLsn() { return true; } - public Object getValue(String columnName, PostgresType type, String fullType, PgProto.DatumMessage datumMessage, final PostgresStreamingChangeEventSource.PgConnectionSupplier connection, + public Object getValue(String columnName, PostgresType type, String fullType, PgProto.DatumMessage datumMessage, final PgConnectionSupplier connection, boolean includeUnknownDatatypes) { final PgProtoColumnValue columnValue = new PgProtoColumnValue(datumMessage); return ReplicationMessageColumnValueResolver.resolveValue(columnName, type, fullType, columnValue, connection, includeUnknownDatatypes, typeRegistry); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/AbstractRecordsProducerTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/AbstractRecordsProducerTest.java index 4d3ba5407f2..628244fb75c 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/AbstractRecordsProducerTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/AbstractRecordsProducerTest.java @@ -6,6 +6,7 @@ package io.debezium.connector.yb.postgresql; +import static io.debezium.connector.yb.postgresql.TestHelper.PK_FIELD; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; @@ -971,7 +972,7 @@ protected List schemasAndValuesForDomainAliasTypes(boolean final ByteBuffer polygonByteBuffer = ByteBuffer.wrap("((0.0,0.0),(0.0,1.0),(1.0,0.0),(0.0,0.0))".getBytes()); return Arrays.asList( - new SchemaAndValueField(TestHelper.PK_FIELD, SchemaBuilder.int32().defaultValue(0).build(), 1), + new SchemaAndValueField(PK_FIELD, SchemaBuilder.int32().defaultValue(0).build(), 1), new SchemaAndValueField("bit_base", Bits.builder(3).build(), new byte[]{ 5 }), new SchemaAndValueField("bit_alias", Bits.builder(3).build(), new byte[]{ 5 }), new SchemaAndValueField("smallint_base", SchemaBuilder.INT16_SCHEMA, (short) 1), diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PublicGeometryIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PublicGeometryIT.java index 1c40d8bb2ab..72342c1006e 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PublicGeometryIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PublicGeometryIT.java @@ -6,14 +6,14 @@ package io.debezium.connector.yb.postgresql; +import static io.debezium.connector.yb.postgresql.TestHelper.PK_FIELD; +import static io.debezium.connector.yb.postgresql.TestHelper.topicName; import static junit.framework.TestCase.assertEquals; import static org.junit.Assert.assertFalse; import java.util.List; import java.util.concurrent.TimeUnit; -import io.debezium.connector.yb.postgresql.junit.SkipTestDependingOnDecoderPluginNameRule; -import junit.framework.TestCase; import org.apache.kafka.connect.source.SourceRecord; import org.junit.Before; import org.junit.Rule; @@ -25,6 +25,7 @@ import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; import io.debezium.connector.yb.postgresql.connection.PostgresConnection; import io.debezium.connector.yb.postgresql.connection.ReplicationConnection; +import io.debezium.connector.yb.postgresql.junit.SkipTestDependingOnDecoderPluginNameRule; import io.debezium.data.Envelope; import io.debezium.data.VerifyRecord; import io.debezium.doc.FixFor; @@ -102,7 +103,7 @@ private void assertInsert(String statement, Integer pk, List config .with(PostgresConnectorConfig.SCHEMA_REFRESH_MODE, PostgresConnectorConfig.SchemaRefreshMode.COLUMNS_DIFF_EXCLUDE_UNCHANGED_TOAST)); @@ -3834,7 +3835,7 @@ private String getReplicationSlotChangesQuery() { case DECODERBUFS: return "SELECT pg_logical_slot_get_binary_changes('" + ReplicationConnection.Builder.DEFAULT_SLOT_NAME + "', " + "NULL, NULL)"; - case SkipWhenDecoderPluginNameIs.DecoderPluginName.PGOUTPUT: + case PGOUTPUT: return "SELECT pg_logical_slot_get_binary_changes('" + ReplicationConnection.Builder.DEFAULT_SLOT_NAME + "', " + "NULL, NULL, 'proto_version', '1', 'publication_names', '" + ReplicationConnection.Builder.DEFAULT_PUBLICATION_NAME + "')"; } From 63c16361312b0da7224eca646535ad93fe7a3f67 Mon Sep 17 00:00:00 2001 From: Vaibhav Kushwaha Date: Tue, 2 Jul 2024 08:03:57 +0530 Subject: [PATCH 03/15] removed dependency on debezium core changes --- .../PostgresChangeEventSourceCoordinator.java | 6 +++++- .../yb/postgresql/PostgresConnectorConfig.java | 8 +++++++- .../debezium/pipeline/spi/SnapshotResult.java | 4 ---- .../RelationalDatabaseConnectorConfig.java | 17 +++++++---------- 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeEventSourceCoordinator.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeEventSourceCoordinator.java index a8044913c4a..0c660a9e3ec 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeEventSourceCoordinator.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeEventSourceCoordinator.java @@ -81,7 +81,7 @@ protected void executeChangeEventSources(CdcSourceTaskContext taskContext, Snaps LOGGER.debug("Snapshot result {}", snapshotResult); if (context.isRunning() && snapshotResult.isCompletedOrSkipped()) { - if(YugabyteDBServer.isEnabled() && !snapshotResult.isSkipped()) { + if(YugabyteDBServer.isEnabled() && !isSnapshotSkipped(snapshotResult)) { LOGGER.info("Will wait for snapshot completion before transitioning to streaming"); waitForSnapshotCompletion = true; while (waitForSnapshotCompletion) { @@ -99,6 +99,10 @@ protected void executeChangeEventSources(CdcSourceTaskContext taskContext, Snaps } } + protected boolean isSnapshotSkipped(SnapshotResult snapshotResult) { + return snapshotResult.getStatus() == SnapshotResult.SnapshotResultStatus.SKIPPED; + } + @Override protected CatchUpStreamingResult executeCatchUpStreaming(ChangeEventSourceContext context, SnapshotChangeEventSource snapshotSource, diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnectorConfig.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnectorConfig.java index 5de47eac961..15a798a2af5 100755 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnectorConfig.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnectorConfig.java @@ -11,6 +11,7 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import java.util.regex.Pattern; import io.debezium.connector.yb.postgresql.connection.MessageDecoderContext; import io.debezium.connector.yb.postgresql.connection.PostgresConnection; @@ -536,6 +537,8 @@ public static SchemaRefreshMode parse(String value) { public static final Field PORT = RelationalDatabaseConnectorConfig.PORT .withDefault(DEFAULT_PORT); + public static final Field HOSTNAME = RelationalDatabaseConnectorConfig.HOSTNAME + .withValidation(PostgresConnectorConfig::validateYBHostname); public static final Field PLUGIN_NAME = Field.create("plugin.name") .withDisplayName("Plugin") @@ -1291,7 +1294,10 @@ public Optional parseSignallingMessage(Struct value) { }); } - + protected static int validateYBHostname(Configuration config, Field field, Field.ValidationOutput problems) { + // YB Note: Not validating the hostname against any pattern. + return 0; + } } diff --git a/debezium-core/src/main/java/io/debezium/pipeline/spi/SnapshotResult.java b/debezium-core/src/main/java/io/debezium/pipeline/spi/SnapshotResult.java index 6788e28c8c1..5b2b6617fa5 100644 --- a/debezium-core/src/main/java/io/debezium/pipeline/spi/SnapshotResult.java +++ b/debezium-core/src/main/java/io/debezium/pipeline/spi/SnapshotResult.java @@ -31,10 +31,6 @@ public boolean isCompletedOrSkipped() { return this.status == SnapshotResultStatus.SKIPPED || this.status == SnapshotResultStatus.COMPLETED; } - public boolean isSkipped() { - return this.status == SnapshotResultStatus.SKIPPED; - } - public SnapshotResultStatus getStatus() { return status; } diff --git a/debezium-core/src/main/java/io/debezium/relational/RelationalDatabaseConnectorConfig.java b/debezium-core/src/main/java/io/debezium/relational/RelationalDatabaseConnectorConfig.java index 80b76942c9e..43ee07fed9c 100644 --- a/debezium-core/src/main/java/io/debezium/relational/RelationalDatabaseConnectorConfig.java +++ b/debezium-core/src/main/java/io/debezium/relational/RelationalDatabaseConnectorConfig.java @@ -825,17 +825,14 @@ private static int validateMessageKeyColumnsField(Configuration config, Field fi } protected static int validateHostname(Configuration config, Field field, ValidationOutput problems) { - LOGGER.info("Bypassing hostname validation for YB"); + String hostName = config.getString(field); + if (!Strings.isNullOrBlank(hostName)) { + if (!HOSTNAME_PATTERN.asPredicate().test(hostName)) { + problems.accept(field, hostName, hostName + " has invalid format (only the underscore, hyphen, dot and alphanumeric characters are allowed)"); + return 1; + } + } return 0; - - // String hostName = config.getString(field); - // if (!Strings.isNullOrBlank(hostName)) { - // if (!HOSTNAME_PATTERN.asPredicate().test(hostName)) { - // problems.accept(field, hostName, hostName + " has invalid format (only the underscore, hyphen, dot and alphanumeric characters are allowed)"); - // return 1; - // } - // } - // return 0; } public FieldNamer getFieldNamer() { From 30cd1a42e7a4b7841a0a74397de88d80e956b7f7 Mon Sep 17 00:00:00 2001 From: Vaibhav Kushwaha Date: Tue, 2 Jul 2024 08:18:22 +0530 Subject: [PATCH 04/15] using a custom defined field for hostname --- .../yb/postgresql/PostgresConnectorConfig.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnectorConfig.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnectorConfig.java index 15a798a2af5..3f82bf276be 100755 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnectorConfig.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnectorConfig.java @@ -537,8 +537,15 @@ public static SchemaRefreshMode parse(String value) { public static final Field PORT = RelationalDatabaseConnectorConfig.PORT .withDefault(DEFAULT_PORT); - public static final Field HOSTNAME = RelationalDatabaseConnectorConfig.HOSTNAME - .withValidation(PostgresConnectorConfig::validateYBHostname); + public static final Field HOSTNAME = Field.create(DATABASE_CONFIG_PREFIX + JdbcConfiguration.HOSTNAME) + .withDisplayName("Hostname") + .withType(Type.STRING) + .withGroup(Field.createGroupEntry(Field.Group.CONNECTION, 2)) + .withWidth(Width.MEDIUM) + .withImportance(Importance.HIGH) + .required() + .withValidation(PostgresConnectorConfig::validateYBHostname) + .withDescription("Resolvable hostname or IP address of the database server."); public static final Field PLUGIN_NAME = Field.create("plugin.name") .withDisplayName("Plugin") @@ -1296,6 +1303,7 @@ public Optional parseSignallingMessage(Struct value) { protected static int validateYBHostname(Configuration config, Field field, Field.ValidationOutput problems) { // YB Note: Not validating the hostname against any pattern. + LOGGER.info("Using YB custom validator to bypass hostname validation"); return 0; } From d5f31c1b7b370d3ea9694239a951a77c11023d2d Mon Sep 17 00:00:00 2001 From: Vaibhav Kushwaha Date: Tue, 2 Jul 2024 08:18:40 +0530 Subject: [PATCH 05/15] Revert "removed dependency on debezium core changes" This reverts commit 63c16361312b0da7224eca646535ad93fe7a3f67. --- .../PostgresChangeEventSourceCoordinator.java | 6 +----- .../yb/postgresql/PostgresConnectorConfig.java | 8 +------- .../debezium/pipeline/spi/SnapshotResult.java | 4 ++++ .../RelationalDatabaseConnectorConfig.java | 17 ++++++++++------- 4 files changed, 16 insertions(+), 19 deletions(-) diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeEventSourceCoordinator.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeEventSourceCoordinator.java index 0c660a9e3ec..a8044913c4a 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeEventSourceCoordinator.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeEventSourceCoordinator.java @@ -81,7 +81,7 @@ protected void executeChangeEventSources(CdcSourceTaskContext taskContext, Snaps LOGGER.debug("Snapshot result {}", snapshotResult); if (context.isRunning() && snapshotResult.isCompletedOrSkipped()) { - if(YugabyteDBServer.isEnabled() && !isSnapshotSkipped(snapshotResult)) { + if(YugabyteDBServer.isEnabled() && !snapshotResult.isSkipped()) { LOGGER.info("Will wait for snapshot completion before transitioning to streaming"); waitForSnapshotCompletion = true; while (waitForSnapshotCompletion) { @@ -99,10 +99,6 @@ protected void executeChangeEventSources(CdcSourceTaskContext taskContext, Snaps } } - protected boolean isSnapshotSkipped(SnapshotResult snapshotResult) { - return snapshotResult.getStatus() == SnapshotResult.SnapshotResultStatus.SKIPPED; - } - @Override protected CatchUpStreamingResult executeCatchUpStreaming(ChangeEventSourceContext context, SnapshotChangeEventSource snapshotSource, diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnectorConfig.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnectorConfig.java index 15a798a2af5..5de47eac961 100755 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnectorConfig.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnectorConfig.java @@ -11,7 +11,6 @@ import java.util.List; import java.util.Map; import java.util.Optional; -import java.util.regex.Pattern; import io.debezium.connector.yb.postgresql.connection.MessageDecoderContext; import io.debezium.connector.yb.postgresql.connection.PostgresConnection; @@ -537,8 +536,6 @@ public static SchemaRefreshMode parse(String value) { public static final Field PORT = RelationalDatabaseConnectorConfig.PORT .withDefault(DEFAULT_PORT); - public static final Field HOSTNAME = RelationalDatabaseConnectorConfig.HOSTNAME - .withValidation(PostgresConnectorConfig::validateYBHostname); public static final Field PLUGIN_NAME = Field.create("plugin.name") .withDisplayName("Plugin") @@ -1294,10 +1291,7 @@ public Optional parseSignallingMessage(Struct value) { }); } - protected static int validateYBHostname(Configuration config, Field field, Field.ValidationOutput problems) { - // YB Note: Not validating the hostname against any pattern. - return 0; - } + } diff --git a/debezium-core/src/main/java/io/debezium/pipeline/spi/SnapshotResult.java b/debezium-core/src/main/java/io/debezium/pipeline/spi/SnapshotResult.java index 5b2b6617fa5..6788e28c8c1 100644 --- a/debezium-core/src/main/java/io/debezium/pipeline/spi/SnapshotResult.java +++ b/debezium-core/src/main/java/io/debezium/pipeline/spi/SnapshotResult.java @@ -31,6 +31,10 @@ public boolean isCompletedOrSkipped() { return this.status == SnapshotResultStatus.SKIPPED || this.status == SnapshotResultStatus.COMPLETED; } + public boolean isSkipped() { + return this.status == SnapshotResultStatus.SKIPPED; + } + public SnapshotResultStatus getStatus() { return status; } diff --git a/debezium-core/src/main/java/io/debezium/relational/RelationalDatabaseConnectorConfig.java b/debezium-core/src/main/java/io/debezium/relational/RelationalDatabaseConnectorConfig.java index 43ee07fed9c..80b76942c9e 100644 --- a/debezium-core/src/main/java/io/debezium/relational/RelationalDatabaseConnectorConfig.java +++ b/debezium-core/src/main/java/io/debezium/relational/RelationalDatabaseConnectorConfig.java @@ -825,14 +825,17 @@ private static int validateMessageKeyColumnsField(Configuration config, Field fi } protected static int validateHostname(Configuration config, Field field, ValidationOutput problems) { - String hostName = config.getString(field); - if (!Strings.isNullOrBlank(hostName)) { - if (!HOSTNAME_PATTERN.asPredicate().test(hostName)) { - problems.accept(field, hostName, hostName + " has invalid format (only the underscore, hyphen, dot and alphanumeric characters are allowed)"); - return 1; - } - } + LOGGER.info("Bypassing hostname validation for YB"); return 0; + + // String hostName = config.getString(field); + // if (!Strings.isNullOrBlank(hostName)) { + // if (!HOSTNAME_PATTERN.asPredicate().test(hostName)) { + // problems.accept(field, hostName, hostName + " has invalid format (only the underscore, hyphen, dot and alphanumeric characters are allowed)"); + // return 1; + // } + // } + // return 0; } public FieldNamer getFieldNamer() { From 649f636c33cbd55f3d0b7c744655f2f4f84817bf Mon Sep 17 00:00:00 2001 From: Vaibhav Kushwaha Date: Tue, 2 Jul 2024 08:20:01 +0530 Subject: [PATCH 06/15] modify Dockerfile to NOT copy any content from debezium-core --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c64aba7c3ec..24e387fd8c0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,12 +14,10 @@ RUN rm -rf debezium-connector-oracle RUN rm -rf debezium-connector-spanner RUN rm -rf debezium-connector-sqlserver RUN rm -rf debezium-connector-vitess -RUN rm -f debezium-connector-postgres/debezium-core-2.5.2.Final.jar WORKDIR / # Copy the Debezium Connector for Postgres adapted for YugabyteDB COPY debezium-connector-postgres/target/debezium-connector-postgres-*.jar $KAFKA_CONNECT_PLUGINS_DIR/debezium-connector-postgres -COPY debezium-core/target/debezium-core-*.jar $KAFKA_CONNECT_PLUGINS_DIR/debezium-connector-postgres # Set the TLS version to be used by Kafka processes ENV KAFKA_OPTS="-Djdk.tls.client.protocols=TLSv1.2 -javaagent:/kafka/etc/jmx_prometheus_javaagent-0.17.2.jar=8080:/kafka/etc/jmx-exporter/metrics.yml" From f17e89fcb306621ffab0d5f3532bddfe1e75bf83 Mon Sep 17 00:00:00 2001 From: Vaibhav Kushwaha Date: Tue, 2 Jul 2024 09:38:51 +0530 Subject: [PATCH 07/15] Revert "keeping only package rename changes" This reverts commit a5fcb34c7461baea2e56f09266bd551cc580ac17. --- .../PostgresSnapshotChangeEventSource.java | 5 ++--- .../connection/AbstractColumnValue.java | 13 ++++++------- .../connection/AbstractMessageDecoder.java | 7 +++---- .../postgresql/connection/MessageDecoder.java | 3 +-- .../connection/ReplicationMessage.java | 7 +++---- .../ReplicationMessageColumnValueResolver.java | 6 +++--- .../connection/WalPositionLocator.java | 7 +++---- .../pgoutput/PgOutputMessageDecoder.java | 12 ++++++------ .../pgoutput/PgOutputReplicationMessage.java | 4 ++-- .../connection/pgproto/PgProtoColumnValue.java | 12 ++++++------ .../pgproto/PgProtoReplicationMessage.java | 6 +++--- .../postgresql/AbstractRecordsProducerTest.java | 3 +-- .../yb/postgresql/PublicGeometryIT.java | 9 ++++----- .../yb/postgresql/RecordsStreamProducerIT.java | 17 ++++++++--------- 14 files changed, 51 insertions(+), 60 deletions(-) diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSnapshotChangeEventSource.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSnapshotChangeEventSource.java index bc0693c6c3e..e28208da4e8 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSnapshotChangeEventSource.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSnapshotChangeEventSource.java @@ -14,17 +14,16 @@ import java.util.Set; import java.util.stream.Collectors; +import io.debezium.connector.yb.postgresql.spi.Snapshotter; import io.debezium.pipeline.spi.ChangeRecordEmitter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.yb.postgresql.PostgresOffsetContext.Loader; import io.debezium.connector.yb.postgresql.connection.Lsn; import io.debezium.connector.yb.postgresql.connection.PostgresConnection; import io.debezium.connector.yb.postgresql.snapshot.AlwaysSnapshotter; import io.debezium.connector.yb.postgresql.spi.SlotCreationResult; import io.debezium.connector.yb.postgresql.spi.SlotState; -import io.debezium.connector.yb.postgresql.spi.Snapshotter; import io.debezium.jdbc.MainConnectionProvidingConnectionFactory; import io.debezium.pipeline.EventDispatcher; import io.debezium.pipeline.notification.NotificationService; @@ -307,6 +306,6 @@ private static class PostgresSnapshotContext extends RelationalSnapshotContext

snapshotContext) { - return new Loader(connectorConfig).load(snapshotContext.offset.getOffset()); + return new PostgresOffsetContext.Loader(connectorConfig).load(snapshotContext.offset.getOffset()); } } diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractColumnValue.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractColumnValue.java index 65d6475f476..8c6242b7747 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractColumnValue.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractColumnValue.java @@ -13,6 +13,10 @@ import java.time.OffsetTime; import java.time.ZoneOffset; +import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; +import io.debezium.connector.yb.postgresql.PostgresType; +import io.debezium.connector.yb.postgresql.PostgresValueConverter; +import io.debezium.connector.yb.postgresql.TypeRegistry; import org.apache.kafka.connect.errors.ConnectException; import com.yugabyte.geometric.PGbox; import com.yugabyte.geometric.PGcircle; @@ -27,11 +31,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; -import io.debezium.connector.yb.postgresql.PostgresType; -import io.debezium.connector.yb.postgresql.PostgresValueConverter; -import io.debezium.connector.yb.postgresql.TypeRegistry; - /** * @author Chris Cranford */ @@ -190,7 +189,7 @@ public boolean isArray(PostgresType type) { } @Override - public Object asArray(String columnName, PostgresType type, String fullType, PgConnectionSupplier connection) { + public Object asArray(String columnName, PostgresType type, String fullType, PostgresStreamingChangeEventSource.PgConnectionSupplier connection) { try { final String dataString = asString(); return new PgArray(connection.get(), type.getOid(), dataString); @@ -203,7 +202,7 @@ public Object asArray(String columnName, PostgresType type, String fullType, PgC @Override public Object asDefault(TypeRegistry typeRegistry, int columnType, String columnName, String fullType, boolean includeUnknownDatatypes, - PgConnectionSupplier connection) { + PostgresStreamingChangeEventSource.PgConnectionSupplier connection) { if (includeUnknownDatatypes) { // this includes things like PostGIS geoemetries or other custom types // leave up to the downstream message recipient to deal with diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractMessageDecoder.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractMessageDecoder.java index bd51fb2bf20..abb9d139c25 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractMessageDecoder.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractMessageDecoder.java @@ -9,11 +9,10 @@ import java.sql.SQLException; import java.time.Duration; +import io.debezium.connector.yb.postgresql.TypeRegistry; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.yb.postgresql.TypeRegistry; -import io.debezium.connector.yb.postgresql.connection.ReplicationStream.ReplicationMessageProcessor; import io.debezium.util.Clock; import io.debezium.util.Threads; import io.debezium.util.Threads.Timer; @@ -32,7 +31,7 @@ public abstract class AbstractMessageDecoder implements MessageDecoder { private Timer timer = null; @Override - public void processMessage(ByteBuffer buffer, ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException { + public void processMessage(ByteBuffer buffer, ReplicationStream.ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException { // if message is empty pass control right to ReplicationMessageProcessor to update WAL position info if (buffer == null) { processor.process(null); @@ -42,7 +41,7 @@ public void processMessage(ByteBuffer buffer, ReplicationMessageProcessor proces } } - protected abstract void processNotEmptyMessage(ByteBuffer buffer, ReplicationMessageProcessor processor, TypeRegistry typeRegistry) + protected abstract void processNotEmptyMessage(ByteBuffer buffer, ReplicationStream.ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException; @Override diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/MessageDecoder.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/MessageDecoder.java index 07e4c8de773..aec6462570a 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/MessageDecoder.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/MessageDecoder.java @@ -13,7 +13,6 @@ import com.yugabyte.replication.fluent.logical.ChainedLogicalStreamBuilder; import io.debezium.connector.yb.postgresql.TypeRegistry; -import io.debezium.connector.yb.postgresql.connection.ReplicationStream.ReplicationMessageProcessor; /** * A class that is able to deserialize/decode binary representation of a batch of replication messages generated by @@ -31,7 +30,7 @@ public interface MessageDecoder { * @param processor - message processing on arrival * @param typeRegistry - registry with known types */ - void processMessage(ByteBuffer buffer, ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException; + void processMessage(ByteBuffer buffer, ReplicationStream.ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException; /** * Allows MessageDecoder to configure options with which the replication stream is started. diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessage.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessage.java index 63597988dee..ecc98361f03 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessage.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessage.java @@ -21,7 +21,6 @@ import com.yugabyte.geometric.PGpolygon; import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; -import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; import io.debezium.connector.yb.postgresql.PostgresType; import io.debezium.connector.yb.postgresql.TypeRegistry; @@ -63,7 +62,7 @@ interface Column { */ ColumnTypeMetadata getTypeMetadata(); - Object getValue(PgConnectionSupplier connection, boolean includeUnknownDatatypes); + Object getValue(PostgresStreamingChangeEventSource.PgConnectionSupplier connection, boolean includeUnknownDatatypes); boolean isOptional(); @@ -131,9 +130,9 @@ interface ColumnValue { boolean isArray(PostgresType type); - Object asArray(String columnName, PostgresType type, String fullType, PgConnectionSupplier connection); + Object asArray(String columnName, PostgresType type, String fullType, PostgresStreamingChangeEventSource.PgConnectionSupplier connection); - Object asDefault(TypeRegistry typeRegistry, int columnType, String columnName, String fullType, boolean includeUnknownDatatypes, PgConnectionSupplier connection); + Object asDefault(TypeRegistry typeRegistry, int columnType, String columnName, String fullType, boolean includeUnknownDatatypes, PostgresStreamingChangeEventSource.PgConnectionSupplier connection); } /** diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessageColumnValueResolver.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessageColumnValueResolver.java index 70adb7854b2..5338a511c14 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessageColumnValueResolver.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessageColumnValueResolver.java @@ -5,11 +5,11 @@ */ package io.debezium.connector.yb.postgresql.connection; +import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; +import io.debezium.connector.yb.postgresql.PostgresType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; -import io.debezium.connector.yb.postgresql.PostgresType; import io.debezium.connector.yb.postgresql.TypeRegistry; import io.debezium.connector.yb.postgresql.connection.ReplicationMessage.ColumnValue; @@ -32,7 +32,7 @@ public class ReplicationMessageColumnValueResolver { * @param typeRegistry the postgres type registry * @return */ - public static Object resolveValue(String columnName, PostgresType type, String fullType, ColumnValue value, final PgConnectionSupplier connection, + public static Object resolveValue(String columnName, PostgresType type, String fullType, ColumnValue value, final PostgresStreamingChangeEventSource.PgConnectionSupplier connection, boolean includeUnknownDatatypes, TypeRegistry typeRegistry) { if (value.isNull()) { // nulls are null diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/WalPositionLocator.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/WalPositionLocator.java index e0571fad7e3..097cad33786 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/WalPositionLocator.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/WalPositionLocator.java @@ -13,7 +13,6 @@ import org.slf4j.LoggerFactory; import io.debezium.DebeziumException; -import io.debezium.connector.yb.postgresql.connection.ReplicationMessage.Operation; /** * This class is responsible for finding out a LSN from which Debezium should @@ -31,7 +30,7 @@ public class WalPositionLocator { private final Lsn lastCommitStoredLsn; private final Lsn lastEventStoredLsn; - private final Operation lastProcessedMessageType; + private final ReplicationMessage.Operation lastProcessedMessageType; private Lsn txStartLsn = null; private Lsn lsnAfterLastEventStoredLsn = null; private Lsn firstLsnReceived = null; @@ -40,7 +39,7 @@ public class WalPositionLocator { private boolean storeLsnAfterLastEventStoredLsn = false; private Set lsnSeen = new HashSet<>(1_000); - public WalPositionLocator(Lsn lastCommitStoredLsn, Lsn lastEventStoredLsn, Operation lastProcessedMessageType) { + public WalPositionLocator(Lsn lastCommitStoredLsn, Lsn lastEventStoredLsn, ReplicationMessage.Operation lastProcessedMessageType) { this.lastCommitStoredLsn = lastCommitStoredLsn; this.lastEventStoredLsn = lastEventStoredLsn; this.lastProcessedMessageType = lastProcessedMessageType; @@ -76,7 +75,7 @@ public Optional resumeFromLsn(Lsn currentLsn, ReplicationMessage message) { if (currentLsn.equals(lastEventStoredLsn)) { // BEGIN and first message after change have the same LSN if (txStartLsn != null - && (lastProcessedMessageType == null || lastProcessedMessageType == Operation.BEGIN || lastProcessedMessageType == Operation.COMMIT)) { + && (lastProcessedMessageType == null || lastProcessedMessageType == ReplicationMessage.Operation.BEGIN || lastProcessedMessageType == ReplicationMessage.Operation.COMMIT)) { // start from the BEGIN tx; prevent skipping of unprocessed event after BEGIN or previous tx COMMIT LOGGER.info("Will restart from LSN '{}' corresponding to the event following the BEGIN event", txStartLsn); startStreamingLsn = txStartLsn; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputMessageDecoder.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputMessageDecoder.java index 51a794c07c1..b51690a96b4 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputMessageDecoder.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputMessageDecoder.java @@ -27,16 +27,17 @@ import java.util.function.Function; import com.yugabyte.replication.fluent.logical.ChainedLogicalStreamBuilder; +import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; +import io.debezium.connector.yb.postgresql.UnchangedToastedReplicationMessageColumn; import io.debezium.connector.yb.postgresql.YugabyteDBServer; +import io.debezium.connector.yb.postgresql.connection.AbstractReplicationMessageColumn; +import io.debezium.connector.yb.postgresql.connection.TransactionMessage; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; import io.debezium.connector.yb.postgresql.PostgresType; import io.debezium.connector.yb.postgresql.TypeRegistry; -import io.debezium.connector.yb.postgresql.UnchangedToastedReplicationMessageColumn; import io.debezium.connector.yb.postgresql.connection.AbstractMessageDecoder; -import io.debezium.connector.yb.postgresql.connection.AbstractReplicationMessageColumn; import io.debezium.connector.yb.postgresql.connection.LogicalDecodingMessage; import io.debezium.connector.yb.postgresql.connection.Lsn; import io.debezium.connector.yb.postgresql.connection.MessageDecoderContext; @@ -45,7 +46,6 @@ import io.debezium.connector.yb.postgresql.connection.ReplicationMessage.NoopMessage; import io.debezium.connector.yb.postgresql.connection.ReplicationMessage.Operation; import io.debezium.connector.yb.postgresql.connection.ReplicationStream.ReplicationMessageProcessor; -import io.debezium.connector.yb.postgresql.connection.TransactionMessage; import io.debezium.connector.yb.postgresql.connection.WalPositionLocator; import io.debezium.data.Envelope; import io.debezium.relational.ColumnEditor; @@ -749,7 +749,7 @@ private static List resolveColumnsFromStreamTupleData(ByteBuffer buffer, final String valueStr = readColumnValueAsString(buffer); replicationMessageColumn = new AbstractReplicationMessageColumn(columnName, columnType, typeExpression, optional) { @Override - public Object getValue(PgConnectionSupplier connection, boolean includeUnknownDatatypes) { + public Object getValue(PostgresStreamingChangeEventSource.PgConnectionSupplier connection, boolean includeUnknownDatatypes) { return PgOutputReplicationMessage.getValue(columnName, columnType, typeExpression, valueStr, connection, includeUnknownDatatypes, typeRegistry); } @@ -771,7 +771,7 @@ public String toString() { else if (type == 'n') { replicationMessageColumn = new AbstractReplicationMessageColumn(columnName, columnType, typeExpression, true) { @Override - public Object getValue(PgConnectionSupplier connection, boolean includeUnknownDatatypes) { + public Object getValue(PostgresStreamingChangeEventSource.PgConnectionSupplier connection, boolean includeUnknownDatatypes) { return null; } }; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputReplicationMessage.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputReplicationMessage.java index 1d751ebfa7d..dada83595c7 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputReplicationMessage.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputReplicationMessage.java @@ -9,7 +9,7 @@ import java.util.List; import java.util.OptionalLong; -import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; +import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; import io.debezium.connector.yb.postgresql.PostgresType; import io.debezium.connector.yb.postgresql.TypeRegistry; import io.debezium.connector.yb.postgresql.connection.ReplicationMessage; @@ -86,7 +86,7 @@ public boolean shouldSchemaBeSynchronized() { * * @return the value; may be null */ - public static Object getValue(String columnName, PostgresType type, String fullType, String rawValue, final PgConnectionSupplier connection, + public static Object getValue(String columnName, PostgresType type, String fullType, String rawValue, final PostgresStreamingChangeEventSource.PgConnectionSupplier connection, boolean includeUnknownDataTypes, TypeRegistry typeRegistry) { final PgOutputColumnValue columnValue = new PgOutputColumnValue(rawValue); return ReplicationMessageColumnValueResolver.resolveValue(columnName, type, fullType, columnValue, connection, includeUnknownDataTypes, typeRegistry); diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoColumnValue.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoColumnValue.java index 7bc6467d660..f31f8fa21d5 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoColumnValue.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoColumnValue.java @@ -19,13 +19,13 @@ import com.yugabyte.geometric.PGpoint; import com.yugabyte.jdbc.PgArray; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import io.debezium.connector.yb.postgresql.PgOid; -import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; +import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; import io.debezium.connector.yb.postgresql.PostgresType; import io.debezium.connector.yb.postgresql.PostgresValueConverter; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import io.debezium.connector.yb.postgresql.TypeRegistry; import io.debezium.connector.yb.postgresql.connection.AbstractColumnValue; import io.debezium.connector.yb.postgresql.connection.DateTimeFormat; @@ -310,7 +310,7 @@ public boolean isArray(PostgresType type) { } @Override - public Object asArray(String columnName, PostgresType type, String fullType, PgConnectionSupplier connection) { + public Object asArray(String columnName, PostgresType type, String fullType, PostgresStreamingChangeEventSource.PgConnectionSupplier connection) { // Currently the logical decoding plugin sends unhandled types as a byte array containing the string // representation (in Postgres) of the array value. // The approach to decode this is sub-optimal but the only way to improve this is to update the plugin. @@ -338,7 +338,7 @@ public Object asArray(String columnName, PostgresType type, String fullType, PgC @Override public Object asDefault(TypeRegistry typeRegistry, int columnType, String columnName, String fullType, boolean includeUnknownDatatypes, - PgConnectionSupplier connection) { + PostgresStreamingChangeEventSource.PgConnectionSupplier connection) { final PostgresType type = typeRegistry.get(columnType); if (type.getOid() == typeRegistry.geometryOid() || type.getOid() == typeRegistry.geographyOid() || diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoReplicationMessage.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoReplicationMessage.java index c4baa72f029..6cd1a8197ba 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoReplicationMessage.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoReplicationMessage.java @@ -14,7 +14,7 @@ import java.util.stream.IntStream; import io.debezium.DebeziumException; -import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; +import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; import io.debezium.connector.yb.postgresql.PostgresType; import io.debezium.connector.yb.postgresql.UnchangedToastedReplicationMessageColumn; import io.debezium.connector.yb.postgresql.connection.AbstractReplicationMessageColumn; @@ -112,7 +112,7 @@ private List transform(List mes typeInfo.map(PgProto.TypeInfo::getValueOptional).orElse(Boolean.FALSE)) { @Override - public Object getValue(PgConnectionSupplier connection, boolean includeUnknownDatatypes) { + public Object getValue(PostgresStreamingChangeEventSource.PgConnectionSupplier connection, boolean includeUnknownDatatypes) { return PgProtoReplicationMessage.this.getValue(columnName, type, fullType, datum, connection, includeUnknownDatatypes); } @@ -130,7 +130,7 @@ public boolean isLastEventForLsn() { return true; } - public Object getValue(String columnName, PostgresType type, String fullType, PgProto.DatumMessage datumMessage, final PgConnectionSupplier connection, + public Object getValue(String columnName, PostgresType type, String fullType, PgProto.DatumMessage datumMessage, final PostgresStreamingChangeEventSource.PgConnectionSupplier connection, boolean includeUnknownDatatypes) { final PgProtoColumnValue columnValue = new PgProtoColumnValue(datumMessage); return ReplicationMessageColumnValueResolver.resolveValue(columnName, type, fullType, columnValue, connection, includeUnknownDatatypes, typeRegistry); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/AbstractRecordsProducerTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/AbstractRecordsProducerTest.java index 628244fb75c..4d3ba5407f2 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/AbstractRecordsProducerTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/AbstractRecordsProducerTest.java @@ -6,7 +6,6 @@ package io.debezium.connector.yb.postgresql; -import static io.debezium.connector.yb.postgresql.TestHelper.PK_FIELD; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; @@ -972,7 +971,7 @@ protected List schemasAndValuesForDomainAliasTypes(boolean final ByteBuffer polygonByteBuffer = ByteBuffer.wrap("((0.0,0.0),(0.0,1.0),(1.0,0.0),(0.0,0.0))".getBytes()); return Arrays.asList( - new SchemaAndValueField(PK_FIELD, SchemaBuilder.int32().defaultValue(0).build(), 1), + new SchemaAndValueField(TestHelper.PK_FIELD, SchemaBuilder.int32().defaultValue(0).build(), 1), new SchemaAndValueField("bit_base", Bits.builder(3).build(), new byte[]{ 5 }), new SchemaAndValueField("bit_alias", Bits.builder(3).build(), new byte[]{ 5 }), new SchemaAndValueField("smallint_base", SchemaBuilder.INT16_SCHEMA, (short) 1), diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PublicGeometryIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PublicGeometryIT.java index 72342c1006e..1c40d8bb2ab 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PublicGeometryIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PublicGeometryIT.java @@ -6,14 +6,14 @@ package io.debezium.connector.yb.postgresql; -import static io.debezium.connector.yb.postgresql.TestHelper.PK_FIELD; -import static io.debezium.connector.yb.postgresql.TestHelper.topicName; import static junit.framework.TestCase.assertEquals; import static org.junit.Assert.assertFalse; import java.util.List; import java.util.concurrent.TimeUnit; +import io.debezium.connector.yb.postgresql.junit.SkipTestDependingOnDecoderPluginNameRule; +import junit.framework.TestCase; import org.apache.kafka.connect.source.SourceRecord; import org.junit.Before; import org.junit.Rule; @@ -25,7 +25,6 @@ import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; import io.debezium.connector.yb.postgresql.connection.PostgresConnection; import io.debezium.connector.yb.postgresql.connection.ReplicationConnection; -import io.debezium.connector.yb.postgresql.junit.SkipTestDependingOnDecoderPluginNameRule; import io.debezium.data.Envelope; import io.debezium.data.VerifyRecord; import io.debezium.doc.FixFor; @@ -103,7 +102,7 @@ private void assertInsert(String statement, Integer pk, List config .with(PostgresConnectorConfig.SCHEMA_REFRESH_MODE, PostgresConnectorConfig.SchemaRefreshMode.COLUMNS_DIFF_EXCLUDE_UNCHANGED_TOAST)); @@ -3835,7 +3834,7 @@ private String getReplicationSlotChangesQuery() { case DECODERBUFS: return "SELECT pg_logical_slot_get_binary_changes('" + ReplicationConnection.Builder.DEFAULT_SLOT_NAME + "', " + "NULL, NULL)"; - case PGOUTPUT: + case SkipWhenDecoderPluginNameIs.DecoderPluginName.PGOUTPUT: return "SELECT pg_logical_slot_get_binary_changes('" + ReplicationConnection.Builder.DEFAULT_SLOT_NAME + "', " + "NULL, NULL, 'proto_version', '1', 'publication_names', '" + ReplicationConnection.Builder.DEFAULT_PUBLICATION_NAME + "')"; } From e6257dc0ed0d2b29e72ffb205a8980f666da9891 Mon Sep 17 00:00:00 2001 From: Vaibhav Kushwaha Date: Tue, 2 Jul 2024 09:39:05 +0530 Subject: [PATCH 08/15] Revert "added yb namespace to the postgres package" This reverts commit 1be890dd49589154cc3f331a6839e7daf90138bd. --- .../{yb => }/postgresql/ChangeEvent.java | 2 +- .../LogicalDecodingMessageFilter.java | 2 +- .../LogicalDecodingMessageMonitor.java | 4 +- .../connector/{yb => }/postgresql/Module.java | 2 +- .../postgresql/PGTableSchemaBuilder.java | 2 +- .../connector/{yb => }/postgresql/PgOid.java | 2 +- .../{yb => }/postgresql/PostgisGeometry.java | 2 +- .../PostgresChangeEventSourceCoordinator.java | 8 ++-- .../PostgresChangeEventSourceFactory.java | 12 +++--- .../PostgresChangeRecordEmitter.java | 9 ++-- .../postgresql/PostgresConnector.java | 4 +- .../postgresql/PostgresConnectorConfig.java | 24 +++++------ .../postgresql/PostgresConnectorTask.java | 16 ++++---- .../postgresql/PostgresErrorHandler.java | 2 +- .../postgresql/PostgresEventDispatcher.java | 6 +-- .../PostgresEventMetadataProvider.java | 2 +- .../postgresql/PostgresOffsetContext.java | 10 ++--- .../postgresql/PostgresPartition.java | 2 +- .../{yb => }/postgresql/PostgresSchema.java | 8 ++-- .../postgresql/PostgresSchemaFactory.java | 4 +- ...dIncrementalSnapshotChangeEventSource.java | 4 +- .../PostgresSnapshotChangeEventSource.java | 17 ++++---- .../PostgresSourceInfoStructMaker.java | 2 +- .../PostgresStreamingChangeEventSource.java | 23 ++++++----- .../postgresql/PostgresTaskContext.java | 8 ++-- .../postgresql/PostgresTopicSelector.java | 2 +- .../{yb => }/postgresql/PostgresType.java | 2 +- .../postgresql/PostgresValueConverter.java | 8 ++-- .../{yb => }/postgresql/RecordsProducer.java | 2 +- .../postgresql/ReplicaIdentityMapper.java | 4 +- .../{yb => }/postgresql/SourceInfo.java | 6 +-- .../{yb => }/postgresql/TypeRegistry.java | 4 +- .../UnchangedToastedPlaceholder.java | 2 +- ...hangedToastedReplicationMessageColumn.java | 10 ++--- .../{yb => }/postgresql/YBHeartbeatImpl.java | 2 +- .../YBSnapshotChangeRecordEmitter.java | 4 +- .../{yb => }/postgresql/YugabyteDBServer.java | 2 +- .../connection/AbstractColumnValue.java | 15 +++---- .../connection/AbstractMessageDecoder.java | 9 ++-- .../AbstractReplicationMessageColumn.java | 4 +- .../postgresql/connection/DateTimeFormat.java | 5 ++- .../connection/LogicalDecodingMessage.java | 2 +- .../{yb => }/postgresql/connection/Lsn.java | 2 +- .../postgresql/connection/MessageDecoder.java | 7 ++-- .../connection/MessageDecoderContext.java | 6 +-- .../connection/PostgresConnection.java | 17 ++++---- .../PostgresDefaultValueConverter.java | 8 ++-- .../PostgresReplicationConnection.java | 12 +++--- .../connection/ReplicaIdentityInfo.java | 2 +- .../connection/ReplicationConnection.java | 10 ++--- .../connection/ReplicationMessage.java | 15 +++---- ...ReplicationMessageColumnValueResolver.java | 12 +++--- .../connection/ReplicationStream.java | 2 +- .../postgresql/connection/ServerInfo.java | 4 +- .../connection/TransactionMessage.java | 2 +- .../connection/WalPositionLocator.java | 9 ++-- .../connection/pgoutput/ColumnMetaData.java | 6 +-- .../pgoutput/PgOutputColumnValue.java | 6 +-- .../pgoutput/PgOutputMessageDecoder.java | 40 +++++++++--------- .../pgoutput/PgOutputRelationMetaData.java | 2 +- .../pgoutput/PgOutputReplicationMessage.java | 14 +++---- .../PgOutputTruncateReplicationMessage.java | 2 +- .../pgproto/PgProtoColumnValue.java | 20 ++++----- .../pgproto/PgProtoMessageDecoder.java | 8 ++-- .../pgproto/PgProtoReplicationMessage.java | 20 ++++----- .../converters/PostgresCloudEventsMaker.java | 2 +- .../PostgresCloudEventsProvider.java | 4 +- .../converters/PostgresRecordParser.java | 2 +- .../{yb => }/postgresql/data/Ltree.java | 5 ++- .../metadata/PostgresConnectorMetadata.java | 8 ++-- .../PostgresConnectorMetadataProvider.java | 2 +- .../PostgresTransactionMonitor.java | 4 +- .../DebeziumPostgresConnectRestExtension.java | 2 +- .../DebeziumPostgresConnectorResource.java | 6 +-- .../snapshot/AlwaysSnapshotter.java | 2 +- .../snapshot/InitialOnlySnapshotter.java | 8 ++-- .../snapshot/InitialSnapshotter.java | 8 ++-- .../postgresql/snapshot/NeverSnapshotter.java | 10 ++--- .../snapshot/QueryingSnapshotter.java | 14 +++---- .../snapshot/SnapshotterWrapper.java | 10 ++--- .../{yb => }/postgresql/spi/OffsetState.java | 4 +- .../postgresql/spi/SlotCreationResult.java | 4 +- .../{yb => }/postgresql/spi/SlotState.java | 4 +- .../{yb => }/postgresql/spi/Snapshotter.java | 4 +- .../AbstractTimescaleDbMetadata.java | 2 +- .../QueryInformationSchemaMetadata.java | 4 +- .../transforms/timescaledb/TimescaleDb.java | 4 +- .../TimescaleDbConfigDefinition.java | 2 +- .../timescaledb/TimescaleDbMetadata.java | 2 +- .../transforms/yugabytedb/Pair.java | 2 +- .../yugabytedb/YBExtractNewRecordState.java | 2 +- ...ebezium.converters.spi.CloudEventsProvider | 2 +- ...ebezium.metadata.ConnectorMetadataProvider | 2 +- ...he.kafka.connect.rest.ConnectRestExtension | 2 +- ...pache.kafka.connect.source.SourceConnector | 2 +- ...he.kafka.connect.transforms.Transformation | 2 +- .../AbstractRecordsProducerTest.java | 7 ++-- .../postgresql/BlockingSnapshotIT.java | 4 +- .../postgresql/CloudEventsConverterIT.java | 4 +- .../CustomLifecycleHookTestSnapshot.java | 4 +- .../CustomPartialTableTestSnapshot.java | 2 +- .../CustomPostgresSourceInfoStructMaker.java | 4 +- .../CustomStartFromStreamingTestSnapshot.java | 4 +- .../postgresql/CustomTestSnapshot.java | 11 +++-- .../postgresql/CustomTypeEncodingTest.java | 2 +- .../{yb => }/postgresql/DebeziumEngineIT.java | 2 +- .../postgresql/DecoderDifferences.java | 2 +- .../{yb => }/postgresql/DomainTypesIT.java | 4 +- .../{yb => }/postgresql/FieldTest.java | 3 +- .../postgresql/IncrementalSnapshotIT.java | 4 +- .../postgresql/LogicalDecodingMessageIT.java | 8 ++-- .../{yb => }/postgresql/NotificationsIT.java | 2 +- .../postgresql/OutboxEventRouterIT.java | 4 +- .../PostgresConnectorConfigDefTest.java | 2 +- .../postgresql/PostgresConnectorIT.java | 34 +++++++-------- .../postgresql/PostgresConnectorTaskIT.java | 6 +-- .../PostgresDefaultValueConverterIT.java | 8 ++-- .../postgresql/PostgresErrorHandlerTest.java | 4 +- .../postgresql/PostgresMetricsIT.java | 4 +- .../{yb => }/postgresql/PostgresMoneyIT.java | 4 +- .../postgresql/PostgresOffsetContextTest.java | 4 +- .../postgresql/PostgresPartitionTest.java | 3 +- .../PostgresReselectColumnsProcessorIT.java | 4 +- .../{yb => }/postgresql/PostgresSchemaIT.java | 8 ++-- .../postgresql/PostgresShutdownIT.java | 6 +-- ...gresSkipMessagesWithoutChangeConfigIT.java | 4 +- .../{yb => }/postgresql/PublicGeometryIT.java | 17 ++++---- .../RecordsSnapshotParallelProducerIT.java | 2 +- .../postgresql/RecordsSnapshotProducerIT.java | 8 ++-- .../postgresql/RecordsStreamProducerIT.java | 41 ++++++++++--------- .../ReplicaIdentityTestMapperTest.java | 5 +-- .../{yb => }/postgresql/SignalsIT.java | 6 +-- .../SnapshotWithOverridesProducerIT.java | 6 +-- .../{yb => }/postgresql/SourceInfoTest.java | 5 +-- .../postgresql/TablesWithoutPrimaryKeyIT.java | 4 +- .../{yb => }/postgresql/TestHelper.java | 14 +++---- .../postgresql/TransactionMetadataIT.java | 6 +-- .../{yb => }/postgresql/YBVerifyRecord.java | 2 +- .../postgresql/YugabyteReplicaIdentityIT.java | 6 +-- .../connection/ISODateTimeFormatTest.java | 3 +- .../connection/PostgresConnectionIT.java | 4 +- .../PostgresDefaultValueConverterIT.java | 12 +++--- .../connection/ReplicationConnectionIT.java | 12 +++--- .../PostgresDatabaseVersionResolver.java | 6 +-- ...pTestDependingOnDecoderPluginNameRule.java | 4 +- .../junit/SkipWhenDecoderPluginNameIs.java | 2 +- .../junit/SkipWhenDecoderPluginNameIsNot.java | 2 +- .../DebeziumPostgresConnectorResourceIT.java | 10 ++--- ...PostgresConnectorResourceNoDatabaseIT.java | 8 ++-- .../postgresql/spi/CustomActionProvider.java | 2 +- .../transforms/timescaledb/TestMetadata.java | 3 +- .../timescaledb/TimescaleDbDatabaseTest.java | 12 +++--- .../timescaledb/TimescaleDbTest.java | 2 +- ...peline.signal.actions.SignalActionProvider | 2 +- .../src/test/resources/logback-test.xml | 2 +- 155 files changed, 492 insertions(+), 495 deletions(-) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/ChangeEvent.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/LogicalDecodingMessageFilter.java (95%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/LogicalDecodingMessageMonitor.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/Module.java (94%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/PGTableSchemaBuilder.java (99%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/PgOid.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/PostgisGeometry.java (98%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/PostgresChangeEventSourceCoordinator.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/PostgresChangeEventSourceFactory.java (94%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/PostgresChangeRecordEmitter.java (98%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/PostgresConnector.java (98%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/PostgresConnectorConfig.java (98%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/PostgresConnectorTask.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/PostgresErrorHandler.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/PostgresEventDispatcher.java (94%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/PostgresEventMetadataProvider.java (98%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/PostgresOffsetContext.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/PostgresPartition.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/PostgresSchema.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/PostgresSchemaFactory.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/PostgresSignalBasedIncrementalSnapshotChangeEventSource.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/PostgresSnapshotChangeEventSource.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/PostgresSourceInfoStructMaker.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/PostgresStreamingChangeEventSource.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/PostgresTaskContext.java (95%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/PostgresTopicSelector.java (94%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/PostgresType.java (99%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/PostgresValueConverter.java (99%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/RecordsProducer.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/ReplicaIdentityMapper.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/SourceInfo.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/TypeRegistry.java (99%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/UnchangedToastedPlaceholder.java (98%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/UnchangedToastedReplicationMessageColumn.java (93%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/YBHeartbeatImpl.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/YBSnapshotChangeRecordEmitter.java (89%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/YugabyteDBServer.java (85%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/AbstractColumnValue.java (93%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/AbstractMessageDecoder.java (84%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/AbstractReplicationMessageColumn.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/DateTimeFormat.java (98%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/LogicalDecodingMessage.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/Lsn.java (98%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/MessageDecoder.java (85%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/MessageDecoderContext.java (78%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/PostgresConnection.java (98%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/PostgresDefaultValueConverter.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/PostgresReplicationConnection.java (99%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/ReplicaIdentityInfo.java (98%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/ReplicationConnection.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/ReplicationMessage.java (90%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/ReplicationMessageColumnValueResolver.java (92%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/ReplicationStream.java (98%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/ServerInfo.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/TransactionMessage.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/WalPositionLocator.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/pgoutput/ColumnMetaData.java (95%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/pgoutput/PgOutputColumnValue.java (87%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/pgoutput/PgOutputMessageDecoder.java (95%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/pgoutput/PgOutputRelationMetaData.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/pgoutput/PgOutputReplicationMessage.java (82%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/pgoutput/PgOutputTruncateReplicationMessage.java (92%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/pgproto/PgProtoColumnValue.java (94%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/pgproto/PgProtoMessageDecoder.java (91%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/connection/pgproto/PgProtoReplicationMessage.java (85%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/converters/PostgresCloudEventsMaker.java (95%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/converters/PostgresCloudEventsProvider.java (91%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/converters/PostgresRecordParser.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/data/Ltree.java (90%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/metadata/PostgresConnectorMetadata.java (74%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/metadata/PostgresConnectorMetadataProvider.java (89%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/pipeline/txmetadata/PostgresTransactionMonitor.java (94%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/rest/DebeziumPostgresConnectRestExtension.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/rest/DebeziumPostgresConnectorResource.java (94%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/snapshot/AlwaysSnapshotter.java (91%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/snapshot/InitialOnlySnapshotter.java (83%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/snapshot/InitialSnapshotter.java (84%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/snapshot/NeverSnapshotter.java (83%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/snapshot/QueryingSnapshotter.java (90%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/snapshot/SnapshotterWrapper.java (74%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/spi/OffsetState.java (93%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/spi/SlotCreationResult.java (91%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/spi/SlotState.java (93%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/spi/Snapshotter.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/transforms/timescaledb/AbstractTimescaleDbMetadata.java (92%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/transforms/timescaledb/QueryInformationSchemaMetadata.java (96%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/transforms/timescaledb/TimescaleDb.java (97%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/transforms/timescaledb/TimescaleDbConfigDefinition.java (95%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/transforms/timescaledb/TimescaleDbMetadata.java (94%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/transforms/yugabytedb/Pair.java (94%) rename debezium-connector-postgres/src/main/java/io/debezium/connector/{yb => }/postgresql/transforms/yugabytedb/YBExtractNewRecordState.java (98%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/AbstractRecordsProducerTest.java (99%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/BlockingSnapshotIT.java (97%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/CloudEventsConverterIT.java (97%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/CustomLifecycleHookTestSnapshot.java (87%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/CustomPartialTableTestSnapshot.java (93%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/CustomPostgresSourceInfoStructMaker.java (89%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/CustomStartFromStreamingTestSnapshot.java (74%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/CustomTestSnapshot.java (83%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/CustomTypeEncodingTest.java (95%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/DebeziumEngineIT.java (99%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/DecoderDifferences.java (97%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/DomainTypesIT.java (96%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/FieldTest.java (77%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/IncrementalSnapshotIT.java (99%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/LogicalDecodingMessageIT.java (97%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/NotificationsIT.java (97%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/OutboxEventRouterIT.java (97%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/PostgresConnectorConfigDefTest.java (98%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/PostgresConnectorIT.java (99%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/PostgresConnectorTaskIT.java (91%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/PostgresDefaultValueConverterIT.java (96%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/PostgresErrorHandlerTest.java (93%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/PostgresMetricsIT.java (99%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/PostgresMoneyIT.java (98%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/PostgresOffsetContextTest.java (92%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/PostgresPartitionTest.java (84%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/PostgresReselectColumnsProcessorIT.java (97%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/PostgresSchemaIT.java (99%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/PostgresShutdownIT.java (97%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/PostgresSkipMessagesWithoutChangeConfigIT.java (98%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/PublicGeometryIT.java (89%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/RecordsSnapshotParallelProducerIT.java (95%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/RecordsSnapshotProducerIT.java (99%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/RecordsStreamProducerIT.java (99%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/ReplicaIdentityTestMapperTest.java (91%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/SignalsIT.java (98%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/SnapshotWithOverridesProducerIT.java (93%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/SourceInfoTest.java (92%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/TablesWithoutPrimaryKeyIT.java (98%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/TestHelper.java (97%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/TransactionMetadataIT.java (96%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/YBVerifyRecord.java (96%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/YugabyteReplicaIdentityIT.java (98%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/connection/ISODateTimeFormatTest.java (98%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/connection/PostgresConnectionIT.java (99%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/connection/PostgresDefaultValueConverterIT.java (92%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/connection/ReplicationConnectionIT.java (98%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/junit/PostgresDatabaseVersionResolver.java (84%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/junit/SkipTestDependingOnDecoderPluginNameRule.java (94%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/junit/SkipWhenDecoderPluginNameIs.java (96%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/junit/SkipWhenDecoderPluginNameIsNot.java (96%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/rest/DebeziumPostgresConnectorResourceIT.java (97%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/rest/DebeziumPostgresConnectorResourceNoDatabaseIT.java (89%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/spi/CustomActionProvider.java (97%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/transforms/timescaledb/TestMetadata.java (88%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/transforms/timescaledb/TimescaleDbDatabaseTest.java (94%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/{yb => }/postgresql/transforms/timescaledb/TimescaleDbTest.java (98%) diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/ChangeEvent.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/ChangeEvent.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/ChangeEvent.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/ChangeEvent.java index 4902dff0f26..93687814cb2 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/ChangeEvent.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/ChangeEvent.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import org.apache.kafka.connect.source.SourceRecord; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/LogicalDecodingMessageFilter.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/LogicalDecodingMessageFilter.java similarity index 95% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/LogicalDecodingMessageFilter.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/LogicalDecodingMessageFilter.java index 69788ddaf4e..5248b6c64f7 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/LogicalDecodingMessageFilter.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/LogicalDecodingMessageFilter.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.util.function.Predicate; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/LogicalDecodingMessageMonitor.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/LogicalDecodingMessageMonitor.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/LogicalDecodingMessageMonitor.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/LogicalDecodingMessageMonitor.java index ea9523e9a51..c201ffb727c 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/LogicalDecodingMessageMonitor.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/LogicalDecodingMessageMonitor.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; @@ -16,7 +16,7 @@ import org.apache.kafka.connect.source.SourceRecord; import io.debezium.config.CommonConnectorConfig.BinaryHandlingMode; -import io.debezium.connector.yb.postgresql.connection.LogicalDecodingMessage; +import io.debezium.connector.postgresql.connection.LogicalDecodingMessage; import io.debezium.data.Envelope; import io.debezium.function.BlockingConsumer; import io.debezium.pipeline.spi.OffsetContext; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/Module.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/Module.java similarity index 94% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/Module.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/Module.java index 3712070c639..ea5855305b4 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/Module.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/Module.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.util.Properties; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PGTableSchemaBuilder.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PGTableSchemaBuilder.java similarity index 99% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PGTableSchemaBuilder.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PGTableSchemaBuilder.java index 2a3f1f77c96..da29fe17134 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PGTableSchemaBuilder.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PGTableSchemaBuilder.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.sql.Types; import java.util.List; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PgOid.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PgOid.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PgOid.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PgOid.java index 5817d458933..53475640194 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PgOid.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PgOid.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import com.yugabyte.core.Oid; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgisGeometry.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgisGeometry.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgisGeometry.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgisGeometry.java index 5e32fdef597..2ab16252628 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgisGeometry.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgisGeometry.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.nio.ByteBuffer; import java.nio.ByteOrder; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeEventSourceCoordinator.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresChangeEventSourceCoordinator.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeEventSourceCoordinator.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresChangeEventSourceCoordinator.java index a8044913c4a..285dd8a1f6d 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeEventSourceCoordinator.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresChangeEventSourceCoordinator.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.sql.SQLException; import java.time.Duration; @@ -11,7 +11,7 @@ import java.util.concurrent.atomic.AtomicReference; import io.debezium.connector.common.CdcSourceTaskContext; -import io.debezium.connector.yb.postgresql.spi.OffsetState; +import io.debezium.connector.postgresql.spi.OffsetState; import io.debezium.pipeline.spi.SnapshotResult; import io.debezium.util.Clock; import io.debezium.util.LoggingContext; @@ -22,8 +22,8 @@ import io.debezium.DebeziumException; import io.debezium.config.CommonConnectorConfig; -import io.debezium.connector.yb.postgresql.spi.SlotState; -import io.debezium.connector.yb.postgresql.spi.Snapshotter; +import io.debezium.connector.postgresql.spi.SlotState; +import io.debezium.connector.postgresql.spi.Snapshotter; import io.debezium.pipeline.ChangeEventSourceCoordinator; import io.debezium.pipeline.ErrorHandler; import io.debezium.pipeline.EventDispatcher; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeEventSourceFactory.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresChangeEventSourceFactory.java similarity index 94% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeEventSourceFactory.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresChangeEventSourceFactory.java index c4ee9224b94..024892eadd5 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeEventSourceFactory.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresChangeEventSourceFactory.java @@ -3,15 +3,15 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.util.Optional; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection; -import io.debezium.connector.yb.postgresql.connection.ReplicationConnection; -import io.debezium.connector.yb.postgresql.spi.SlotCreationResult; -import io.debezium.connector.yb.postgresql.spi.SlotState; -import io.debezium.connector.yb.postgresql.spi.Snapshotter; +import io.debezium.connector.postgresql.connection.PostgresConnection; +import io.debezium.connector.postgresql.connection.ReplicationConnection; +import io.debezium.connector.postgresql.spi.SlotCreationResult; +import io.debezium.connector.postgresql.spi.SlotState; +import io.debezium.connector.postgresql.spi.Snapshotter; import io.debezium.jdbc.MainConnectionProvidingConnectionFactory; import io.debezium.pipeline.ErrorHandler; import io.debezium.pipeline.notification.NotificationService; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeRecordEmitter.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresChangeRecordEmitter.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeRecordEmitter.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresChangeRecordEmitter.java index fe852c601e8..8eee5901664 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresChangeRecordEmitter.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresChangeRecordEmitter.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.sql.SQLException; import java.util.ArrayList; @@ -17,15 +17,16 @@ import java.util.Set; import java.util.stream.Collectors; -import io.debezium.connector.yb.postgresql.connection.ReplicaIdentityInfo; +import io.debezium.connector.postgresql.connection.ReplicaIdentityInfo; +import org.apache.kafka.connect.data.SchemaBuilder; import org.apache.kafka.connect.data.Struct; import org.apache.kafka.connect.errors.ConnectException; import com.yugabyte.core.BaseConnection; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection; -import io.debezium.connector.yb.postgresql.connection.ReplicationMessage; +import io.debezium.connector.postgresql.connection.PostgresConnection; +import io.debezium.connector.postgresql.connection.ReplicationMessage; import io.debezium.data.Envelope.Operation; import io.debezium.function.Predicates; import io.debezium.pipeline.spi.ChangeRecordEmitter; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnector.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnector.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnector.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnector.java index 9f10b3ef99b..dabbb3f7ef8 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnector.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnector.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.sql.SQLException; import java.util.Collections; @@ -23,7 +23,7 @@ import io.debezium.DebeziumException; import io.debezium.config.Configuration; import io.debezium.connector.common.RelationalBaseSourceConnector; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection; +import io.debezium.connector.postgresql.connection.PostgresConnection; import io.debezium.relational.RelationalDatabaseConnectorConfig; import io.debezium.relational.TableId; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnectorConfig.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorConfig.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnectorConfig.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorConfig.java index 5de47eac961..a8273a86a26 100755 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnectorConfig.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorConfig.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.time.Duration; import java.util.Arrays; @@ -12,12 +12,6 @@ import java.util.Map; import java.util.Optional; -import io.debezium.connector.yb.postgresql.connection.MessageDecoderContext; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection; -import io.debezium.connector.yb.postgresql.connection.pgoutput.PgOutputMessageDecoder; -import io.debezium.connector.yb.postgresql.connection.pgproto.PgProtoMessageDecoder; -import io.debezium.connector.yb.postgresql.snapshot.InitialSnapshotter; -import io.debezium.connector.yb.postgresql.spi.Snapshotter; import io.debezium.data.Envelope; import io.debezium.heartbeat.Heartbeat; import io.debezium.heartbeat.HeartbeatConnectionProvider; @@ -41,11 +35,17 @@ import io.debezium.config.Field; import io.debezium.connector.AbstractSourceInfo; import io.debezium.connector.SourceInfoStructMaker; -import io.debezium.connector.yb.postgresql.connection.MessageDecoder; -import io.debezium.connector.yb.postgresql.connection.ReplicationConnection; -import io.debezium.connector.yb.postgresql.snapshot.AlwaysSnapshotter; -import io.debezium.connector.yb.postgresql.snapshot.InitialOnlySnapshotter; -import io.debezium.connector.yb.postgresql.snapshot.NeverSnapshotter; +import io.debezium.connector.postgresql.connection.MessageDecoder; +import io.debezium.connector.postgresql.connection.MessageDecoderContext; +import io.debezium.connector.postgresql.connection.PostgresConnection; +import io.debezium.connector.postgresql.connection.ReplicationConnection; +import io.debezium.connector.postgresql.connection.pgoutput.PgOutputMessageDecoder; +import io.debezium.connector.postgresql.connection.pgproto.PgProtoMessageDecoder; +import io.debezium.connector.postgresql.snapshot.AlwaysSnapshotter; +import io.debezium.connector.postgresql.snapshot.InitialOnlySnapshotter; +import io.debezium.connector.postgresql.snapshot.InitialSnapshotter; +import io.debezium.connector.postgresql.snapshot.NeverSnapshotter; +import io.debezium.connector.postgresql.spi.Snapshotter; import io.debezium.jdbc.JdbcConfiguration; import io.debezium.relational.ColumnFilterMode; import io.debezium.relational.RelationalDatabaseConnectorConfig; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnectorTask.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorTask.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnectorTask.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorTask.java index 73676400d12..9921cdeaff0 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresConnectorTask.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorTask.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.nio.charset.Charset; import java.sql.SQLException; @@ -13,7 +13,6 @@ import java.util.Map; import java.util.stream.Collectors; -import io.debezium.connector.yb.postgresql.spi.Snapshotter; import org.apache.kafka.connect.errors.ConnectException; import org.apache.kafka.connect.errors.RetriableException; import org.apache.kafka.connect.source.SourceRecord; @@ -27,12 +26,13 @@ import io.debezium.config.Field; import io.debezium.connector.base.ChangeEventQueue; import io.debezium.connector.common.BaseSourceTask; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection.PostgresValueConverterBuilder; -import io.debezium.connector.yb.postgresql.connection.PostgresDefaultValueConverter; -import io.debezium.connector.yb.postgresql.connection.ReplicationConnection; -import io.debezium.connector.yb.postgresql.spi.SlotCreationResult; -import io.debezium.connector.yb.postgresql.spi.SlotState; +import io.debezium.connector.postgresql.connection.PostgresConnection; +import io.debezium.connector.postgresql.connection.PostgresConnection.PostgresValueConverterBuilder; +import io.debezium.connector.postgresql.connection.PostgresDefaultValueConverter; +import io.debezium.connector.postgresql.connection.ReplicationConnection; +import io.debezium.connector.postgresql.spi.SlotCreationResult; +import io.debezium.connector.postgresql.spi.SlotState; +import io.debezium.connector.postgresql.spi.Snapshotter; import io.debezium.document.DocumentReader; import io.debezium.jdbc.DefaultMainConnectionProvidingConnectionFactory; import io.debezium.jdbc.MainConnectionProvidingConnectionFactory; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresErrorHandler.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresErrorHandler.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresErrorHandler.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresErrorHandler.java index 4cc768102f4..472fb5ffb52 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresErrorHandler.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresErrorHandler.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.io.IOException; import java.sql.SQLException; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresEventDispatcher.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresEventDispatcher.java similarity index 94% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresEventDispatcher.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresEventDispatcher.java index b93a28472b4..d8bbf5eac91 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresEventDispatcher.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresEventDispatcher.java @@ -4,15 +4,15 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import org.apache.kafka.connect.source.SourceRecord; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import io.debezium.connector.base.ChangeEventQueue; -import io.debezium.connector.yb.postgresql.connection.LogicalDecodingMessage; -import io.debezium.connector.yb.postgresql.pipeline.txmetadata.PostgresTransactionMonitor; +import io.debezium.connector.postgresql.connection.LogicalDecodingMessage; +import io.debezium.connector.postgresql.pipeline.txmetadata.PostgresTransactionMonitor; import io.debezium.heartbeat.Heartbeat; import io.debezium.pipeline.DataChangeEvent; import io.debezium.pipeline.EventDispatcher; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresEventMetadataProvider.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresEventMetadataProvider.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresEventMetadataProvider.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresEventMetadataProvider.java index faf1163f0b0..2e1980b38f3 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresEventMetadataProvider.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresEventMetadataProvider.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.time.Instant; import java.util.Map; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresOffsetContext.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresOffsetContext.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresOffsetContext.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresOffsetContext.java index 9873cfdb32f..53348ba1915 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresOffsetContext.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresOffsetContext.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.sql.SQLException; import java.time.Instant; @@ -16,10 +16,10 @@ import org.slf4j.LoggerFactory; import io.debezium.connector.SnapshotRecord; -import io.debezium.connector.yb.postgresql.connection.Lsn; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection; -import io.debezium.connector.yb.postgresql.connection.ReplicationMessage.Operation; -import io.debezium.connector.yb.postgresql.spi.OffsetState; +import io.debezium.connector.postgresql.connection.Lsn; +import io.debezium.connector.postgresql.connection.PostgresConnection; +import io.debezium.connector.postgresql.connection.ReplicationMessage.Operation; +import io.debezium.connector.postgresql.spi.OffsetState; import io.debezium.pipeline.CommonOffsetContext; import io.debezium.pipeline.source.snapshot.incremental.IncrementalSnapshotContext; import io.debezium.pipeline.source.snapshot.incremental.SignalBasedIncrementalSnapshotContext; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresPartition.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresPartition.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresPartition.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresPartition.java index ac2cec6cea2..4e28d658bd8 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresPartition.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresPartition.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import static io.debezium.relational.RelationalDatabaseConnectorConfig.DATABASE_NAME; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSchema.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSchema.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSchema.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSchema.java index 843c03d7a10..d94bace57dd 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSchema.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSchema.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.sql.SQLException; import java.util.ArrayList; @@ -20,9 +20,9 @@ import org.slf4j.LoggerFactory; import io.debezium.annotation.NotThreadSafe; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection; -import io.debezium.connector.yb.postgresql.connection.PostgresDefaultValueConverter; -import io.debezium.connector.yb.postgresql.connection.ReplicaIdentityInfo; +import io.debezium.connector.postgresql.connection.PostgresConnection; +import io.debezium.connector.postgresql.connection.PostgresDefaultValueConverter; +import io.debezium.connector.postgresql.connection.ReplicaIdentityInfo; import io.debezium.jdbc.JdbcConnection; import io.debezium.relational.RelationalDatabaseSchema; import io.debezium.relational.Table; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSchemaFactory.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSchemaFactory.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSchemaFactory.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSchemaFactory.java index c6503cb4113..d64b472fadf 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSchemaFactory.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSchemaFactory.java @@ -3,13 +3,13 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import org.apache.kafka.connect.data.Schema; import org.apache.kafka.connect.data.SchemaBuilder; import io.debezium.config.CommonConnectorConfig; -import io.debezium.connector.yb.postgresql.data.Ltree; +import io.debezium.connector.postgresql.data.Ltree; import io.debezium.data.Envelope; import io.debezium.schema.SchemaFactory; import io.debezium.schema.SchemaNameAdjuster; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSignalBasedIncrementalSnapshotChangeEventSource.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSignalBasedIncrementalSnapshotChangeEventSource.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSignalBasedIncrementalSnapshotChangeEventSource.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSignalBasedIncrementalSnapshotChangeEventSource.java index ef9ff136dac..4fe5363c080 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSignalBasedIncrementalSnapshotChangeEventSource.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSignalBasedIncrementalSnapshotChangeEventSource.java @@ -3,14 +3,14 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.sql.SQLException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection; +import io.debezium.connector.postgresql.connection.PostgresConnection; import io.debezium.jdbc.JdbcConnection; import io.debezium.pipeline.EventDispatcher; import io.debezium.pipeline.notification.NotificationService; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSnapshotChangeEventSource.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSnapshotChangeEventSource.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSnapshotChangeEventSource.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSnapshotChangeEventSource.java index e28208da4e8..ed247de8cbe 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSnapshotChangeEventSource.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSnapshotChangeEventSource.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.sql.SQLException; import java.time.Duration; @@ -14,16 +14,17 @@ import java.util.Set; import java.util.stream.Collectors; -import io.debezium.connector.yb.postgresql.spi.Snapshotter; import io.debezium.pipeline.spi.ChangeRecordEmitter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.yb.postgresql.connection.Lsn; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection; -import io.debezium.connector.yb.postgresql.snapshot.AlwaysSnapshotter; -import io.debezium.connector.yb.postgresql.spi.SlotCreationResult; -import io.debezium.connector.yb.postgresql.spi.SlotState; +import io.debezium.connector.postgresql.PostgresOffsetContext.Loader; +import io.debezium.connector.postgresql.connection.Lsn; +import io.debezium.connector.postgresql.connection.PostgresConnection; +import io.debezium.connector.postgresql.snapshot.AlwaysSnapshotter; +import io.debezium.connector.postgresql.spi.SlotCreationResult; +import io.debezium.connector.postgresql.spi.SlotState; +import io.debezium.connector.postgresql.spi.Snapshotter; import io.debezium.jdbc.MainConnectionProvidingConnectionFactory; import io.debezium.pipeline.EventDispatcher; import io.debezium.pipeline.notification.NotificationService; @@ -306,6 +307,6 @@ private static class PostgresSnapshotContext extends RelationalSnapshotContext

snapshotContext) { - return new PostgresOffsetContext.Loader(connectorConfig).load(snapshotContext.offset.getOffset()); + return new Loader(connectorConfig).load(snapshotContext.offset.getOffset()); } } diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSourceInfoStructMaker.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSourceInfoStructMaker.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSourceInfoStructMaker.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSourceInfoStructMaker.java index cadfe19d109..1f75eecd5fd 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresSourceInfoStructMaker.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSourceInfoStructMaker.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import org.apache.kafka.connect.data.Schema; import org.apache.kafka.connect.data.Struct; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresStreamingChangeEventSource.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresStreamingChangeEventSource.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresStreamingChangeEventSource.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresStreamingChangeEventSource.java index 36f55c6de20..60897163b14 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresStreamingChangeEventSource.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresStreamingChangeEventSource.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.sql.SQLException; import java.util.Map; @@ -11,22 +11,23 @@ import java.util.OptionalLong; import java.util.concurrent.atomic.AtomicReference; -import io.debezium.connector.yb.postgresql.spi.Snapshotter; +import io.debezium.connector.postgresql.connection.*; import org.apache.kafka.connect.errors.ConnectException; import com.yugabyte.core.BaseConnection; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import io.debezium.DebeziumException; -import io.debezium.connector.yb.postgresql.connection.LogicalDecodingMessage; -import io.debezium.connector.yb.postgresql.connection.Lsn; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection; -import io.debezium.connector.yb.postgresql.connection.PostgresReplicationConnection; -import io.debezium.connector.yb.postgresql.connection.ReplicationConnection; -import io.debezium.connector.yb.postgresql.connection.ReplicationMessage; -import io.debezium.connector.yb.postgresql.connection.ReplicationMessage.Operation; -import io.debezium.connector.yb.postgresql.connection.ReplicationStream; -import io.debezium.connector.yb.postgresql.connection.WalPositionLocator; +import io.debezium.connector.postgresql.connection.LogicalDecodingMessage; +import io.debezium.connector.postgresql.connection.Lsn; +import io.debezium.connector.postgresql.connection.PostgresConnection; +import io.debezium.connector.postgresql.connection.PostgresReplicationConnection; +import io.debezium.connector.postgresql.connection.ReplicationConnection; +import io.debezium.connector.postgresql.connection.ReplicationMessage; +import io.debezium.connector.postgresql.connection.ReplicationMessage.Operation; +import io.debezium.connector.postgresql.connection.ReplicationStream; +import io.debezium.connector.postgresql.connection.WalPositionLocator; +import io.debezium.connector.postgresql.spi.Snapshotter; import io.debezium.heartbeat.Heartbeat; import io.debezium.pipeline.ErrorHandler; import io.debezium.pipeline.source.spi.StreamingChangeEventSource; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresTaskContext.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresTaskContext.java similarity index 95% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresTaskContext.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresTaskContext.java index da4ae28568d..f9b1f711202 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresTaskContext.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresTaskContext.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.sql.SQLException; import java.util.Collections; @@ -14,9 +14,9 @@ import io.debezium.annotation.ThreadSafe; import io.debezium.connector.common.CdcSourceTaskContext; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection; -import io.debezium.connector.yb.postgresql.connection.ReplicationConnection; -import io.debezium.connector.yb.postgresql.spi.SlotState; +import io.debezium.connector.postgresql.connection.PostgresConnection; +import io.debezium.connector.postgresql.connection.ReplicationConnection; +import io.debezium.connector.postgresql.spi.SlotState; import io.debezium.relational.TableId; import io.debezium.spi.topic.TopicNamingStrategy; import io.debezium.util.Clock; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresTopicSelector.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresTopicSelector.java similarity index 94% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresTopicSelector.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresTopicSelector.java index 2e8945ca9c1..3222691e409 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresTopicSelector.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresTopicSelector.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import io.debezium.relational.TableId; import io.debezium.schema.TopicSelector; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresType.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresType.java similarity index 99% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresType.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresType.java index 5081e68d71e..2a7f3155350 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresType.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresType.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.util.List; import java.util.Objects; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresValueConverter.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresValueConverter.java similarity index 99% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresValueConverter.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresValueConverter.java index e2e975b7b96..29da417c526 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/PostgresValueConverter.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresValueConverter.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import static java.time.ZoneId.systemDefault; @@ -52,9 +52,9 @@ import com.fasterxml.jackson.core.JsonGenerator; import io.debezium.config.CommonConnectorConfig.BinaryHandlingMode; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.HStoreHandlingMode; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.IntervalHandlingMode; -import io.debezium.connector.yb.postgresql.data.Ltree; +import io.debezium.connector.postgresql.PostgresConnectorConfig.HStoreHandlingMode; +import io.debezium.connector.postgresql.PostgresConnectorConfig.IntervalHandlingMode; +import io.debezium.connector.postgresql.data.Ltree; import io.debezium.connector.postgresql.proto.PgProto; import io.debezium.data.Bits; import io.debezium.data.Json; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/RecordsProducer.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/RecordsProducer.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/RecordsProducer.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/RecordsProducer.java index 98260ef5195..b5a845a594f 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/RecordsProducer.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/RecordsProducer.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.util.function.Consumer; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/ReplicaIdentityMapper.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/ReplicaIdentityMapper.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/ReplicaIdentityMapper.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/ReplicaIdentityMapper.java index e35122d2f7f..0f7ab45e540 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/ReplicaIdentityMapper.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/ReplicaIdentityMapper.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.util.Arrays; import java.util.Collections; @@ -16,7 +16,7 @@ import io.debezium.DebeziumException; import io.debezium.annotation.Immutable; -import io.debezium.connector.yb.postgresql.connection.ReplicaIdentityInfo; +import io.debezium.connector.postgresql.connection.ReplicaIdentityInfo; import io.debezium.function.Predicates; import io.debezium.relational.TableId; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/SourceInfo.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/SourceInfo.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/SourceInfo.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/SourceInfo.java index 4c96c343b3f..0b07b3d24de 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/SourceInfo.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/SourceInfo.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.time.Instant; import java.util.ArrayList; @@ -15,8 +15,8 @@ import io.debezium.annotation.NotThreadSafe; import io.debezium.connector.common.BaseSourceInfo; -import io.debezium.connector.yb.postgresql.connection.Lsn; -import io.debezium.connector.yb.postgresql.connection.ReplicationMessage.Operation; +import io.debezium.connector.postgresql.connection.Lsn; +import io.debezium.connector.postgresql.connection.ReplicationMessage.Operation; import io.debezium.relational.TableId; /** diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/TypeRegistry.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/TypeRegistry.java similarity index 99% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/TypeRegistry.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/TypeRegistry.java index 283b805b675..45c31abfe19 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/TypeRegistry.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/TypeRegistry.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.sql.PreparedStatement; import java.sql.ResultSet; @@ -18,7 +18,6 @@ import java.util.Map; import java.util.Set; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection; import org.apache.kafka.connect.errors.ConnectException; import com.yugabyte.core.BaseConnection; import com.yugabyte.core.TypeInfo; @@ -28,6 +27,7 @@ import io.debezium.DebeziumException; import io.debezium.annotation.Immutable; +import io.debezium.connector.postgresql.connection.PostgresConnection; import io.debezium.util.Collect; /** diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/UnchangedToastedPlaceholder.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/UnchangedToastedPlaceholder.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/UnchangedToastedPlaceholder.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/UnchangedToastedPlaceholder.java index 5a0c5f29580..a3d8baafd7c 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/UnchangedToastedPlaceholder.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/UnchangedToastedPlaceholder.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.util.ArrayList; import java.util.Arrays; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/UnchangedToastedReplicationMessageColumn.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/UnchangedToastedReplicationMessageColumn.java similarity index 93% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/UnchangedToastedReplicationMessageColumn.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/UnchangedToastedReplicationMessageColumn.java index ab3eba2c027..49297e29023 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/UnchangedToastedReplicationMessageColumn.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/UnchangedToastedReplicationMessageColumn.java @@ -3,22 +3,20 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.util.Arrays; import java.util.HashSet; import java.util.Set; -import io.debezium.connector.yb.postgresql.connection.AbstractReplicationMessageColumn; -import io.debezium.connector.yb.postgresql.connection.ReplicationMessage; -import io.debezium.connector.yb.postgresql.connection.ReplicationStream; +import io.debezium.connector.postgresql.connection.AbstractReplicationMessageColumn; /** - * Represents a toasted column in a {@link ReplicationStream}. + * Represents a toasted column in a {@link io.debezium.connector.postgresql.connection.ReplicationStream}. * * Some decoder implementations may stream information about a column but provide an indicator that the field was not * changed and therefore toasted. This implementation acts as an indicator for such fields that are contained within - * a {@link ReplicationMessage}. + * a {@link io.debezium.connector.postgresql.connection.ReplicationMessage}. * * @author Chris Cranford */ diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/YBHeartbeatImpl.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YBHeartbeatImpl.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/YBHeartbeatImpl.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YBHeartbeatImpl.java index 52ce359cc38..dd87850c9fc 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/YBHeartbeatImpl.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YBHeartbeatImpl.java @@ -1,4 +1,4 @@ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import io.debezium.function.BlockingConsumer; import io.debezium.heartbeat.HeartbeatImpl; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/YBSnapshotChangeRecordEmitter.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YBSnapshotChangeRecordEmitter.java similarity index 89% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/YBSnapshotChangeRecordEmitter.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YBSnapshotChangeRecordEmitter.java index a51c6f9a599..0c339a08354 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/YBSnapshotChangeRecordEmitter.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YBSnapshotChangeRecordEmitter.java @@ -1,8 +1,10 @@ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; +import io.debezium.connector.postgresql.connection.ReplicaIdentityInfo; import io.debezium.data.Envelope; import io.debezium.pipeline.spi.OffsetContext; import io.debezium.relational.RelationalChangeRecordEmitter; +import io.debezium.relational.RelationalDatabaseConnectorConfig; import io.debezium.util.Clock; /** diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/YugabyteDBServer.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YugabyteDBServer.java similarity index 85% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/YugabyteDBServer.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YugabyteDBServer.java index 399b3940dd5..dcaa291f54e 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/YugabyteDBServer.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YugabyteDBServer.java @@ -1,4 +1,4 @@ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; /** * Helper class to add server related methods to aid in code execution for YugabyteDB specific flow. diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractColumnValue.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/AbstractColumnValue.java similarity index 93% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractColumnValue.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/AbstractColumnValue.java index 8c6242b7747..576f1bc713f 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractColumnValue.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/AbstractColumnValue.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection; +package io.debezium.connector.postgresql.connection; import java.math.BigDecimal; import java.sql.SQLException; @@ -13,10 +13,6 @@ import java.time.OffsetTime; import java.time.ZoneOffset; -import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; -import io.debezium.connector.yb.postgresql.PostgresType; -import io.debezium.connector.yb.postgresql.PostgresValueConverter; -import io.debezium.connector.yb.postgresql.TypeRegistry; import org.apache.kafka.connect.errors.ConnectException; import com.yugabyte.geometric.PGbox; import com.yugabyte.geometric.PGcircle; @@ -31,6 +27,11 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; +import io.debezium.connector.postgresql.PostgresType; +import io.debezium.connector.postgresql.PostgresValueConverter; +import io.debezium.connector.postgresql.TypeRegistry; + /** * @author Chris Cranford */ @@ -189,7 +190,7 @@ public boolean isArray(PostgresType type) { } @Override - public Object asArray(String columnName, PostgresType type, String fullType, PostgresStreamingChangeEventSource.PgConnectionSupplier connection) { + public Object asArray(String columnName, PostgresType type, String fullType, PgConnectionSupplier connection) { try { final String dataString = asString(); return new PgArray(connection.get(), type.getOid(), dataString); @@ -202,7 +203,7 @@ public Object asArray(String columnName, PostgresType type, String fullType, Pos @Override public Object asDefault(TypeRegistry typeRegistry, int columnType, String columnName, String fullType, boolean includeUnknownDatatypes, - PostgresStreamingChangeEventSource.PgConnectionSupplier connection) { + PgConnectionSupplier connection) { if (includeUnknownDatatypes) { // this includes things like PostGIS geoemetries or other custom types // leave up to the downstream message recipient to deal with diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractMessageDecoder.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/AbstractMessageDecoder.java similarity index 84% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractMessageDecoder.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/AbstractMessageDecoder.java index abb9d139c25..1813b1ba982 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractMessageDecoder.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/AbstractMessageDecoder.java @@ -3,16 +3,17 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection; +package io.debezium.connector.postgresql.connection; import java.nio.ByteBuffer; import java.sql.SQLException; import java.time.Duration; -import io.debezium.connector.yb.postgresql.TypeRegistry; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import io.debezium.connector.postgresql.TypeRegistry; +import io.debezium.connector.postgresql.connection.ReplicationStream.ReplicationMessageProcessor; import io.debezium.util.Clock; import io.debezium.util.Threads; import io.debezium.util.Threads.Timer; @@ -31,7 +32,7 @@ public abstract class AbstractMessageDecoder implements MessageDecoder { private Timer timer = null; @Override - public void processMessage(ByteBuffer buffer, ReplicationStream.ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException { + public void processMessage(ByteBuffer buffer, ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException { // if message is empty pass control right to ReplicationMessageProcessor to update WAL position info if (buffer == null) { processor.process(null); @@ -41,7 +42,7 @@ public void processMessage(ByteBuffer buffer, ReplicationStream.ReplicationMessa } } - protected abstract void processNotEmptyMessage(ByteBuffer buffer, ReplicationStream.ReplicationMessageProcessor processor, TypeRegistry typeRegistry) + protected abstract void processNotEmptyMessage(ByteBuffer buffer, ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException; @Override diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractReplicationMessageColumn.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/AbstractReplicationMessageColumn.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractReplicationMessageColumn.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/AbstractReplicationMessageColumn.java index dd094f36081..5498bf4a713 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/AbstractReplicationMessageColumn.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/AbstractReplicationMessageColumn.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection; +package io.debezium.connector.postgresql.connection; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -12,7 +12,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.yb.postgresql.PostgresType; +import io.debezium.connector.postgresql.PostgresType; /** * Extracts type information from replication messages and associates them with each column. diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/DateTimeFormat.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/DateTimeFormat.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/DateTimeFormat.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/DateTimeFormat.java index a90b7d56b9e..e766002c68e 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/DateTimeFormat.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/DateTimeFormat.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection; +package io.debezium.connector.postgresql.connection; import java.time.Instant; import java.time.LocalDate; @@ -21,11 +21,12 @@ import java.time.temporal.TemporalAccessor; import java.util.function.Supplier; -import io.debezium.connector.yb.postgresql.PostgresValueConverter; import org.apache.kafka.connect.errors.ConnectException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import io.debezium.connector.postgresql.PostgresValueConverter; + /** * Transformer for time/date related string representations in replication messages. * diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/LogicalDecodingMessage.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/LogicalDecodingMessage.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/LogicalDecodingMessage.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/LogicalDecodingMessage.java index 641d8114299..b450ee3bbae 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/LogicalDecodingMessage.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/LogicalDecodingMessage.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection; +package io.debezium.connector.postgresql.connection; import java.time.Instant; import java.util.List; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/Lsn.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/Lsn.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/Lsn.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/Lsn.java index a879b94a54a..b9f4b7dc8fe 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/Lsn.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/Lsn.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection; +package io.debezium.connector.postgresql.connection; import java.nio.ByteBuffer; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/MessageDecoder.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/MessageDecoder.java similarity index 85% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/MessageDecoder.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/MessageDecoder.java index aec6462570a..8406c9b3ab7 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/MessageDecoder.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/MessageDecoder.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection; +package io.debezium.connector.postgresql.connection; import java.nio.ByteBuffer; import java.sql.SQLException; @@ -12,7 +12,8 @@ import com.yugabyte.replication.fluent.logical.ChainedLogicalStreamBuilder; -import io.debezium.connector.yb.postgresql.TypeRegistry; +import io.debezium.connector.postgresql.TypeRegistry; +import io.debezium.connector.postgresql.connection.ReplicationStream.ReplicationMessageProcessor; /** * A class that is able to deserialize/decode binary representation of a batch of replication messages generated by @@ -30,7 +31,7 @@ public interface MessageDecoder { * @param processor - message processing on arrival * @param typeRegistry - registry with known types */ - void processMessage(ByteBuffer buffer, ReplicationStream.ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException; + void processMessage(ByteBuffer buffer, ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException; /** * Allows MessageDecoder to configure options with which the replication stream is started. diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/MessageDecoderContext.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/MessageDecoderContext.java similarity index 78% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/MessageDecoderContext.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/MessageDecoderContext.java index c092e7ee9db..f79093d4a11 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/MessageDecoderContext.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/MessageDecoderContext.java @@ -3,10 +3,10 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection; +package io.debezium.connector.postgresql.connection; -import io.debezium.connector.yb.postgresql.PostgresSchema; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; +import io.debezium.connector.postgresql.PostgresConnectorConfig; +import io.debezium.connector.postgresql.PostgresSchema; /** * Contextual data required by {@link MessageDecoder}s. diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/PostgresConnection.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/PostgresConnection.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/PostgresConnection.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/PostgresConnection.java index c49b33d0272..822b8ab4d7c 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/PostgresConnection.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/PostgresConnection.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection; +package io.debezium.connector.postgresql.connection; import java.nio.charset.Charset; import java.sql.DatabaseMetaData; @@ -21,12 +21,9 @@ import java.util.concurrent.atomic.AtomicLong; import java.util.regex.Pattern; -import io.debezium.connector.yb.postgresql.PgOid; -import io.debezium.connector.yb.postgresql.PostgresType; -import io.debezium.connector.yb.postgresql.PostgresValueConverter; -import io.debezium.connector.yb.postgresql.YugabyteDBServer; import org.apache.kafka.connect.errors.ConnectException; import com.yugabyte.core.BaseConnection; +import com.yugabyte.jdbc.PgConnection; import com.yugabyte.jdbc.TimestampUtils; import com.yugabyte.replication.LogSequenceNumber; import com.yugabyte.util.PGmoney; @@ -37,9 +34,13 @@ import io.debezium.DebeziumException; import io.debezium.annotation.VisibleForTesting; import io.debezium.config.Configuration; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; -import io.debezium.connector.yb.postgresql.TypeRegistry; -import io.debezium.connector.yb.postgresql.spi.SlotState; +import io.debezium.connector.postgresql.PgOid; +import io.debezium.connector.postgresql.PostgresConnectorConfig; +import io.debezium.connector.postgresql.PostgresType; +import io.debezium.connector.postgresql.PostgresValueConverter; +import io.debezium.connector.postgresql.TypeRegistry; +import io.debezium.connector.postgresql.YugabyteDBServer; +import io.debezium.connector.postgresql.spi.SlotState; import io.debezium.data.SpecialValueDecimal; import io.debezium.jdbc.JdbcConfiguration; import io.debezium.jdbc.JdbcConnection; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/PostgresDefaultValueConverter.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/PostgresDefaultValueConverter.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/PostgresDefaultValueConverter.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/PostgresDefaultValueConverter.java index 6729a6b7f22..78a801786d6 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/PostgresDefaultValueConverter.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/PostgresDefaultValueConverter.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection; +package io.debezium.connector.postgresql.connection; import java.math.BigDecimal; import java.math.RoundingMode; @@ -17,8 +17,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import io.debezium.connector.yb.postgresql.PostgresType; -import io.debezium.connector.yb.postgresql.PostgresValueConverter; import org.apache.kafka.connect.data.Field; import org.apache.kafka.connect.data.Schema; import org.apache.kafka.connect.data.SchemaBuilder; @@ -29,7 +27,9 @@ import org.slf4j.LoggerFactory; import io.debezium.annotation.ThreadSafe; -import io.debezium.connector.yb.postgresql.TypeRegistry; +import io.debezium.connector.postgresql.PostgresType; +import io.debezium.connector.postgresql.PostgresValueConverter; +import io.debezium.connector.postgresql.TypeRegistry; import io.debezium.relational.Column; import io.debezium.relational.DefaultValueConverter; import io.debezium.relational.ValueConverter; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/PostgresReplicationConnection.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/PostgresReplicationConnection.java similarity index 99% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/PostgresReplicationConnection.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/PostgresReplicationConnection.java index a695e5db1ed..a95d46c239d 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/PostgresReplicationConnection.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/PostgresReplicationConnection.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection; +package io.debezium.connector.postgresql.connection; import static java.lang.Math.toIntExact; @@ -27,8 +27,6 @@ import java.util.function.Function; import java.util.stream.Collectors; -import io.debezium.connector.yb.postgresql.PostgresSchema; -import io.debezium.connector.yb.postgresql.ReplicaIdentityMapper; import org.apache.kafka.connect.errors.ConnectException; import com.yugabyte.core.BaseConnection; import com.yugabyte.core.ServerVersion; @@ -40,9 +38,11 @@ import org.slf4j.LoggerFactory; import io.debezium.DebeziumException; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; -import io.debezium.connector.yb.postgresql.TypeRegistry; -import io.debezium.connector.yb.postgresql.spi.SlotCreationResult; +import io.debezium.connector.postgresql.PostgresConnectorConfig; +import io.debezium.connector.postgresql.PostgresSchema; +import io.debezium.connector.postgresql.ReplicaIdentityMapper; +import io.debezium.connector.postgresql.TypeRegistry; +import io.debezium.connector.postgresql.spi.SlotCreationResult; import io.debezium.jdbc.JdbcConfiguration; import io.debezium.jdbc.JdbcConnection; import io.debezium.jdbc.JdbcConnectionException; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicaIdentityInfo.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicaIdentityInfo.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicaIdentityInfo.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicaIdentityInfo.java index 3caec718e17..db8e4cf10da 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicaIdentityInfo.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicaIdentityInfo.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection; +package io.debezium.connector.postgresql.connection; /** * Class to encapsulate {@link ReplicaIdentityInfo.ReplicaIdentity} enumerator, adding the name of the index diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationConnection.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicationConnection.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationConnection.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicationConnection.java index 86538bfe87e..d4fa5460b0e 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationConnection.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicationConnection.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection; +package io.debezium.connector.postgresql.connection; import java.sql.SQLException; import java.time.Duration; @@ -13,10 +13,10 @@ import com.yugabyte.replication.PGReplicationStream; import io.debezium.annotation.NotThreadSafe; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; -import io.debezium.connector.yb.postgresql.PostgresSchema; -import io.debezium.connector.yb.postgresql.TypeRegistry; -import io.debezium.connector.yb.postgresql.spi.SlotCreationResult; +import io.debezium.connector.postgresql.PostgresConnectorConfig; +import io.debezium.connector.postgresql.PostgresSchema; +import io.debezium.connector.postgresql.TypeRegistry; +import io.debezium.connector.postgresql.spi.SlotCreationResult; import io.debezium.relational.RelationalTableFilters; /** diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessage.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicationMessage.java similarity index 90% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessage.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicationMessage.java index ecc98361f03..c0a951a8622 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessage.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicationMessage.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection; +package io.debezium.connector.postgresql.connection; import java.time.Instant; import java.time.LocalDate; @@ -20,9 +20,10 @@ import com.yugabyte.geometric.PGpoint; import com.yugabyte.geometric.PGpolygon; -import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; -import io.debezium.connector.yb.postgresql.PostgresType; -import io.debezium.connector.yb.postgresql.TypeRegistry; +import io.debezium.connector.postgresql.PostgresStreamingChangeEventSource; +import io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; +import io.debezium.connector.postgresql.PostgresType; +import io.debezium.connector.postgresql.TypeRegistry; /** * An abstract representation of a replication message that is sent by a PostgreSQL logical decoding plugin and @@ -62,7 +63,7 @@ interface Column { */ ColumnTypeMetadata getTypeMetadata(); - Object getValue(PostgresStreamingChangeEventSource.PgConnectionSupplier connection, boolean includeUnknownDatatypes); + Object getValue(PgConnectionSupplier connection, boolean includeUnknownDatatypes); boolean isOptional(); @@ -130,9 +131,9 @@ interface ColumnValue { boolean isArray(PostgresType type); - Object asArray(String columnName, PostgresType type, String fullType, PostgresStreamingChangeEventSource.PgConnectionSupplier connection); + Object asArray(String columnName, PostgresType type, String fullType, PgConnectionSupplier connection); - Object asDefault(TypeRegistry typeRegistry, int columnType, String columnName, String fullType, boolean includeUnknownDatatypes, PostgresStreamingChangeEventSource.PgConnectionSupplier connection); + Object asDefault(TypeRegistry typeRegistry, int columnType, String columnName, String fullType, boolean includeUnknownDatatypes, PgConnectionSupplier connection); } /** diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessageColumnValueResolver.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicationMessageColumnValueResolver.java similarity index 92% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessageColumnValueResolver.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicationMessageColumnValueResolver.java index 5338a511c14..8dc814e29b8 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationMessageColumnValueResolver.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicationMessageColumnValueResolver.java @@ -3,15 +3,15 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection; +package io.debezium.connector.postgresql.connection; -import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; -import io.debezium.connector.yb.postgresql.PostgresType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.yb.postgresql.TypeRegistry; -import io.debezium.connector.yb.postgresql.connection.ReplicationMessage.ColumnValue; +import io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; +import io.debezium.connector.postgresql.PostgresType; +import io.debezium.connector.postgresql.TypeRegistry; +import io.debezium.connector.postgresql.connection.ReplicationMessage.ColumnValue; /** * @author Chris Cranford @@ -32,7 +32,7 @@ public class ReplicationMessageColumnValueResolver { * @param typeRegistry the postgres type registry * @return */ - public static Object resolveValue(String columnName, PostgresType type, String fullType, ColumnValue value, final PostgresStreamingChangeEventSource.PgConnectionSupplier connection, + public static Object resolveValue(String columnName, PostgresType type, String fullType, ColumnValue value, final PgConnectionSupplier connection, boolean includeUnknownDatatypes, TypeRegistry typeRegistry) { if (value.isNull()) { // nulls are null diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationStream.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicationStream.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationStream.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicationStream.java index 2efa32e5995..beaa90c8c7d 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ReplicationStream.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ReplicationStream.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection; +package io.debezium.connector.postgresql.connection; import java.sql.SQLException; import java.util.concurrent.ExecutorService; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ServerInfo.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ServerInfo.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ServerInfo.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ServerInfo.java index 57a92e77971..ff1afe99ae5 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/ServerInfo.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/ServerInfo.java @@ -4,13 +4,13 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection; +package io.debezium.connector.postgresql.connection; import java.util.HashMap; import java.util.Map; import java.util.stream.Collectors; -import io.debezium.connector.yb.postgresql.spi.SlotState; +import io.debezium.connector.postgresql.spi.SlotState; /** * Information about a running Postgres instance. diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/TransactionMessage.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/TransactionMessage.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/TransactionMessage.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/TransactionMessage.java index 7e4468b99d8..9ff93f99e23 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/TransactionMessage.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/TransactionMessage.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection; +package io.debezium.connector.postgresql.connection; import java.time.Instant; import java.util.List; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/WalPositionLocator.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/WalPositionLocator.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/WalPositionLocator.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/WalPositionLocator.java index 097cad33786..9d9cb4fa6f7 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/WalPositionLocator.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/WalPositionLocator.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection; +package io.debezium.connector.postgresql.connection; import java.util.HashSet; import java.util.Optional; @@ -13,6 +13,7 @@ import org.slf4j.LoggerFactory; import io.debezium.DebeziumException; +import io.debezium.connector.postgresql.connection.ReplicationMessage.Operation; /** * This class is responsible for finding out a LSN from which Debezium should @@ -30,7 +31,7 @@ public class WalPositionLocator { private final Lsn lastCommitStoredLsn; private final Lsn lastEventStoredLsn; - private final ReplicationMessage.Operation lastProcessedMessageType; + private final Operation lastProcessedMessageType; private Lsn txStartLsn = null; private Lsn lsnAfterLastEventStoredLsn = null; private Lsn firstLsnReceived = null; @@ -39,7 +40,7 @@ public class WalPositionLocator { private boolean storeLsnAfterLastEventStoredLsn = false; private Set lsnSeen = new HashSet<>(1_000); - public WalPositionLocator(Lsn lastCommitStoredLsn, Lsn lastEventStoredLsn, ReplicationMessage.Operation lastProcessedMessageType) { + public WalPositionLocator(Lsn lastCommitStoredLsn, Lsn lastEventStoredLsn, Operation lastProcessedMessageType) { this.lastCommitStoredLsn = lastCommitStoredLsn; this.lastEventStoredLsn = lastEventStoredLsn; this.lastProcessedMessageType = lastProcessedMessageType; @@ -75,7 +76,7 @@ public Optional resumeFromLsn(Lsn currentLsn, ReplicationMessage message) { if (currentLsn.equals(lastEventStoredLsn)) { // BEGIN and first message after change have the same LSN if (txStartLsn != null - && (lastProcessedMessageType == null || lastProcessedMessageType == ReplicationMessage.Operation.BEGIN || lastProcessedMessageType == ReplicationMessage.Operation.COMMIT)) { + && (lastProcessedMessageType == null || lastProcessedMessageType == Operation.BEGIN || lastProcessedMessageType == Operation.COMMIT)) { // start from the BEGIN tx; prevent skipping of unprocessed event after BEGIN or previous tx COMMIT LOGGER.info("Will restart from LSN '{}' corresponding to the event following the BEGIN event", txStartLsn); startStreamingLsn = txStartLsn; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/ColumnMetaData.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/ColumnMetaData.java similarity index 95% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/ColumnMetaData.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/ColumnMetaData.java index f40dccab52d..62615cf4d5b 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/ColumnMetaData.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/ColumnMetaData.java @@ -3,11 +3,11 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection.pgoutput; +package io.debezium.connector.postgresql.connection.pgoutput; import io.debezium.annotation.Immutable; -import io.debezium.connector.yb.postgresql.PostgresType; -import io.debezium.connector.yb.postgresql.TypeRegistry; +import io.debezium.connector.postgresql.PostgresType; +import io.debezium.connector.postgresql.TypeRegistry; /** * Defines the relational column mapping for a table. diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputColumnValue.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputColumnValue.java similarity index 87% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputColumnValue.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputColumnValue.java index 44321e5bba4..d424b83bc65 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputColumnValue.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputColumnValue.java @@ -3,12 +3,12 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection.pgoutput; +package io.debezium.connector.postgresql.connection.pgoutput; import java.math.BigDecimal; -import io.debezium.connector.yb.postgresql.PostgresValueConverter; -import io.debezium.connector.yb.postgresql.connection.AbstractColumnValue; +import io.debezium.connector.postgresql.PostgresValueConverter; +import io.debezium.connector.postgresql.connection.AbstractColumnValue; import io.debezium.data.SpecialValueDecimal; import io.debezium.util.Strings; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputMessageDecoder.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputMessageDecoder.java similarity index 95% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputMessageDecoder.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputMessageDecoder.java index b51690a96b4..cad9fe02b00 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputMessageDecoder.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputMessageDecoder.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection.pgoutput; +package io.debezium.connector.postgresql.connection.pgoutput; import static java.util.stream.Collectors.toMap; @@ -27,26 +27,26 @@ import java.util.function.Function; import com.yugabyte.replication.fluent.logical.ChainedLogicalStreamBuilder; -import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; -import io.debezium.connector.yb.postgresql.UnchangedToastedReplicationMessageColumn; -import io.debezium.connector.yb.postgresql.YugabyteDBServer; -import io.debezium.connector.yb.postgresql.connection.AbstractReplicationMessageColumn; -import io.debezium.connector.yb.postgresql.connection.TransactionMessage; +import io.debezium.connector.postgresql.YugabyteDBServer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.yb.postgresql.PostgresType; -import io.debezium.connector.yb.postgresql.TypeRegistry; -import io.debezium.connector.yb.postgresql.connection.AbstractMessageDecoder; -import io.debezium.connector.yb.postgresql.connection.LogicalDecodingMessage; -import io.debezium.connector.yb.postgresql.connection.Lsn; -import io.debezium.connector.yb.postgresql.connection.MessageDecoderContext; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection; -import io.debezium.connector.yb.postgresql.connection.ReplicationMessage.Column; -import io.debezium.connector.yb.postgresql.connection.ReplicationMessage.NoopMessage; -import io.debezium.connector.yb.postgresql.connection.ReplicationMessage.Operation; -import io.debezium.connector.yb.postgresql.connection.ReplicationStream.ReplicationMessageProcessor; -import io.debezium.connector.yb.postgresql.connection.WalPositionLocator; +import io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; +import io.debezium.connector.postgresql.PostgresType; +import io.debezium.connector.postgresql.TypeRegistry; +import io.debezium.connector.postgresql.UnchangedToastedReplicationMessageColumn; +import io.debezium.connector.postgresql.connection.AbstractMessageDecoder; +import io.debezium.connector.postgresql.connection.AbstractReplicationMessageColumn; +import io.debezium.connector.postgresql.connection.LogicalDecodingMessage; +import io.debezium.connector.postgresql.connection.Lsn; +import io.debezium.connector.postgresql.connection.MessageDecoderContext; +import io.debezium.connector.postgresql.connection.PostgresConnection; +import io.debezium.connector.postgresql.connection.ReplicationMessage.Column; +import io.debezium.connector.postgresql.connection.ReplicationMessage.NoopMessage; +import io.debezium.connector.postgresql.connection.ReplicationMessage.Operation; +import io.debezium.connector.postgresql.connection.ReplicationStream.ReplicationMessageProcessor; +import io.debezium.connector.postgresql.connection.TransactionMessage; +import io.debezium.connector.postgresql.connection.WalPositionLocator; import io.debezium.data.Envelope; import io.debezium.relational.ColumnEditor; import io.debezium.relational.Table; @@ -749,7 +749,7 @@ private static List resolveColumnsFromStreamTupleData(ByteBuffer buffer, final String valueStr = readColumnValueAsString(buffer); replicationMessageColumn = new AbstractReplicationMessageColumn(columnName, columnType, typeExpression, optional) { @Override - public Object getValue(PostgresStreamingChangeEventSource.PgConnectionSupplier connection, boolean includeUnknownDatatypes) { + public Object getValue(PgConnectionSupplier connection, boolean includeUnknownDatatypes) { return PgOutputReplicationMessage.getValue(columnName, columnType, typeExpression, valueStr, connection, includeUnknownDatatypes, typeRegistry); } @@ -771,7 +771,7 @@ public String toString() { else if (type == 'n') { replicationMessageColumn = new AbstractReplicationMessageColumn(columnName, columnType, typeExpression, true) { @Override - public Object getValue(PostgresStreamingChangeEventSource.PgConnectionSupplier connection, boolean includeUnknownDatatypes) { + public Object getValue(PgConnectionSupplier connection, boolean includeUnknownDatatypes) { return null; } }; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputRelationMetaData.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputRelationMetaData.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputRelationMetaData.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputRelationMetaData.java index 2b5f04a82c9..86709dad24f 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputRelationMetaData.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputRelationMetaData.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection.pgoutput; +package io.debezium.connector.postgresql.connection.pgoutput; import java.util.List; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputReplicationMessage.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputReplicationMessage.java similarity index 82% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputReplicationMessage.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputReplicationMessage.java index dada83595c7..fd7f80e1b5a 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputReplicationMessage.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputReplicationMessage.java @@ -3,17 +3,17 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection.pgoutput; +package io.debezium.connector.postgresql.connection.pgoutput; import java.time.Instant; import java.util.List; import java.util.OptionalLong; -import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; -import io.debezium.connector.yb.postgresql.PostgresType; -import io.debezium.connector.yb.postgresql.TypeRegistry; -import io.debezium.connector.yb.postgresql.connection.ReplicationMessage; -import io.debezium.connector.yb.postgresql.connection.ReplicationMessageColumnValueResolver; +import io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; +import io.debezium.connector.postgresql.PostgresType; +import io.debezium.connector.postgresql.TypeRegistry; +import io.debezium.connector.postgresql.connection.ReplicationMessage; +import io.debezium.connector.postgresql.connection.ReplicationMessageColumnValueResolver; /** * @author Gunnar Morling @@ -86,7 +86,7 @@ public boolean shouldSchemaBeSynchronized() { * * @return the value; may be null */ - public static Object getValue(String columnName, PostgresType type, String fullType, String rawValue, final PostgresStreamingChangeEventSource.PgConnectionSupplier connection, + public static Object getValue(String columnName, PostgresType type, String fullType, String rawValue, final PgConnectionSupplier connection, boolean includeUnknownDataTypes, TypeRegistry typeRegistry) { final PgOutputColumnValue columnValue = new PgOutputColumnValue(rawValue); return ReplicationMessageColumnValueResolver.resolveValue(columnName, type, fullType, columnValue, connection, includeUnknownDataTypes, typeRegistry); diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputTruncateReplicationMessage.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputTruncateReplicationMessage.java similarity index 92% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputTruncateReplicationMessage.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputTruncateReplicationMessage.java index aea15ec4b8b..25980afe4ff 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgoutput/PgOutputTruncateReplicationMessage.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgoutput/PgOutputTruncateReplicationMessage.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection.pgoutput; +package io.debezium.connector.postgresql.connection.pgoutput; import java.time.Instant; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoColumnValue.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgproto/PgProtoColumnValue.java similarity index 94% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoColumnValue.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgproto/PgProtoColumnValue.java index f31f8fa21d5..7710eb5a648 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoColumnValue.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgproto/PgProtoColumnValue.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection.pgproto; +package io.debezium.connector.postgresql.connection.pgproto; import java.math.BigDecimal; import java.nio.charset.Charset; @@ -19,16 +19,16 @@ import com.yugabyte.geometric.PGpoint; import com.yugabyte.jdbc.PgArray; -import io.debezium.connector.yb.postgresql.PgOid; -import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; -import io.debezium.connector.yb.postgresql.PostgresType; -import io.debezium.connector.yb.postgresql.PostgresValueConverter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.yb.postgresql.TypeRegistry; -import io.debezium.connector.yb.postgresql.connection.AbstractColumnValue; -import io.debezium.connector.yb.postgresql.connection.DateTimeFormat; +import io.debezium.connector.postgresql.PgOid; +import io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; +import io.debezium.connector.postgresql.PostgresType; +import io.debezium.connector.postgresql.PostgresValueConverter; +import io.debezium.connector.postgresql.TypeRegistry; +import io.debezium.connector.postgresql.connection.AbstractColumnValue; +import io.debezium.connector.postgresql.connection.DateTimeFormat; import io.debezium.connector.postgresql.proto.PgProto; import io.debezium.data.SpecialValueDecimal; import io.debezium.time.Conversions; @@ -310,7 +310,7 @@ public boolean isArray(PostgresType type) { } @Override - public Object asArray(String columnName, PostgresType type, String fullType, PostgresStreamingChangeEventSource.PgConnectionSupplier connection) { + public Object asArray(String columnName, PostgresType type, String fullType, PgConnectionSupplier connection) { // Currently the logical decoding plugin sends unhandled types as a byte array containing the string // representation (in Postgres) of the array value. // The approach to decode this is sub-optimal but the only way to improve this is to update the plugin. @@ -338,7 +338,7 @@ public Object asArray(String columnName, PostgresType type, String fullType, Pos @Override public Object asDefault(TypeRegistry typeRegistry, int columnType, String columnName, String fullType, boolean includeUnknownDatatypes, - PostgresStreamingChangeEventSource.PgConnectionSupplier connection) { + PgConnectionSupplier connection) { final PostgresType type = typeRegistry.get(columnType); if (type.getOid() == typeRegistry.geometryOid() || type.getOid() == typeRegistry.geographyOid() || diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoMessageDecoder.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgproto/PgProtoMessageDecoder.java similarity index 91% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoMessageDecoder.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgproto/PgProtoMessageDecoder.java index 3808cc0cb1f..d246fe3f86e 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoMessageDecoder.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgproto/PgProtoMessageDecoder.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection.pgproto; +package io.debezium.connector.postgresql.connection.pgproto; import java.nio.ByteBuffer; import java.sql.SQLException; @@ -18,9 +18,9 @@ import com.google.protobuf.InvalidProtocolBufferException; -import io.debezium.connector.yb.postgresql.TypeRegistry; -import io.debezium.connector.yb.postgresql.connection.AbstractMessageDecoder; -import io.debezium.connector.yb.postgresql.connection.ReplicationStream.ReplicationMessageProcessor; +import io.debezium.connector.postgresql.TypeRegistry; +import io.debezium.connector.postgresql.connection.AbstractMessageDecoder; +import io.debezium.connector.postgresql.connection.ReplicationStream.ReplicationMessageProcessor; import io.debezium.connector.postgresql.proto.PgProto; import io.debezium.connector.postgresql.proto.PgProto.Op; import io.debezium.connector.postgresql.proto.PgProto.RowMessage; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoReplicationMessage.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgproto/PgProtoReplicationMessage.java similarity index 85% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoReplicationMessage.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgproto/PgProtoReplicationMessage.java index 6cd1a8197ba..d3f649351df 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/connection/pgproto/PgProtoReplicationMessage.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/pgproto/PgProtoReplicationMessage.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection.pgproto; +package io.debezium.connector.postgresql.connection.pgproto; import java.time.Instant; import java.util.List; @@ -14,13 +14,13 @@ import java.util.stream.IntStream; import io.debezium.DebeziumException; -import io.debezium.connector.yb.postgresql.PostgresStreamingChangeEventSource; -import io.debezium.connector.yb.postgresql.PostgresType; -import io.debezium.connector.yb.postgresql.UnchangedToastedReplicationMessageColumn; -import io.debezium.connector.yb.postgresql.connection.AbstractReplicationMessageColumn; -import io.debezium.connector.yb.postgresql.TypeRegistry; -import io.debezium.connector.yb.postgresql.connection.ReplicationMessage; -import io.debezium.connector.yb.postgresql.connection.ReplicationMessageColumnValueResolver; +import io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.PgConnectionSupplier; +import io.debezium.connector.postgresql.PostgresType; +import io.debezium.connector.postgresql.TypeRegistry; +import io.debezium.connector.postgresql.UnchangedToastedReplicationMessageColumn; +import io.debezium.connector.postgresql.connection.AbstractReplicationMessageColumn; +import io.debezium.connector.postgresql.connection.ReplicationMessage; +import io.debezium.connector.postgresql.connection.ReplicationMessageColumnValueResolver; import io.debezium.connector.postgresql.proto.PgProto; import io.debezium.connector.postgresql.proto.PgProto.Op; import io.debezium.util.Strings; @@ -112,7 +112,7 @@ private List transform(List mes typeInfo.map(PgProto.TypeInfo::getValueOptional).orElse(Boolean.FALSE)) { @Override - public Object getValue(PostgresStreamingChangeEventSource.PgConnectionSupplier connection, boolean includeUnknownDatatypes) { + public Object getValue(PgConnectionSupplier connection, boolean includeUnknownDatatypes) { return PgProtoReplicationMessage.this.getValue(columnName, type, fullType, datum, connection, includeUnknownDatatypes); } @@ -130,7 +130,7 @@ public boolean isLastEventForLsn() { return true; } - public Object getValue(String columnName, PostgresType type, String fullType, PgProto.DatumMessage datumMessage, final PostgresStreamingChangeEventSource.PgConnectionSupplier connection, + public Object getValue(String columnName, PostgresType type, String fullType, PgProto.DatumMessage datumMessage, final PgConnectionSupplier connection, boolean includeUnknownDatatypes) { final PgProtoColumnValue columnValue = new PgProtoColumnValue(datumMessage); return ReplicationMessageColumnValueResolver.resolveValue(columnName, type, fullType, columnValue, connection, includeUnknownDatatypes, typeRegistry); diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/converters/PostgresCloudEventsMaker.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/converters/PostgresCloudEventsMaker.java similarity index 95% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/converters/PostgresCloudEventsMaker.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/converters/PostgresCloudEventsMaker.java index 57d0fdc8a7b..6c89f436d9c 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/converters/PostgresCloudEventsMaker.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/converters/PostgresCloudEventsMaker.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.converters; +package io.debezium.connector.postgresql.converters; import io.debezium.connector.AbstractSourceInfo; import io.debezium.converters.spi.CloudEventsMaker; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/converters/PostgresCloudEventsProvider.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/converters/PostgresCloudEventsProvider.java similarity index 91% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/converters/PostgresCloudEventsProvider.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/converters/PostgresCloudEventsProvider.java index 1cb45781d92..b797fcfb9c8 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/converters/PostgresCloudEventsProvider.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/converters/PostgresCloudEventsProvider.java @@ -3,9 +3,9 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.converters; +package io.debezium.connector.postgresql.converters; -import io.debezium.connector.yb.postgresql.Module; +import io.debezium.connector.postgresql.Module; import io.debezium.converters.recordandmetadata.RecordAndMetadata; import io.debezium.converters.spi.CloudEventsMaker; import io.debezium.converters.spi.CloudEventsProvider; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/converters/PostgresRecordParser.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/converters/PostgresRecordParser.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/converters/PostgresRecordParser.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/converters/PostgresRecordParser.java index 36d2e654d03..babd0004437 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/converters/PostgresRecordParser.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/converters/PostgresRecordParser.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.converters; +package io.debezium.connector.postgresql.converters; import java.util.Set; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/data/Ltree.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/data/Ltree.java similarity index 90% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/data/Ltree.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/data/Ltree.java index c90fd84c56d..a988c741b2d 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/data/Ltree.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/data/Ltree.java @@ -3,12 +3,13 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.data; +package io.debezium.connector.postgresql.data; -import io.debezium.connector.yb.postgresql.PostgresSchemaFactory; import org.apache.kafka.connect.data.Schema; import org.apache.kafka.connect.data.SchemaBuilder; +import io.debezium.connector.postgresql.PostgresSchemaFactory; + /** * A semantic type for a Ltree string. * diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/metadata/PostgresConnectorMetadata.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/metadata/PostgresConnectorMetadata.java similarity index 74% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/metadata/PostgresConnectorMetadata.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/metadata/PostgresConnectorMetadata.java index 1526203d73b..02879619214 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/metadata/PostgresConnectorMetadata.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/metadata/PostgresConnectorMetadata.java @@ -3,12 +3,12 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.metadata; +package io.debezium.connector.postgresql.metadata; import io.debezium.config.Field; -import io.debezium.connector.yb.postgresql.Module; -import io.debezium.connector.yb.postgresql.PostgresConnector; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; +import io.debezium.connector.postgresql.Module; +import io.debezium.connector.postgresql.PostgresConnector; +import io.debezium.connector.postgresql.PostgresConnectorConfig; import io.debezium.metadata.ConnectorDescriptor; import io.debezium.metadata.ConnectorMetadata; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/metadata/PostgresConnectorMetadataProvider.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/metadata/PostgresConnectorMetadataProvider.java similarity index 89% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/metadata/PostgresConnectorMetadataProvider.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/metadata/PostgresConnectorMetadataProvider.java index d8b08109d3b..e285e7a50e1 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/metadata/PostgresConnectorMetadataProvider.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/metadata/PostgresConnectorMetadataProvider.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.metadata; +package io.debezium.connector.postgresql.metadata; import io.debezium.metadata.ConnectorMetadata; import io.debezium.metadata.ConnectorMetadataProvider; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/pipeline/txmetadata/PostgresTransactionMonitor.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/pipeline/txmetadata/PostgresTransactionMonitor.java similarity index 94% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/pipeline/txmetadata/PostgresTransactionMonitor.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/pipeline/txmetadata/PostgresTransactionMonitor.java index f278cfd64a5..d49d356b566 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/pipeline/txmetadata/PostgresTransactionMonitor.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/pipeline/txmetadata/PostgresTransactionMonitor.java @@ -3,15 +3,15 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.pipeline.txmetadata; +package io.debezium.connector.postgresql.pipeline.txmetadata; import java.time.Instant; -import io.debezium.connector.yb.postgresql.PostgresOffsetContext; import org.apache.kafka.connect.data.Struct; import org.apache.kafka.connect.source.SourceRecord; import io.debezium.config.CommonConnectorConfig; +import io.debezium.connector.postgresql.PostgresOffsetContext; import io.debezium.function.BlockingConsumer; import io.debezium.pipeline.source.spi.EventMetadataProvider; import io.debezium.pipeline.spi.OffsetContext; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/rest/DebeziumPostgresConnectRestExtension.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectRestExtension.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/rest/DebeziumPostgresConnectRestExtension.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectRestExtension.java index 78c278a0ad4..db62abd445c 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/rest/DebeziumPostgresConnectRestExtension.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectRestExtension.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.rest; +package io.debezium.connector.postgresql.rest; import java.util.Map; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/rest/DebeziumPostgresConnectorResource.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResource.java similarity index 94% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/rest/DebeziumPostgresConnectorResource.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResource.java index 0ac3acd7dcf..16e0ee9d8ff 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/rest/DebeziumPostgresConnectorResource.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResource.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.rest; +package io.debezium.connector.postgresql.rest; import java.util.List; import java.util.Map; @@ -16,11 +16,11 @@ import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; -import io.debezium.connector.yb.postgresql.Module; -import io.debezium.connector.yb.postgresql.PostgresConnector; import org.apache.kafka.connect.health.ConnectClusterState; import io.debezium.config.Configuration; +import io.debezium.connector.postgresql.Module; +import io.debezium.connector.postgresql.PostgresConnector; import io.debezium.rest.ConnectionValidationResource; import io.debezium.rest.FilterValidationResource; import io.debezium.rest.MetricsResource; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/AlwaysSnapshotter.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/AlwaysSnapshotter.java similarity index 91% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/AlwaysSnapshotter.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/AlwaysSnapshotter.java index ebae15ce6b5..792d6d09a66 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/AlwaysSnapshotter.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/AlwaysSnapshotter.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.snapshot; +package io.debezium.connector.postgresql.snapshot; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/InitialOnlySnapshotter.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/InitialOnlySnapshotter.java similarity index 83% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/InitialOnlySnapshotter.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/InitialOnlySnapshotter.java index b4b216cb3f8..b3d6e6e6ee7 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/InitialOnlySnapshotter.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/InitialOnlySnapshotter.java @@ -3,14 +3,14 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.snapshot; +package io.debezium.connector.postgresql.snapshot; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; -import io.debezium.connector.yb.postgresql.spi.SlotState; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.yb.postgresql.spi.OffsetState; +import io.debezium.connector.postgresql.PostgresConnectorConfig; +import io.debezium.connector.postgresql.spi.OffsetState; +import io.debezium.connector.postgresql.spi.SlotState; public class InitialOnlySnapshotter extends QueryingSnapshotter { diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/InitialSnapshotter.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/InitialSnapshotter.java similarity index 84% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/InitialSnapshotter.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/InitialSnapshotter.java index ed8fc36aaa9..4e7b9ac97c8 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/InitialSnapshotter.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/InitialSnapshotter.java @@ -3,14 +3,14 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.snapshot; +package io.debezium.connector.postgresql.snapshot; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; -import io.debezium.connector.yb.postgresql.spi.OffsetState; -import io.debezium.connector.yb.postgresql.spi.SlotState; +import io.debezium.connector.postgresql.PostgresConnectorConfig; +import io.debezium.connector.postgresql.spi.OffsetState; +import io.debezium.connector.postgresql.spi.SlotState; public class InitialSnapshotter extends QueryingSnapshotter { diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/NeverSnapshotter.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/NeverSnapshotter.java similarity index 83% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/NeverSnapshotter.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/NeverSnapshotter.java index cba828e33bc..2df93f0ede9 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/NeverSnapshotter.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/NeverSnapshotter.java @@ -3,19 +3,19 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.snapshot; +package io.debezium.connector.postgresql.snapshot; import java.util.List; import java.util.Optional; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; -import io.debezium.connector.yb.postgresql.spi.OffsetState; -import io.debezium.connector.yb.postgresql.spi.SlotState; -import io.debezium.connector.yb.postgresql.spi.Snapshotter; import org.apache.kafka.connect.errors.ConnectException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import io.debezium.connector.postgresql.PostgresConnectorConfig; +import io.debezium.connector.postgresql.spi.OffsetState; +import io.debezium.connector.postgresql.spi.SlotState; +import io.debezium.connector.postgresql.spi.Snapshotter; import io.debezium.relational.TableId; public class NeverSnapshotter implements Snapshotter { diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/QueryingSnapshotter.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/QueryingSnapshotter.java similarity index 90% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/QueryingSnapshotter.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/QueryingSnapshotter.java index 5195ad4ceb2..4182db952c1 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/QueryingSnapshotter.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/QueryingSnapshotter.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.snapshot; +package io.debezium.connector.postgresql.snapshot; import java.time.Duration; import java.util.List; @@ -11,12 +11,12 @@ import java.util.Set; import java.util.stream.Collectors; -import io.debezium.connector.yb.postgresql.YugabyteDBServer; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; -import io.debezium.connector.yb.postgresql.spi.OffsetState; -import io.debezium.connector.yb.postgresql.spi.SlotCreationResult; -import io.debezium.connector.yb.postgresql.spi.SlotState; -import io.debezium.connector.yb.postgresql.spi.Snapshotter; +import io.debezium.connector.postgresql.PostgresConnectorConfig; +import io.debezium.connector.postgresql.YugabyteDBServer; +import io.debezium.connector.postgresql.spi.OffsetState; +import io.debezium.connector.postgresql.spi.SlotCreationResult; +import io.debezium.connector.postgresql.spi.SlotState; +import io.debezium.connector.postgresql.spi.Snapshotter; import io.debezium.relational.TableId; public abstract class QueryingSnapshotter implements Snapshotter { diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/SnapshotterWrapper.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/SnapshotterWrapper.java similarity index 74% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/SnapshotterWrapper.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/SnapshotterWrapper.java index 941f0fe3845..ddcbca49fa9 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/snapshot/SnapshotterWrapper.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/snapshot/SnapshotterWrapper.java @@ -3,12 +3,12 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.snapshot; +package io.debezium.connector.postgresql.snapshot; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; -import io.debezium.connector.yb.postgresql.spi.OffsetState; -import io.debezium.connector.yb.postgresql.spi.SlotState; -import io.debezium.connector.yb.postgresql.spi.Snapshotter; +import io.debezium.connector.postgresql.PostgresConnectorConfig; +import io.debezium.connector.postgresql.spi.OffsetState; +import io.debezium.connector.postgresql.spi.SlotState; +import io.debezium.connector.postgresql.spi.Snapshotter; /** * This class is a small wrapper around the snapshotter that takes care of initialization diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/spi/OffsetState.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/spi/OffsetState.java similarity index 93% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/spi/OffsetState.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/spi/OffsetState.java index 5b7ea0339df..c483033c0bf 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/spi/OffsetState.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/spi/OffsetState.java @@ -3,12 +3,12 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.spi; +package io.debezium.connector.postgresql.spi; import java.time.Instant; import io.debezium.common.annotation.Incubating; -import io.debezium.connector.yb.postgresql.connection.Lsn; +import io.debezium.connector.postgresql.connection.Lsn; /** * A simple data container that represents the last seen offset diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/spi/SlotCreationResult.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/spi/SlotCreationResult.java similarity index 91% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/spi/SlotCreationResult.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/spi/SlotCreationResult.java index e1cb5dd194d..f5fb7a0aca7 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/spi/SlotCreationResult.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/spi/SlotCreationResult.java @@ -3,10 +3,10 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.spi; +package io.debezium.connector.postgresql.spi; import io.debezium.common.annotation.Incubating; -import io.debezium.connector.yb.postgresql.connection.Lsn; +import io.debezium.connector.postgresql.connection.Lsn; /** * A simple data container representing the creation of a newly created replication slot. diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/spi/SlotState.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/spi/SlotState.java similarity index 93% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/spi/SlotState.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/spi/SlotState.java index 04653fecc67..f34af961777 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/spi/SlotState.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/spi/SlotState.java @@ -3,10 +3,10 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.spi; +package io.debezium.connector.postgresql.spi; import io.debezium.common.annotation.Incubating; -import io.debezium.connector.yb.postgresql.connection.Lsn; +import io.debezium.connector.postgresql.connection.Lsn; /** * A simple data container that holds the state of the current slot diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/spi/Snapshotter.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/spi/Snapshotter.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/spi/Snapshotter.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/spi/Snapshotter.java index 31b87468f6d..75aa638ebdb 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/spi/Snapshotter.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/spi/Snapshotter.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.spi; +package io.debezium.connector.postgresql.spi; import java.time.Duration; import java.util.List; @@ -11,7 +11,7 @@ import java.util.Set; import io.debezium.common.annotation.Incubating; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; +import io.debezium.connector.postgresql.PostgresConnectorConfig; import io.debezium.relational.TableId; /** diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/AbstractTimescaleDbMetadata.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/AbstractTimescaleDbMetadata.java similarity index 92% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/AbstractTimescaleDbMetadata.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/AbstractTimescaleDbMetadata.java index ab309e4ed43..211e0a24218 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/AbstractTimescaleDbMetadata.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/AbstractTimescaleDbMetadata.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.transforms.timescaledb; +package io.debezium.connector.postgresql.transforms.timescaledb; import java.util.HashSet; import java.util.Set; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/QueryInformationSchemaMetadata.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/QueryInformationSchemaMetadata.java similarity index 96% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/QueryInformationSchemaMetadata.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/QueryInformationSchemaMetadata.java index 07ff6b324f3..7e1528bfee2 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/QueryInformationSchemaMetadata.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/QueryInformationSchemaMetadata.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.transforms.timescaledb; +package io.debezium.connector.postgresql.transforms.timescaledb; import java.io.IOException; import java.sql.SQLException; @@ -11,13 +11,13 @@ import java.util.Map; import java.util.Optional; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import io.debezium.DebeziumException; import io.debezium.config.CommonConnectorConfig; import io.debezium.config.Configuration; +import io.debezium.connector.postgresql.connection.PostgresConnection; import io.debezium.jdbc.JdbcConfiguration; import io.debezium.relational.TableId; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDb.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDb.java similarity index 97% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDb.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDb.java index 7988a65d5db..427f0d1d794 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDb.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDb.java @@ -3,13 +3,12 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.transforms.timescaledb; +package io.debezium.connector.postgresql.transforms.timescaledb; import java.io.IOException; import java.util.Map; import java.util.Optional; -import io.debezium.connector.yb.postgresql.SourceInfo; import org.apache.kafka.common.config.ConfigDef; import org.apache.kafka.connect.connector.ConnectRecord; import org.apache.kafka.connect.data.Struct; @@ -21,6 +20,7 @@ import io.debezium.annotation.VisibleForTesting; import io.debezium.config.Configuration; import io.debezium.config.Field; +import io.debezium.connector.postgresql.SourceInfo; import io.debezium.data.Envelope; import io.debezium.relational.TableId; import io.debezium.transforms.SmtManager; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDbConfigDefinition.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbConfigDefinition.java similarity index 95% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDbConfigDefinition.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbConfigDefinition.java index 1daa1034fac..83e3351d511 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDbConfigDefinition.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbConfigDefinition.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.transforms.timescaledb; +package io.debezium.connector.postgresql.transforms.timescaledb; import org.apache.kafka.common.config.ConfigDef; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDbMetadata.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbMetadata.java similarity index 94% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDbMetadata.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbMetadata.java index 82f0106f71a..c8207173dc9 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDbMetadata.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbMetadata.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.transforms.timescaledb; +package io.debezium.connector.postgresql.transforms.timescaledb; import java.io.Closeable; import java.util.Optional; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/yugabytedb/Pair.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/yugabytedb/Pair.java similarity index 94% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/yugabytedb/Pair.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/yugabytedb/Pair.java index f7164d330d9..8de3f6ceca7 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/yugabytedb/Pair.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/yugabytedb/Pair.java @@ -1,4 +1,4 @@ -package io.debezium.connector.yb.postgresql.transforms.yugabytedb; +package io.debezium.connector.postgresql.transforms.yugabytedb; import java.util.Objects; diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/yugabytedb/YBExtractNewRecordState.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/yugabytedb/YBExtractNewRecordState.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/yugabytedb/YBExtractNewRecordState.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/yugabytedb/YBExtractNewRecordState.java index 0add7a221b9..17ed72e903b 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/yb/postgresql/transforms/yugabytedb/YBExtractNewRecordState.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/transforms/yugabytedb/YBExtractNewRecordState.java @@ -1,4 +1,4 @@ -package io.debezium.connector.yb.postgresql.transforms.yugabytedb; +package io.debezium.connector.postgresql.transforms.yugabytedb; import java.util.Map; import java.util.Objects; diff --git a/debezium-connector-postgres/src/main/resources/META-INF/services/io.debezium.converters.spi.CloudEventsProvider b/debezium-connector-postgres/src/main/resources/META-INF/services/io.debezium.converters.spi.CloudEventsProvider index fd150ed7ad3..d7fbe52474b 100644 --- a/debezium-connector-postgres/src/main/resources/META-INF/services/io.debezium.converters.spi.CloudEventsProvider +++ b/debezium-connector-postgres/src/main/resources/META-INF/services/io.debezium.converters.spi.CloudEventsProvider @@ -1 +1 @@ -io.debezium.connector.yb.postgresql.converters.PostgresCloudEventsProvider \ No newline at end of file +io.debezium.connector.postgresql.converters.PostgresCloudEventsProvider \ No newline at end of file diff --git a/debezium-connector-postgres/src/main/resources/META-INF/services/io.debezium.metadata.ConnectorMetadataProvider b/debezium-connector-postgres/src/main/resources/META-INF/services/io.debezium.metadata.ConnectorMetadataProvider index af37a7cf3cd..0b9baa6a2e7 100644 --- a/debezium-connector-postgres/src/main/resources/META-INF/services/io.debezium.metadata.ConnectorMetadataProvider +++ b/debezium-connector-postgres/src/main/resources/META-INF/services/io.debezium.metadata.ConnectorMetadataProvider @@ -1 +1 @@ -io.debezium.connector.yb.postgresql.metadata.PostgresConnectorMetadataProvider +io.debezium.connector.postgresql.metadata.PostgresConnectorMetadataProvider diff --git a/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.rest.ConnectRestExtension b/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.rest.ConnectRestExtension index 2f3416f161e..93e7adc153b 100644 --- a/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.rest.ConnectRestExtension +++ b/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.rest.ConnectRestExtension @@ -1 +1 @@ -io.debezium.connector.yb.postgresql.rest.DebeziumPostgresConnectRestExtension +io.debezium.connector.postgresql.rest.DebeziumPostgresConnectRestExtension diff --git a/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.source.SourceConnector b/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.source.SourceConnector index 6bfaced2443..58de09f1bbf 100644 --- a/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.source.SourceConnector +++ b/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.source.SourceConnector @@ -1 +1 @@ -io.debezium.connector.yb.postgresql.PostgresConnector \ No newline at end of file +io.debezium.connector.postgresql.PostgresConnector \ No newline at end of file diff --git a/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.transforms.Transformation b/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.transforms.Transformation index df7ca6785f7..f63e1f87484 100644 --- a/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.transforms.Transformation +++ b/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.transforms.Transformation @@ -1 +1 @@ -io.debezium.connector.yb.postgresql.transforms.timescaledb.TimescaleDb \ No newline at end of file +io.debezium.connector.postgresql.transforms.timescaledb.TimescaleDb \ No newline at end of file diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/AbstractRecordsProducerTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/AbstractRecordsProducerTest.java similarity index 99% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/AbstractRecordsProducerTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/AbstractRecordsProducerTest.java index 4d3ba5407f2..95f5cd8a991 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/AbstractRecordsProducerTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/AbstractRecordsProducerTest.java @@ -4,8 +4,9 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; +import static io.debezium.connector.postgresql.TestHelper.PK_FIELD; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; @@ -58,7 +59,7 @@ import org.slf4j.LoggerFactory; import io.debezium.connector.SnapshotRecord; -import io.debezium.connector.yb.postgresql.data.Ltree; +import io.debezium.connector.postgresql.data.Ltree; import io.debezium.data.Bits; import io.debezium.data.Envelope; import io.debezium.data.Json; @@ -971,7 +972,7 @@ protected List schemasAndValuesForDomainAliasTypes(boolean final ByteBuffer polygonByteBuffer = ByteBuffer.wrap("((0.0,0.0),(0.0,1.0),(1.0,0.0),(0.0,0.0))".getBytes()); return Arrays.asList( - new SchemaAndValueField(TestHelper.PK_FIELD, SchemaBuilder.int32().defaultValue(0).build(), 1), + new SchemaAndValueField(PK_FIELD, SchemaBuilder.int32().defaultValue(0).build(), 1), new SchemaAndValueField("bit_base", Bits.builder(3).build(), new byte[]{ 5 }), new SchemaAndValueField("bit_alias", Bits.builder(3).build(), new byte[]{ 5 }), new SchemaAndValueField("smallint_base", SchemaBuilder.INT16_SCHEMA, (short) 1), diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/BlockingSnapshotIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/BlockingSnapshotIT.java similarity index 97% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/BlockingSnapshotIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/BlockingSnapshotIT.java index 2a7a300d6d1..7f5d129a0de 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/BlockingSnapshotIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/BlockingSnapshotIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import static io.debezium.pipeline.signal.actions.AbstractSnapshotSignal.SnapshotType.BLOCKING; @@ -17,7 +17,7 @@ import io.debezium.config.CommonConnectorConfig; import io.debezium.config.Configuration; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; import io.debezium.doc.FixFor; import io.debezium.jdbc.JdbcConnection; import io.debezium.pipeline.AbstractBlockingSnapshotTest; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CloudEventsConverterIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CloudEventsConverterIT.java similarity index 97% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CloudEventsConverterIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CloudEventsConverterIT.java index 3958afa8337..59d59bc2e58 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CloudEventsConverterIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CloudEventsConverterIT.java @@ -4,14 +4,14 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.util.UUID; import org.junit.Before; import io.debezium.config.Configuration; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; import io.debezium.converters.AbstractCloudEventsConverterTest; import io.debezium.jdbc.JdbcConnection; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomLifecycleHookTestSnapshot.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomLifecycleHookTestSnapshot.java similarity index 87% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomLifecycleHookTestSnapshot.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomLifecycleHookTestSnapshot.java index acfb1fcf773..3e2565033f2 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomLifecycleHookTestSnapshot.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomLifecycleHookTestSnapshot.java @@ -4,9 +4,9 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; -import io.debezium.connector.yb.postgresql.snapshot.AlwaysSnapshotter; +import io.debezium.connector.postgresql.snapshot.AlwaysSnapshotter; public class CustomLifecycleHookTestSnapshot extends AlwaysSnapshotter { diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomPartialTableTestSnapshot.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomPartialTableTestSnapshot.java similarity index 93% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomPartialTableTestSnapshot.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomPartialTableTestSnapshot.java index 9e4654ec435..02723389b50 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomPartialTableTestSnapshot.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomPartialTableTestSnapshot.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.util.List; import java.util.Optional; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomPostgresSourceInfoStructMaker.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomPostgresSourceInfoStructMaker.java similarity index 89% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomPostgresSourceInfoStructMaker.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomPostgresSourceInfoStructMaker.java index bc2c5129ef9..370bce6327b 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomPostgresSourceInfoStructMaker.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomPostgresSourceInfoStructMaker.java @@ -4,10 +4,8 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; -import io.debezium.connector.yb.postgresql.PostgresSourceInfoStructMaker; -import io.debezium.connector.yb.postgresql.SourceInfo; import org.apache.kafka.connect.data.Schema; import org.apache.kafka.connect.data.Struct; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomStartFromStreamingTestSnapshot.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomStartFromStreamingTestSnapshot.java similarity index 74% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomStartFromStreamingTestSnapshot.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomStartFromStreamingTestSnapshot.java index 154ebdd7274..9e13d245150 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomStartFromStreamingTestSnapshot.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomStartFromStreamingTestSnapshot.java @@ -4,9 +4,9 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; -import io.debezium.connector.yb.postgresql.snapshot.AlwaysSnapshotter; +import io.debezium.connector.postgresql.snapshot.AlwaysSnapshotter; public class CustomStartFromStreamingTestSnapshot extends AlwaysSnapshotter { @Override diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomTestSnapshot.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomTestSnapshot.java similarity index 83% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomTestSnapshot.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomTestSnapshot.java index 4dfbaaf68a0..f5ea83d4a70 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomTestSnapshot.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomTestSnapshot.java @@ -3,17 +3,16 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; -import io.debezium.connector.yb.postgresql.spi.OffsetState; -import io.debezium.connector.yb.postgresql.spi.SlotCreationResult; -import io.debezium.connector.yb.postgresql.spi.SlotState; -import io.debezium.connector.yb.postgresql.spi.Snapshotter; +import io.debezium.connector.postgresql.spi.OffsetState; +import io.debezium.connector.postgresql.spi.SlotCreationResult; +import io.debezium.connector.postgresql.spi.SlotState; +import io.debezium.connector.postgresql.spi.Snapshotter; import io.debezium.relational.TableId; /** diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomTypeEncodingTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomTypeEncodingTest.java similarity index 95% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomTypeEncodingTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomTypeEncodingTest.java index 416c96d8106..706eb67494c 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/CustomTypeEncodingTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomTypeEncodingTest.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import static org.junit.Assert.assertEquals; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/DebeziumEngineIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DebeziumEngineIT.java similarity index 99% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/DebeziumEngineIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DebeziumEngineIT.java index 975c6fa915d..8d2cae40ae1 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/DebeziumEngineIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DebeziumEngineIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import static org.assertj.core.api.Assertions.assertThat; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/DecoderDifferences.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DecoderDifferences.java similarity index 97% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/DecoderDifferences.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DecoderDifferences.java index 45b37863a55..7a2da2c0898 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/DecoderDifferences.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DecoderDifferences.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.util.List; import java.util.stream.Collectors; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/DomainTypesIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DomainTypesIT.java similarity index 96% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/DomainTypesIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DomainTypesIT.java index c99db5757f7..fc78d6e9fb3 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/DomainTypesIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DomainTypesIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import static io.debezium.junit.EqualityCheck.LESS_THAN; import static org.assertj.core.api.Assertions.assertThat; @@ -22,7 +22,7 @@ import org.junit.Before; import org.junit.Test; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; import io.debezium.doc.FixFor; import io.debezium.junit.SkipWhenDatabaseVersion; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/FieldTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/FieldTest.java similarity index 77% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/FieldTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/FieldTest.java index cd6ff58bcb5..c72abda9c09 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/FieldTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/FieldTest.java @@ -4,9 +4,8 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; import org.junit.Before; import io.debezium.config.AbstractFieldTest; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/IncrementalSnapshotIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/IncrementalSnapshotIT.java similarity index 99% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/IncrementalSnapshotIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/IncrementalSnapshotIT.java index 2932eefbe2a..57f6ce31180 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/IncrementalSnapshotIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/IncrementalSnapshotIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import static io.debezium.junit.EqualityCheck.LESS_THAN; import static org.assertj.core.api.Assertions.assertThat; @@ -29,7 +29,7 @@ import io.debezium.config.CommonConnectorConfig; import io.debezium.config.Configuration; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; import io.debezium.data.VariableScaleDecimal; import io.debezium.doc.FixFor; import io.debezium.jdbc.JdbcConnection; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/LogicalDecodingMessageIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/LogicalDecodingMessageIT.java similarity index 97% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/LogicalDecodingMessageIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/LogicalDecodingMessageIT.java index d11b936b8c4..f5a28ac5622 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/LogicalDecodingMessageIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/LogicalDecodingMessageIT.java @@ -4,9 +4,9 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; -import static io.debezium.connector.yb.postgresql.TestHelper.topicName; +import static io.debezium.connector.postgresql.TestHelper.topicName; import static io.debezium.junit.EqualityCheck.LESS_THAN; import static junit.framework.TestCase.assertEquals; import static org.assertj.core.api.Assertions.assertThat; @@ -18,7 +18,6 @@ import java.util.Base64; import java.util.List; -import io.debezium.connector.yb.postgresql.junit.SkipWhenDecoderPluginNameIsNot; import org.apache.kafka.connect.data.Struct; import org.apache.kafka.connect.source.SourceRecord; import org.junit.After; @@ -29,7 +28,8 @@ import org.junit.rules.TestRule; import io.debezium.config.Configuration; -import io.debezium.connector.yb.postgresql.junit.SkipTestDependingOnDecoderPluginNameRule; +import io.debezium.connector.postgresql.junit.SkipTestDependingOnDecoderPluginNameRule; +import io.debezium.connector.postgresql.junit.SkipWhenDecoderPluginNameIsNot; import io.debezium.data.Envelope; import io.debezium.doc.FixFor; import io.debezium.embedded.AbstractConnectorTest; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/NotificationsIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/NotificationsIT.java similarity index 97% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/NotificationsIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/NotificationsIT.java index 3c5e8798991..8c6d01c4167 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/NotificationsIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/NotificationsIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.sql.SQLException; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/OutboxEventRouterIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/OutboxEventRouterIT.java similarity index 97% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/OutboxEventRouterIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/OutboxEventRouterIT.java index 464beda45cb..25a9f024181 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/OutboxEventRouterIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/OutboxEventRouterIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.util.UUID; @@ -12,7 +12,7 @@ import org.junit.Before; import io.debezium.config.Configuration; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; import io.debezium.data.Json; import io.debezium.data.Uuid; import io.debezium.jdbc.JdbcConnection; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresConnectorConfigDefTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorConfigDefTest.java similarity index 98% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresConnectorConfigDefTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorConfigDefTest.java index eeddee9e9ef..debbe9b8227 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresConnectorConfigDefTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorConfigDefTest.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import static org.assertj.core.api.Assertions.assertThat; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresConnectorIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorIT.java similarity index 99% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresConnectorIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorIT.java index eac256ea6b6..818ada97539 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresConnectorIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorIT.java @@ -4,11 +4,11 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; -import static io.debezium.connector.yb.postgresql.TestHelper.PK_FIELD; -import static io.debezium.connector.yb.postgresql.TestHelper.getDefaultReplicationSlot; -import static io.debezium.connector.yb.postgresql.TestHelper.topicName; +import static io.debezium.connector.postgresql.TestHelper.PK_FIELD; +import static io.debezium.connector.postgresql.TestHelper.getDefaultReplicationSlot; +import static io.debezium.connector.postgresql.TestHelper.topicName; import static io.debezium.junit.EqualityCheck.LESS_THAN; import static junit.framework.TestCase.assertEquals; import static org.assertj.core.api.Assertions.assertThat; @@ -42,9 +42,6 @@ import javax.management.InstanceNotFoundException; -import io.debezium.connector.yb.postgresql.junit.SkipTestDependingOnDecoderPluginNameRule; -import io.debezium.connector.yb.postgresql.junit.SkipWhenDecoderPluginNameIs; -import io.debezium.connector.yb.postgresql.junit.SkipWhenDecoderPluginNameIsNot; import org.apache.commons.lang3.RandomStringUtils; import org.apache.kafka.common.config.Config; import org.apache.kafka.common.config.ConfigDef; @@ -72,16 +69,19 @@ import io.debezium.config.Configuration; import io.debezium.config.EnumeratedValue; import io.debezium.config.Field; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.LogicalDecoder; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; -import io.debezium.connector.yb.postgresql.connection.AbstractMessageDecoder; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection; -import io.debezium.connector.yb.postgresql.connection.PostgresReplicationConnection; -import io.debezium.connector.yb.postgresql.connection.ReplicaIdentityInfo; -import io.debezium.connector.yb.postgresql.connection.ReplicationConnection; -import io.debezium.connector.yb.postgresql.connection.pgoutput.PgOutputMessageDecoder; -import io.debezium.connector.yb.postgresql.snapshot.InitialOnlySnapshotter; -import io.debezium.connector.yb.postgresql.spi.SlotState; +import io.debezium.connector.postgresql.PostgresConnectorConfig.LogicalDecoder; +import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.postgresql.connection.AbstractMessageDecoder; +import io.debezium.connector.postgresql.connection.PostgresConnection; +import io.debezium.connector.postgresql.connection.PostgresReplicationConnection; +import io.debezium.connector.postgresql.connection.ReplicaIdentityInfo; +import io.debezium.connector.postgresql.connection.ReplicationConnection; +import io.debezium.connector.postgresql.connection.pgoutput.PgOutputMessageDecoder; +import io.debezium.connector.postgresql.junit.SkipTestDependingOnDecoderPluginNameRule; +import io.debezium.connector.postgresql.junit.SkipWhenDecoderPluginNameIs; +import io.debezium.connector.postgresql.junit.SkipWhenDecoderPluginNameIsNot; +import io.debezium.connector.postgresql.snapshot.InitialOnlySnapshotter; +import io.debezium.connector.postgresql.spi.SlotState; import io.debezium.converters.CloudEventsConverterTest; import io.debezium.data.Envelope; import io.debezium.data.VerifyRecord; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresConnectorTaskIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorTaskIT.java similarity index 91% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresConnectorTaskIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorTaskIT.java index 8ddbe8a9a3a..172fd53545b 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresConnectorTaskIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorTaskIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.sql.SQLException; import java.time.Duration; @@ -13,8 +13,8 @@ import org.junit.Assert; import org.junit.Test; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection; -import io.debezium.connector.yb.postgresql.connection.ReplicationConnection; +import io.debezium.connector.postgresql.connection.PostgresConnection; +import io.debezium.connector.postgresql.connection.ReplicationConnection; import io.debezium.doc.FixFor; import io.debezium.schema.SchemaTopicNamingStrategy; import io.debezium.spi.topic.TopicNamingStrategy; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresDefaultValueConverterIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresDefaultValueConverterIT.java similarity index 96% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresDefaultValueConverterIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresDefaultValueConverterIT.java index 395b12dcc6f..77302cae90d 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresDefaultValueConverterIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresDefaultValueConverterIT.java @@ -3,9 +3,9 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; -import static io.debezium.connector.yb.postgresql.TestHelper.topicName; +import static io.debezium.connector.postgresql.TestHelper.topicName; import static org.assertj.core.api.Assertions.assertThat; import java.sql.SQLException; @@ -19,8 +19,8 @@ import org.junit.Test; import io.debezium.config.Configuration; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; -import io.debezium.connector.yb.postgresql.connection.PostgresDefaultValueConverter; +import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.postgresql.connection.PostgresDefaultValueConverter; import io.debezium.data.Envelope; import io.debezium.doc.FixFor; import io.debezium.embedded.AbstractConnectorTest; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresErrorHandlerTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresErrorHandlerTest.java similarity index 93% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresErrorHandlerTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresErrorHandlerTest.java index 460a33aadf4..1c812fc10c8 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresErrorHandlerTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresErrorHandlerTest.java @@ -3,12 +3,10 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import static org.assertj.core.api.Assertions.assertThat; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; -import io.debezium.connector.yb.postgresql.PostgresErrorHandler; import org.junit.Test; import com.yugabyte.util.PSQLException; import com.yugabyte.util.PSQLState; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresMetricsIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMetricsIT.java similarity index 99% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresMetricsIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMetricsIT.java index 8bb98db4a02..7ff4d50f290 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresMetricsIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMetricsIT.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import static org.assertj.core.api.Assertions.assertThat; @@ -27,7 +27,7 @@ import org.slf4j.LoggerFactory; import io.debezium.config.Configuration; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; import io.debezium.doc.FixFor; import io.debezium.junit.EqualityCheck; import io.debezium.junit.SkipWhenJavaVersion; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresMoneyIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMoneyIT.java similarity index 98% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresMoneyIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMoneyIT.java index a31967fbeee..2d7192e414c 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresMoneyIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMoneyIT.java @@ -4,9 +4,9 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; -import static io.debezium.connector.yb.postgresql.TestHelper.topicName; +import static io.debezium.connector.postgresql.TestHelper.topicName; import static org.assertj.core.api.Assertions.assertThat; import java.math.BigDecimal; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresOffsetContextTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresOffsetContextTest.java similarity index 92% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresOffsetContextTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresOffsetContextTest.java index 2c5fd65e703..aa58cc6bc72 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresOffsetContextTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresOffsetContextTest.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import static org.assertj.core.api.Assertions.assertThat; @@ -13,7 +13,7 @@ import org.junit.Before; import org.junit.Test; -import io.debezium.connector.yb.postgresql.connection.Lsn; +import io.debezium.connector.postgresql.connection.Lsn; import io.debezium.doc.FixFor; import io.debezium.pipeline.spi.OffsetContext; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresPartitionTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresPartitionTest.java similarity index 84% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresPartitionTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresPartitionTest.java index 022399909ba..1a12573ab91 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresPartitionTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresPartitionTest.java @@ -3,10 +3,9 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import io.debezium.connector.common.AbstractPartitionTest; -import io.debezium.connector.yb.postgresql.PostgresPartition; public class PostgresPartitionTest extends AbstractPartitionTest { diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresReselectColumnsProcessorIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresReselectColumnsProcessorIT.java similarity index 97% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresReselectColumnsProcessorIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresReselectColumnsProcessorIT.java index b22bef27a9a..a3548342e69 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresReselectColumnsProcessorIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresReselectColumnsProcessorIT.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import static org.assertj.core.api.Assertions.assertThat; @@ -17,7 +17,7 @@ import org.junit.Test; import io.debezium.config.Configuration; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection; +import io.debezium.connector.postgresql.connection.PostgresConnection; import io.debezium.data.Envelope; import io.debezium.data.VerifyRecord; import io.debezium.doc.FixFor; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresSchemaIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresSchemaIT.java similarity index 99% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresSchemaIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresSchemaIT.java index 9d59c25329d..c8b9609def7 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresSchemaIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresSchemaIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import static io.debezium.junit.EqualityCheck.LESS_THAN; import static io.debezium.relational.RelationalDatabaseConnectorConfig.SCHEMA_EXCLUDE_LIST; @@ -31,9 +31,9 @@ import org.junit.Rule; import org.junit.Test; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection; -import io.debezium.connector.yb.postgresql.connection.PostgresDefaultValueConverter; -import io.debezium.connector.yb.postgresql.data.Ltree; +import io.debezium.connector.postgresql.connection.PostgresConnection; +import io.debezium.connector.postgresql.connection.PostgresDefaultValueConverter; +import io.debezium.connector.postgresql.data.Ltree; import io.debezium.data.Bits; import io.debezium.data.Json; import io.debezium.data.Uuid; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresShutdownIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresShutdownIT.java similarity index 97% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresShutdownIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresShutdownIT.java index b59222fd998..92420fa6d9b 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresShutdownIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresShutdownIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import java.sql.SQLException; import java.util.concurrent.TimeUnit; @@ -22,8 +22,8 @@ import io.debezium.config.CommonConnectorConfig; import io.debezium.config.Configuration; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection; +import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.postgresql.connection.PostgresConnection; import io.debezium.doc.FixFor; import io.debezium.embedded.AbstractConnectorTest; import io.debezium.embedded.EmbeddedEngine; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresSkipMessagesWithoutChangeConfigIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresSkipMessagesWithoutChangeConfigIT.java similarity index 98% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresSkipMessagesWithoutChangeConfigIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresSkipMessagesWithoutChangeConfigIT.java index 866930aee8e..1b4fef818a4 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PostgresSkipMessagesWithoutChangeConfigIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresSkipMessagesWithoutChangeConfigIT.java @@ -4,9 +4,9 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; -import static io.debezium.connector.yb.postgresql.TestHelper.topicName; +import static io.debezium.connector.postgresql.TestHelper.topicName; import static org.assertj.core.api.Assertions.assertThat; import java.util.List; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PublicGeometryIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PublicGeometryIT.java similarity index 89% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PublicGeometryIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PublicGeometryIT.java index 1c40d8bb2ab..624fbcd4620 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/PublicGeometryIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PublicGeometryIT.java @@ -4,16 +4,16 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; +import static io.debezium.connector.postgresql.TestHelper.PK_FIELD; +import static io.debezium.connector.postgresql.TestHelper.topicName; import static junit.framework.TestCase.assertEquals; import static org.junit.Assert.assertFalse; import java.util.List; import java.util.concurrent.TimeUnit; -import io.debezium.connector.yb.postgresql.junit.SkipTestDependingOnDecoderPluginNameRule; -import junit.framework.TestCase; import org.apache.kafka.connect.source.SourceRecord; import org.junit.Before; import org.junit.Rule; @@ -22,9 +22,10 @@ import io.debezium.config.Configuration; import io.debezium.connector.SnapshotRecord; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection; -import io.debezium.connector.yb.postgresql.connection.ReplicationConnection; +import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.postgresql.connection.PostgresConnection; +import io.debezium.connector.postgresql.connection.ReplicationConnection; +import io.debezium.connector.postgresql.junit.SkipTestDependingOnDecoderPluginNameRule; import io.debezium.data.Envelope; import io.debezium.data.VerifyRecord; import io.debezium.doc.FixFor; @@ -102,7 +103,7 @@ private void assertInsert(String statement, Integer pk, List config .with(PostgresConnectorConfig.SCHEMA_REFRESH_MODE, PostgresConnectorConfig.SchemaRefreshMode.COLUMNS_DIFF_EXCLUDE_UNCHANGED_TOAST)); @@ -3834,7 +3835,7 @@ private String getReplicationSlotChangesQuery() { case DECODERBUFS: return "SELECT pg_logical_slot_get_binary_changes('" + ReplicationConnection.Builder.DEFAULT_SLOT_NAME + "', " + "NULL, NULL)"; - case SkipWhenDecoderPluginNameIs.DecoderPluginName.PGOUTPUT: + case PGOUTPUT: return "SELECT pg_logical_slot_get_binary_changes('" + ReplicationConnection.Builder.DEFAULT_SLOT_NAME + "', " + "NULL, NULL, 'proto_version', '1', 'publication_names', '" + ReplicationConnection.Builder.DEFAULT_PUBLICATION_NAME + "')"; } diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/ReplicaIdentityTestMapperTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/ReplicaIdentityTestMapperTest.java similarity index 91% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/ReplicaIdentityTestMapperTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/ReplicaIdentityTestMapperTest.java index 02df11fd33a..e2c47e5b1e7 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/ReplicaIdentityTestMapperTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/ReplicaIdentityTestMapperTest.java @@ -4,14 +4,13 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import static org.junit.Assert.assertEquals; -import io.debezium.connector.yb.postgresql.ReplicaIdentityMapper; import org.junit.Test; -import io.debezium.connector.yb.postgresql.connection.ReplicaIdentityInfo; +import io.debezium.connector.postgresql.connection.ReplicaIdentityInfo; import io.debezium.relational.TableId; public class ReplicaIdentityTestMapperTest { diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/SignalsIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SignalsIT.java similarity index 98% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/SignalsIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SignalsIT.java index 16a64b4e9d4..68090504f21 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/SignalsIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SignalsIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import static org.assertj.core.api.Assertions.assertThat; @@ -28,8 +28,8 @@ import io.debezium.config.CommonConnectorConfig; import io.debezium.config.Configuration; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; -import io.debezium.connector.yb.postgresql.spi.CustomActionProvider; +import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.postgresql.spi.CustomActionProvider; import io.debezium.embedded.AbstractConnectorTest; import io.debezium.junit.logging.LogInterceptor; import io.debezium.pipeline.signal.actions.Log; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/SnapshotWithOverridesProducerIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SnapshotWithOverridesProducerIT.java similarity index 93% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/SnapshotWithOverridesProducerIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SnapshotWithOverridesProducerIT.java index c84880e4af0..60b654e387b 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/SnapshotWithOverridesProducerIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SnapshotWithOverridesProducerIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import static org.assertj.core.api.Assertions.assertThat; @@ -18,10 +18,10 @@ import org.junit.Test; import io.debezium.config.Configuration; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; /** - * Integration test for {@link PostgresConnectorConfig.SNAPSHOT_SELECT_STATEMENT_OVERRIDES_BY_TABLE} + * Integration test for {@link io.debezium.connector.postgresql.PostgresConnectorConfig.SNAPSHOT_SELECT_STATEMENT_OVERRIDES_BY_TABLE} * * @author Jiri Pechanec (jpechane@redhat.com) */ diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/SourceInfoTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SourceInfoTest.java similarity index 92% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/SourceInfoTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SourceInfoTest.java index 737663f1a87..a61065bd883 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/SourceInfoTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SourceInfoTest.java @@ -3,13 +3,10 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import static org.assertj.core.api.Assertions.assertThat; -import io.debezium.connector.yb.postgresql.Module; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; -import io.debezium.connector.yb.postgresql.SourceInfo; import org.apache.kafka.connect.data.Schema; import org.apache.kafka.connect.data.SchemaBuilder; import org.junit.Before; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/TablesWithoutPrimaryKeyIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TablesWithoutPrimaryKeyIT.java similarity index 98% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/TablesWithoutPrimaryKeyIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TablesWithoutPrimaryKeyIT.java index 468dab54f7b..345a989d894 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/TablesWithoutPrimaryKeyIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TablesWithoutPrimaryKeyIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import static org.assertj.core.api.Assertions.assertThat; @@ -18,7 +18,7 @@ import org.junit.Before; import org.junit.Test; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; /** * Integration test to verify behaviour of tables that do not have primary key diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/TestHelper.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TestHelper.java similarity index 97% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/TestHelper.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TestHelper.java index 7dd8056a509..eb9df058f6e 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/TestHelper.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TestHelper.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.fail; @@ -34,12 +34,12 @@ import io.debezium.config.CommonConnectorConfig; import io.debezium.config.Configuration; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SecureConnectionMode; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection.PostgresValueConverterBuilder; -import io.debezium.connector.yb.postgresql.connection.PostgresDefaultValueConverter; -import io.debezium.connector.yb.postgresql.connection.ReplicationConnection; -import io.debezium.connector.yb.postgresql.spi.SlotState; +import io.debezium.connector.postgresql.PostgresConnectorConfig.SecureConnectionMode; +import io.debezium.connector.postgresql.connection.PostgresConnection; +import io.debezium.connector.postgresql.connection.PostgresConnection.PostgresValueConverterBuilder; +import io.debezium.connector.postgresql.connection.PostgresDefaultValueConverter; +import io.debezium.connector.postgresql.connection.ReplicationConnection; +import io.debezium.connector.postgresql.spi.SlotState; import io.debezium.jdbc.JdbcConfiguration; import io.debezium.schema.SchemaTopicNamingStrategy; import io.debezium.spi.topic.TopicNamingStrategy; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/TransactionMetadataIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TransactionMetadataIT.java similarity index 96% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/TransactionMetadataIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TransactionMetadataIT.java index 5a0b20fb95f..bd65c93c538 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/TransactionMetadataIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TransactionMetadataIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import static org.assertj.core.api.Assertions.assertThat; @@ -17,7 +17,6 @@ import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; -import io.debezium.connector.yb.postgresql.junit.SkipTestDependingOnDecoderPluginNameRule; import org.apache.kafka.connect.data.Struct; import org.apache.kafka.connect.source.SourceRecord; import org.awaitility.Awaitility; @@ -29,7 +28,8 @@ import org.junit.rules.TestRule; import io.debezium.config.Configuration; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.postgresql.junit.SkipTestDependingOnDecoderPluginNameRule; import io.debezium.embedded.AbstractConnectorTest; import io.debezium.junit.EqualityCheck; import io.debezium.junit.SkipWhenKafkaVersion; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/YBVerifyRecord.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YBVerifyRecord.java similarity index 96% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/YBVerifyRecord.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YBVerifyRecord.java index b6d310a7bf0..1f08a6b9332 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/YBVerifyRecord.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YBVerifyRecord.java @@ -1,4 +1,4 @@ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import io.debezium.data.Envelope; import io.debezium.data.VerifyRecord; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/YugabyteReplicaIdentityIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteReplicaIdentityIT.java similarity index 98% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/YugabyteReplicaIdentityIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteReplicaIdentityIT.java index 3e8c8168aeb..fef97945de6 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/YugabyteReplicaIdentityIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteReplicaIdentityIT.java @@ -1,4 +1,4 @@ -package io.debezium.connector.yb.postgresql; +package io.debezium.connector.postgresql; import io.debezium.config.Configuration; import io.debezium.data.Envelope; @@ -17,8 +17,8 @@ import java.util.List; import java.util.concurrent.TimeUnit; -import static io.debezium.connector.yb.postgresql.TestHelper.PK_FIELD; -import static io.debezium.connector.yb.postgresql.TestHelper.topicName; +import static io.debezium.connector.postgresql.TestHelper.PK_FIELD; +import static io.debezium.connector.postgresql.TestHelper.topicName; import static org.assertj.core.api.Assertions.assertThat; /** diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/connection/ISODateTimeFormatTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/connection/ISODateTimeFormatTest.java similarity index 98% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/connection/ISODateTimeFormatTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/connection/ISODateTimeFormatTest.java index d8c2d563282..915d1a398a2 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/connection/ISODateTimeFormatTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/connection/ISODateTimeFormatTest.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection; +package io.debezium.connector.postgresql.connection; import static org.assertj.core.api.Assertions.assertThat; @@ -17,7 +17,6 @@ import java.time.format.TextStyle; import java.util.Locale; -import io.debezium.connector.yb.postgresql.connection.DateTimeFormat; import org.junit.Test; public class ISODateTimeFormatTest { diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/connection/PostgresConnectionIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/connection/PostgresConnectionIT.java similarity index 99% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/connection/PostgresConnectionIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/connection/PostgresConnectionIT.java index 756f47d0588..1defabb8e99 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/connection/PostgresConnectionIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/connection/PostgresConnectionIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection; +package io.debezium.connector.postgresql.connection; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -24,7 +24,7 @@ import org.junit.Test; import com.yugabyte.jdbc.PgConnection; -import io.debezium.connector.yb.postgresql.TestHelper; +import io.debezium.connector.postgresql.TestHelper; import io.debezium.doc.FixFor; import io.debezium.jdbc.JdbcConfiguration; import io.debezium.jdbc.JdbcConnection; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/connection/PostgresDefaultValueConverterIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/connection/PostgresDefaultValueConverterIT.java similarity index 92% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/connection/PostgresDefaultValueConverterIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/connection/PostgresDefaultValueConverterIT.java index 36dee202eb0..e509a35fc43 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/connection/PostgresDefaultValueConverterIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/connection/PostgresDefaultValueConverterIT.java @@ -3,9 +3,9 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection; +package io.debezium.connector.postgresql.connection; -import static io.debezium.connector.yb.postgresql.TestHelper.defaultJdbcConfig; +import static io.debezium.connector.postgresql.TestHelper.defaultJdbcConfig; import java.nio.charset.Charset; import java.sql.SQLException; @@ -18,10 +18,10 @@ import org.junit.Test; import io.debezium.config.Configuration; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; -import io.debezium.connector.yb.postgresql.PostgresValueConverter; -import io.debezium.connector.yb.postgresql.TestHelper; -import io.debezium.connector.yb.postgresql.TypeRegistry; +import io.debezium.connector.postgresql.PostgresConnectorConfig; +import io.debezium.connector.postgresql.PostgresValueConverter; +import io.debezium.connector.postgresql.TestHelper; +import io.debezium.connector.postgresql.TypeRegistry; import io.debezium.doc.FixFor; import io.debezium.relational.Column; import io.debezium.relational.RelationalDatabaseConnectorConfig.DecimalHandlingMode; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/connection/ReplicationConnectionIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/connection/ReplicationConnectionIT.java similarity index 98% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/connection/ReplicationConnectionIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/connection/ReplicationConnectionIT.java index 6c76313388f..bb796ca011a 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/connection/ReplicationConnectionIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/connection/ReplicationConnectionIT.java @@ -4,7 +4,7 @@ * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.connection; +package io.debezium.connector.postgresql.connection; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; @@ -33,11 +33,11 @@ import org.slf4j.LoggerFactory; import io.debezium.DebeziumException; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; -import io.debezium.connector.yb.postgresql.TestHelper; -import io.debezium.connector.yb.postgresql.junit.SkipTestDependingOnDecoderPluginNameRule; -import io.debezium.connector.yb.postgresql.junit.SkipWhenDecoderPluginNameIs; -import io.debezium.connector.yb.postgresql.junit.SkipWhenDecoderPluginNameIsNot; +import io.debezium.connector.postgresql.PostgresConnectorConfig; +import io.debezium.connector.postgresql.TestHelper; +import io.debezium.connector.postgresql.junit.SkipTestDependingOnDecoderPluginNameRule; +import io.debezium.connector.postgresql.junit.SkipWhenDecoderPluginNameIs; +import io.debezium.connector.postgresql.junit.SkipWhenDecoderPluginNameIsNot; import io.debezium.doc.FixFor; import io.debezium.jdbc.JdbcConnection.ResultSetMapper; import io.debezium.junit.TestLogger; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/junit/PostgresDatabaseVersionResolver.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/junit/PostgresDatabaseVersionResolver.java similarity index 84% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/junit/PostgresDatabaseVersionResolver.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/junit/PostgresDatabaseVersionResolver.java index 82143f59f9f..9aecf37f354 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/junit/PostgresDatabaseVersionResolver.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/junit/PostgresDatabaseVersionResolver.java @@ -3,13 +3,13 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.junit; +package io.debezium.connector.postgresql.junit; import java.sql.DatabaseMetaData; import java.sql.SQLException; -import io.debezium.connector.yb.postgresql.TestHelper; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection; +import io.debezium.connector.postgresql.TestHelper; +import io.debezium.connector.postgresql.connection.PostgresConnection; import io.debezium.junit.DatabaseVersionResolver; /** diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/junit/SkipTestDependingOnDecoderPluginNameRule.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/junit/SkipTestDependingOnDecoderPluginNameRule.java similarity index 94% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/junit/SkipTestDependingOnDecoderPluginNameRule.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/junit/SkipTestDependingOnDecoderPluginNameRule.java index e6249a1842f..78a75643db1 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/junit/SkipTestDependingOnDecoderPluginNameRule.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/junit/SkipTestDependingOnDecoderPluginNameRule.java @@ -3,12 +3,12 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.junit; +package io.debezium.connector.postgresql.junit; import org.junit.runner.Description; import org.junit.runners.model.Statement; -import io.debezium.connector.yb.postgresql.TestHelper; +import io.debezium.connector.postgresql.TestHelper; import io.debezium.junit.AnnotationBasedTestRule; /** diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/junit/SkipWhenDecoderPluginNameIs.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/junit/SkipWhenDecoderPluginNameIs.java similarity index 96% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/junit/SkipWhenDecoderPluginNameIs.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/junit/SkipWhenDecoderPluginNameIs.java index a9bd05c5a7b..2613beeab0d 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/junit/SkipWhenDecoderPluginNameIs.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/junit/SkipWhenDecoderPluginNameIs.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.junit; +package io.debezium.connector.postgresql.junit; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/junit/SkipWhenDecoderPluginNameIsNot.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/junit/SkipWhenDecoderPluginNameIsNot.java similarity index 96% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/junit/SkipWhenDecoderPluginNameIsNot.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/junit/SkipWhenDecoderPluginNameIsNot.java index b9b01747fc0..1ac27cc7b9e 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/junit/SkipWhenDecoderPluginNameIsNot.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/junit/SkipWhenDecoderPluginNameIsNot.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.junit; +package io.debezium.connector.postgresql.junit; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/rest/DebeziumPostgresConnectorResourceIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceIT.java similarity index 97% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/rest/DebeziumPostgresConnectorResourceIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceIT.java index 951b501e35e..5b0f17e4520 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/rest/DebeziumPostgresConnectorResourceIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceIT.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.rest; +package io.debezium.connector.postgresql.rest; import static io.debezium.testing.testcontainers.testhelper.RestExtensionTestInfrastructure.DATABASE; import static io.restassured.RestAssured.given; @@ -14,17 +14,15 @@ import java.util.Locale; import java.util.Map; -import io.debezium.connector.yb.postgresql.rest.DebeziumPostgresConnectRestExtension; -import io.debezium.connector.yb.postgresql.rest.DebeziumPostgresConnectorResource; import org.junit.After; import org.junit.Assume; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import io.debezium.connector.yb.postgresql.Module; -import io.debezium.connector.yb.postgresql.PostgresConnector; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; +import io.debezium.connector.postgresql.Module; +import io.debezium.connector.postgresql.PostgresConnector; +import io.debezium.connector.postgresql.PostgresConnectorConfig; import io.debezium.testing.testcontainers.Connector; import io.debezium.testing.testcontainers.ConnectorConfiguration; import io.debezium.testing.testcontainers.testhelper.RestExtensionTestInfrastructure; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/rest/DebeziumPostgresConnectorResourceNoDatabaseIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceNoDatabaseIT.java similarity index 89% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/rest/DebeziumPostgresConnectorResourceNoDatabaseIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceNoDatabaseIT.java index cad6a10e686..c9d7a8bc7c6 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/rest/DebeziumPostgresConnectorResourceNoDatabaseIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceNoDatabaseIT.java @@ -3,23 +3,21 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.rest; +package io.debezium.connector.postgresql.rest; import static io.debezium.testing.testcontainers.testhelper.RestExtensionTestInfrastructure.DATABASE; import static io.restassured.RestAssured.given; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.Matchers.hasKey; -import io.debezium.connector.yb.postgresql.rest.DebeziumPostgresConnectRestExtension; -import io.debezium.connector.yb.postgresql.rest.DebeziumPostgresConnectorResource; import org.junit.After; import org.junit.Assume; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import io.debezium.connector.yb.postgresql.Module; -import io.debezium.connector.yb.postgresql.PostgresConnector; +import io.debezium.connector.postgresql.Module; +import io.debezium.connector.postgresql.PostgresConnector; import io.debezium.testing.testcontainers.testhelper.RestExtensionTestInfrastructure; public class DebeziumPostgresConnectorResourceNoDatabaseIT { diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/spi/CustomActionProvider.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/spi/CustomActionProvider.java similarity index 97% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/spi/CustomActionProvider.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/spi/CustomActionProvider.java index fb0b0ae3017..9e7a2c2ee23 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/spi/CustomActionProvider.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/spi/CustomActionProvider.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.spi; +package io.debezium.connector.postgresql.spi; import java.util.Map; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TestMetadata.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TestMetadata.java similarity index 88% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TestMetadata.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TestMetadata.java index f4e66203e18..63ac6516bfc 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TestMetadata.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TestMetadata.java @@ -3,13 +3,12 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.transforms.timescaledb; +package io.debezium.connector.postgresql.transforms.timescaledb; import java.io.IOException; import java.util.Optional; import io.debezium.config.Configuration; -import io.debezium.connector.yb.postgresql.transforms.timescaledb.AbstractTimescaleDbMetadata; import io.debezium.relational.TableId; public class TestMetadata extends AbstractTimescaleDbMetadata { diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDbDatabaseTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbDatabaseTest.java similarity index 94% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDbDatabaseTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbDatabaseTest.java index ae760223fdd..87724c29914 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDbDatabaseTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbDatabaseTest.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.transforms.timescaledb; +package io.debezium.connector.postgresql.transforms.timescaledb; import static org.assertj.core.api.Assertions.assertThat; @@ -19,11 +19,11 @@ import org.testcontainers.lifecycle.Startables; import io.debezium.config.Configuration; -import io.debezium.connector.yb.postgresql.PostgresConnector; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig; -import io.debezium.connector.yb.postgresql.PostgresConnectorConfig.SnapshotMode; -import io.debezium.connector.yb.postgresql.TestHelper; -import io.debezium.connector.yb.postgresql.connection.PostgresConnection; +import io.debezium.connector.postgresql.PostgresConnector; +import io.debezium.connector.postgresql.PostgresConnectorConfig; +import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; +import io.debezium.connector.postgresql.TestHelper; +import io.debezium.connector.postgresql.connection.PostgresConnection; import io.debezium.embedded.AbstractConnectorTest; import io.debezium.testing.testcontainers.ImageNames; import io.debezium.util.Testing; diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDbTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbTest.java similarity index 98% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDbTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbTest.java index 073004d8e1f..4f14b5241b7 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/yb/postgresql/transforms/timescaledb/TimescaleDbTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbTest.java @@ -3,7 +3,7 @@ * * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 */ -package io.debezium.connector.yb.postgresql.transforms.timescaledb; +package io.debezium.connector.postgresql.transforms.timescaledb; import static org.assertj.core.api.Assertions.assertThat; diff --git a/debezium-connector-postgres/src/test/resources/META-INF/services/io.debezium.pipeline.signal.actions.SignalActionProvider b/debezium-connector-postgres/src/test/resources/META-INF/services/io.debezium.pipeline.signal.actions.SignalActionProvider index e6f4fa306ca..ce1c76b5d4c 100644 --- a/debezium-connector-postgres/src/test/resources/META-INF/services/io.debezium.pipeline.signal.actions.SignalActionProvider +++ b/debezium-connector-postgres/src/test/resources/META-INF/services/io.debezium.pipeline.signal.actions.SignalActionProvider @@ -1 +1 @@ -io.debezium.connector.yb.postgresql.spi.CustomActionProvider \ No newline at end of file +io.debezium.connector.postgresql.spi.CustomActionProvider \ No newline at end of file diff --git a/debezium-connector-postgres/src/test/resources/logback-test.xml b/debezium-connector-postgres/src/test/resources/logback-test.xml index de49babc671..c2bf2d54754 100644 --- a/debezium-connector-postgres/src/test/resources/logback-test.xml +++ b/debezium-connector-postgres/src/test/resources/logback-test.xml @@ -35,7 +35,7 @@ From 33faa2d4f37a93d485d8b954d49160737bd4b5a9 Mon Sep 17 00:00:00 2001 From: Vaibhav Kushwaha Date: Tue, 2 Jul 2024 09:41:18 +0530 Subject: [PATCH 09/15] changed main class name --- .../postgresql/PostgresConnectorConfig.java | 2 +- .../postgresql/PostgresConnectorTask.java | 4 +- .../postgresql/PostgresErrorHandler.java | 2 +- .../connector/postgresql/PostgresSchema.java | 2 +- .../PostgresStreamingChangeEventSource.java | 5 +- .../postgresql/ReplicaIdentityMapper.java | 2 +- ...onnector.java => YBPostgresConnector.java} | 6 +- .../metadata/PostgresConnectorMetadata.java | 4 +- .../DebeziumPostgresConnectorResource.java | 8 +- ...pache.kafka.connect.source.SourceConnector | 2 +- .../postgresql/BlockingSnapshotIT.java | 4 +- .../postgresql/CloudEventsConverterIT.java | 8 +- .../postgresql/CustomTestSnapshot.java | 2 +- .../postgresql/DebeziumEngineIT.java | 8 +- .../connector/postgresql/DomainTypesIT.java | 4 +- .../postgresql/IncrementalSnapshotIT.java | 6 +- .../postgresql/LogicalDecodingMessageIT.java | 12 +- .../connector/postgresql/NotificationsIT.java | 6 +- .../postgresql/OutboxEventRouterIT.java | 8 +- .../PostgresDefaultValueConverterIT.java | 6 +- .../postgresql/PostgresMetricsIT.java | 12 +- .../connector/postgresql/PostgresMoneyIT.java | 8 +- .../PostgresReselectColumnsProcessorIT.java | 8 +- .../postgresql/PostgresShutdownIT.java | 4 +- ...gresSkipMessagesWithoutChangeConfigIT.java | 8 +- .../postgresql/PublicGeometryIT.java | 2 +- .../postgresql/RecordsSnapshotProducerIT.java | 6 +- .../postgresql/RecordsStreamProducerIT.java | 2 +- .../connector/postgresql/SignalsIT.java | 10 +- .../SnapshotWithOverridesProducerIT.java | 2 +- .../postgresql/TablesWithoutPrimaryKeyIT.java | 8 +- .../postgresql/TransactionMetadataIT.java | 2 +- ... => YBPostgresConnectorConfigDefTest.java} | 6 +- ...ctorIT.java => YBPostgresConnectorIT.java} | 260 +++++++++--------- ...IT.java => YBPostgresConnectorTaskIT.java} | 2 +- .../postgresql/YugabyteReplicaIdentityIT.java | 16 +- ...ebeziumYBPostgresConnectorResourceIT.java} | 8 +- ...ostgresConnectorResourceNoDatabaseIT.java} | 8 +- .../timescaledb/TimescaleDbDatabaseTest.java | 8 +- .../src/test/resources/logback-test.xml | 2 +- 40 files changed, 241 insertions(+), 242 deletions(-) rename debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/{PostgresConnector.java => YBPostgresConnector.java} (98%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/{PostgresConnectorConfigDefTest.java => YBPostgresConnectorConfigDefTest.java} (92%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/{PostgresConnectorIT.java => YBPostgresConnectorIT.java} (95%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/{PostgresConnectorTaskIT.java => YBPostgresConnectorTaskIT.java} (98%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/{DebeziumPostgresConnectorResourceIT.java => DebeziumYBPostgresConnectorResourceIT.java} (97%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/{DebeziumPostgresConnectorResourceNoDatabaseIT.java => DebeziumYBPostgresConnectorResourceNoDatabaseIT.java} (89%) diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorConfig.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorConfig.java index a8273a86a26..ea01ec38075 100755 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorConfig.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorConfig.java @@ -54,7 +54,7 @@ import io.debezium.util.Strings; /** - * The configuration properties for the {@link PostgresConnector} + * The configuration properties for the {@link YBPostgresConnector} * * @author Horia Chiorean */ diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorTask.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorTask.java index 9921cdeaff0..894c66af6bd 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorTask.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorTask.java @@ -195,7 +195,7 @@ public ChangeEventSourceCoordinator st final PostgresEventMetadataProvider metadataProvider = new PostgresEventMetadataProvider(); SignalProcessor signalProcessor = new SignalProcessor<>( - PostgresConnector.class, connectorConfig, Map.of(), + YBPostgresConnector.class, connectorConfig, Map.of(), getAvailableSignalChannels(), DocumentReader.defaultReader(), previousOffsets); @@ -235,7 +235,7 @@ public ChangeEventSourceCoordinator st ChangeEventSourceCoordinator coordinator = new PostgresChangeEventSourceCoordinator( previousOffsets, errorHandler, - PostgresConnector.class, + YBPostgresConnector.class, connectorConfig, new PostgresChangeEventSourceFactory( connectorConfig, diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresErrorHandler.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresErrorHandler.java index 472fb5ffb52..d8dc145b1ec 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresErrorHandler.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresErrorHandler.java @@ -21,7 +21,7 @@ public class PostgresErrorHandler extends ErrorHandler { public PostgresErrorHandler(PostgresConnectorConfig connectorConfig, ChangeEventQueue queue, ErrorHandler replacedErrorHandler) { - super(PostgresConnector.class, connectorConfig, queue, replacedErrorHandler); + super(YBPostgresConnector.class, connectorConfig, queue, replacedErrorHandler); } @Override diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSchema.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSchema.java index d94bace57dd..a26c6599588 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSchema.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSchema.java @@ -32,7 +32,7 @@ import io.debezium.spi.topic.TopicNamingStrategy; /** - * Component that records the schema information for the {@link PostgresConnector}. The schema information contains + * Component that records the schema information for the {@link YBPostgresConnector}. The schema information contains * the {@link Tables table definitions} and the Kafka Connect {@link #schemaFor(TableId) Schema}s for each table, where the * {@link Schema} excludes any columns that have been {@link PostgresConnectorConfig#COLUMN_EXCLUDE_LIST specified} in the * configuration. diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresStreamingChangeEventSource.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresStreamingChangeEventSource.java index 60897163b14..28702a20cb0 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresStreamingChangeEventSource.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresStreamingChangeEventSource.java @@ -11,7 +11,6 @@ import java.util.OptionalLong; import java.util.concurrent.atomic.AtomicReference; -import io.debezium.connector.postgresql.connection.*; import org.apache.kafka.connect.errors.ConnectException; import com.yugabyte.core.BaseConnection; import org.slf4j.Logger; @@ -166,7 +165,7 @@ public void execute(ChangeEventSourceContext context, PostgresPartition partitio // such that the connection times out. We must enable keep // alive to ensure that it doesn't time out ReplicationStream stream = this.replicationStream.get(); - stream.startKeepAlive(Threads.newSingleThreadExecutor(PostgresConnector.class, connectorConfig.getLogicalName(), KEEP_ALIVE_THREAD_NAME)); + stream.startKeepAlive(Threads.newSingleThreadExecutor(YBPostgresConnector.class, connectorConfig.getLogicalName(), KEEP_ALIVE_THREAD_NAME)); initSchema(); @@ -201,7 +200,7 @@ public void execute(ChangeEventSourceContext context, PostgresPartition partitio replicationStream.set(replicationConnection.startStreaming(walPosition.getLastEventStoredLsn(), walPosition)); stream = this.replicationStream.get(); - stream.startKeepAlive(Threads.newSingleThreadExecutor(PostgresConnector.class, connectorConfig.getLogicalName(), KEEP_ALIVE_THREAD_NAME)); + stream.startKeepAlive(Threads.newSingleThreadExecutor(YBPostgresConnector.class, connectorConfig.getLogicalName(), KEEP_ALIVE_THREAD_NAME)); } } else { LOGGER.info("Connector config provide.transaction.metadata is set to true. Therefore, skip records filtering in order to ship entire transactions."); diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/ReplicaIdentityMapper.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/ReplicaIdentityMapper.java index 0f7ab45e540..9b93e4d7520 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/ReplicaIdentityMapper.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/ReplicaIdentityMapper.java @@ -21,7 +21,7 @@ import io.debezium.relational.TableId; /** - * Class that records Replica Identity information for the {@link PostgresConnector} + * Class that records Replica Identity information for the {@link YBPostgresConnector} * @author Ben White, Miguel Sotomayor */ @Immutable diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnector.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YBPostgresConnector.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnector.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YBPostgresConnector.java index dabbb3f7ef8..850d544706f 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnector.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YBPostgresConnector.java @@ -36,12 +36,12 @@ * * @author Horia Chiorean */ -public class PostgresConnector extends RelationalBaseSourceConnector { +public class YBPostgresConnector extends RelationalBaseSourceConnector { - private static final Logger LOGGER = LoggerFactory.getLogger(PostgresConnector.class); + private static final Logger LOGGER = LoggerFactory.getLogger(YBPostgresConnector.class); private Map props; - public PostgresConnector() { + public YBPostgresConnector() { } @Override diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/metadata/PostgresConnectorMetadata.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/metadata/PostgresConnectorMetadata.java index 02879619214..66801d25874 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/metadata/PostgresConnectorMetadata.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/metadata/PostgresConnectorMetadata.java @@ -7,7 +7,7 @@ import io.debezium.config.Field; import io.debezium.connector.postgresql.Module; -import io.debezium.connector.postgresql.PostgresConnector; +import io.debezium.connector.postgresql.YBPostgresConnector; import io.debezium.connector.postgresql.PostgresConnectorConfig; import io.debezium.metadata.ConnectorDescriptor; import io.debezium.metadata.ConnectorMetadata; @@ -16,7 +16,7 @@ public class PostgresConnectorMetadata implements ConnectorMetadata { @Override public ConnectorDescriptor getConnectorDescriptor() { - return new ConnectorDescriptor("postgres", "Debezium PostgreSQL Connector", PostgresConnector.class.getName(), Module.version()); + return new ConnectorDescriptor("postgres", "Debezium PostgreSQL Connector", YBPostgresConnector.class.getName(), Module.version()); } @Override diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResource.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResource.java index 16e0ee9d8ff..1a854745a54 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResource.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResource.java @@ -16,11 +16,11 @@ import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; +import io.debezium.connector.postgresql.YBPostgresConnector; import org.apache.kafka.connect.health.ConnectClusterState; import io.debezium.config.Configuration; import io.debezium.connector.postgresql.Module; -import io.debezium.connector.postgresql.PostgresConnector; import io.debezium.rest.ConnectionValidationResource; import io.debezium.rest.FilterValidationResource; import io.debezium.rest.MetricsResource; @@ -36,7 +36,7 @@ @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public class DebeziumPostgresConnectorResource - implements SchemaResource, ConnectionValidationResource, FilterValidationResource, MetricsResource { + implements SchemaResource, ConnectionValidationResource, FilterValidationResource, MetricsResource { public static final String BASE_PATH = "/debezium/postgres"; public static final String VERSION_ENDPOINT = "/version"; @@ -53,8 +53,8 @@ public String getConnectorVersion() { } @Override - public PostgresConnector getConnector() { - return new PostgresConnector(); + public YBPostgresConnector getConnector() { + return new YBPostgresConnector(); } @Override diff --git a/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.source.SourceConnector b/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.source.SourceConnector index 58de09f1bbf..79070ced248 100644 --- a/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.source.SourceConnector +++ b/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.source.SourceConnector @@ -1 +1 @@ -io.debezium.connector.postgresql.PostgresConnector \ No newline at end of file +io.debezium.connector.postgresql.YBPostgresConnector \ No newline at end of file diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/BlockingSnapshotIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/BlockingSnapshotIT.java index 7f5d129a0de..d48a2653367 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/BlockingSnapshotIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/BlockingSnapshotIT.java @@ -78,8 +78,8 @@ protected Configuration.Builder mutableConfig(boolean signalTableOnly, boolean s } @Override - protected Class connectorClass() { - return PostgresConnector.class; + protected Class connectorClass() { + return YBPostgresConnector.class; } @Override diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CloudEventsConverterIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CloudEventsConverterIT.java index 59d59bc2e58..bc1a0dfe143 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CloudEventsConverterIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CloudEventsConverterIT.java @@ -16,11 +16,11 @@ import io.debezium.jdbc.JdbcConnection; /** - * Integration test for {@link io.debezium.converters.CloudEventsConverter} with {@link PostgresConnector} + * Integration test for {@link io.debezium.converters.CloudEventsConverter} with {@link YBPostgresConnector} * * @author Roman Kudryashov */ -public class CloudEventsConverterIT extends AbstractCloudEventsConverterTest { +public class CloudEventsConverterIT extends AbstractCloudEventsConverterTest { private static final String SETUP_SCHEMA = "DROP SCHEMA IF EXISTS s1 CASCADE;" + "CREATE SCHEMA s1;"; @@ -51,8 +51,8 @@ public void beforeEach() throws Exception { } @Override - protected Class getConnectorClass() { - return PostgresConnector.class; + protected Class getConnectorClass() { + return YBPostgresConnector.class; } @Override diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomTestSnapshot.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomTestSnapshot.java index f5ea83d4a70..e98884d255b 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomTestSnapshot.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomTestSnapshot.java @@ -16,7 +16,7 @@ import io.debezium.relational.TableId; /** - * This is a small class used in PostgresConnectorIT to test a custom snapshot + * This is a small class used in YBPostgresConnectorIT to test a custom snapshot * * It is tightly coupled to the test there, but needs to be placed here in order * to allow for class loading to work diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DebeziumEngineIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DebeziumEngineIT.java index 8d2cae40ae1..9fe7a6f8a7e 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DebeziumEngineIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DebeziumEngineIT.java @@ -82,7 +82,7 @@ public void shouldSerializeToJson() throws Exception { final Properties props = new Properties(); props.putAll(TestHelper.defaultConfig().build().asMap()); props.setProperty("name", "debezium-engine"); - props.setProperty("connector.class", "io.debezium.connector.postgresql.PostgresConnector"); + props.setProperty("connector.class", "io.debezium.connector.postgresql.YBPostgresConnector"); props.setProperty(StandaloneConfig.OFFSET_STORAGE_FILE_FILENAME_CONFIG, OFFSET_STORE_PATH.toAbsolutePath().toString()); props.setProperty("offset.flush.interval.ms", "0"); @@ -129,7 +129,7 @@ public void shouldSerializeToAvro() throws Exception { final Properties props = new Properties(); props.putAll(TestHelper.defaultConfig().build().asMap()); props.setProperty("name", "debezium-engine"); - props.setProperty("connector.class", "io.debezium.connector.postgresql.PostgresConnector"); + props.setProperty("connector.class", "io.debezium.connector.postgresql.YBPostgresConnector"); props.setProperty(StandaloneConfig.OFFSET_STORAGE_FILE_FILENAME_CONFIG, OFFSET_STORE_PATH.toAbsolutePath().toString()); props.setProperty("offset.flush.interval.ms", "0"); @@ -169,7 +169,7 @@ public void shouldSerializeToCloudEvents() throws Exception { final Properties props = new Properties(); props.putAll(TestHelper.defaultConfig().build().asMap()); props.setProperty("name", "debezium-engine"); - props.setProperty("connector.class", "io.debezium.connector.postgresql.PostgresConnector"); + props.setProperty("connector.class", "io.debezium.connector.postgresql.YBPostgresConnector"); props.setProperty(StandaloneConfig.OFFSET_STORAGE_FILE_FILENAME_CONFIG, OFFSET_STORE_PATH.toAbsolutePath().toString()); props.setProperty("offset.flush.interval.ms", "0"); @@ -244,7 +244,7 @@ public void testOffsetsCommitAfterStop() throws Exception { final Properties props = new Properties(); props.putAll(TestHelper.defaultConfig().build().asMap()); props.setProperty("name", "debezium-engine"); - props.setProperty("connector.class", "io.debezium.connector.postgresql.PostgresConnector"); + props.setProperty("connector.class", "io.debezium.connector.postgresql.YBPostgresConnector"); props.setProperty(StandaloneConfig.OFFSET_STORAGE_FILE_FILENAME_CONFIG, OFFSET_STORE_PATH.toAbsolutePath().toString()); props.setProperty("offset.flush.interval.ms", "3000"); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DomainTypesIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DomainTypesIT.java index fc78d6e9fb3..08e299268cc 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DomainTypesIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DomainTypesIT.java @@ -43,7 +43,7 @@ public void before() throws SQLException { @Test @FixFor("DBZ-3657") public void shouldNotChokeOnDomainTypeInArray() throws Exception { - start(PostgresConnector.class, TestHelper.defaultConfig() + start(YBPostgresConnector.class, TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER) .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "domaintypes") .build()); @@ -63,7 +63,7 @@ public void shouldNotChokeOnDomainTypeInArray() throws Exception { @Test @FixFor("DBZ-3657") public void shouldExportDomainTypeInArrayAsUnknown() throws Exception { - start(PostgresConnector.class, TestHelper.defaultConfig() + start(YBPostgresConnector.class, TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER) .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "domaintypes") .with(PostgresConnectorConfig.INCLUDE_UNKNOWN_DATATYPES, true) diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/IncrementalSnapshotIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/IncrementalSnapshotIT.java index 57f6ce31180..dbd5fa7573e 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/IncrementalSnapshotIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/IncrementalSnapshotIT.java @@ -41,7 +41,7 @@ import io.debezium.util.Collect; import io.debezium.util.Testing; -public class IncrementalSnapshotIT extends AbstractIncrementalSnapshotTest { +public class IncrementalSnapshotIT extends AbstractIncrementalSnapshotTest { private static final Logger LOGGER = LoggerFactory.getLogger(IncrementalSnapshotIT.class); @@ -134,8 +134,8 @@ protected Configuration.Builder mutableConfig(boolean signalTableOnly, boolean s } @Override - protected Class connectorClass() { - return PostgresConnector.class; + protected Class connectorClass() { + return YBPostgresConnector.class; } @Override diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/LogicalDecodingMessageIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/LogicalDecodingMessageIT.java index f5a28ac5622..4fdd7c3d02b 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/LogicalDecodingMessageIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/LogicalDecodingMessageIT.java @@ -76,7 +76,7 @@ public void shouldNotConsumeLogicalDecodingMessagesWhenAllPrefixesAreInTheExclud TestHelper.execute(SETUP_TABLES_STMT); Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.LOGICAL_DECODING_MESSAGE_PREFIX_EXCLUDE_LIST, ".*"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -99,7 +99,7 @@ public void shouldConsumeNonTransactionalLogicalDecodingMessages() throws Except TestHelper.execute(SETUP_TABLES_STMT); Configuration.Builder configBuilder = TestHelper.defaultConfig(); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -138,7 +138,7 @@ public void shouldConsumeTransactionalLogicalDecodingMessages() throws Exception TestHelper.execute(SETUP_TABLES_STMT); Configuration.Builder configBuilder = TestHelper.defaultConfig(); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -180,7 +180,7 @@ public void shouldApplyBinaryHandlingMode() throws Exception { Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.BINARY_HANDLING_MODE, "base64"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -206,7 +206,7 @@ public void shouldNotConsumeLogicalDecodingMessagesWithExcludedPrefixes() throws TestHelper.execute(SETUP_TABLES_STMT); Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.LOGICAL_DECODING_MESSAGE_PREFIX_EXCLUDE_LIST, "excluded_prefix, prefix:excluded"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -232,7 +232,7 @@ public void shouldOnlyConsumeLogicalDecodingMessagesWithIncludedPrefixes() throw TestHelper.execute(SETUP_TABLES_STMT); Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.LOGICAL_DECODING_MESSAGE_PREFIX_INCLUDE_LIST, "included_prefix, prefix:included, ano.*er_included"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/NotificationsIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/NotificationsIT.java index 8c6d01c4167..5c58c04b244 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/NotificationsIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/NotificationsIT.java @@ -14,7 +14,7 @@ import io.debezium.config.Configuration; import io.debezium.pipeline.notification.AbstractNotificationsIT; -public class NotificationsIT extends AbstractNotificationsIT { +public class NotificationsIT extends AbstractNotificationsIT { @Before public void before() throws SQLException { @@ -31,8 +31,8 @@ public void after() { } @Override - protected Class connectorClass() { - return PostgresConnector.class; + protected Class connectorClass() { + return YBPostgresConnector.class; } @Override diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/OutboxEventRouterIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/OutboxEventRouterIT.java index 25a9f024181..3f80d19baba 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/OutboxEventRouterIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/OutboxEventRouterIT.java @@ -19,11 +19,11 @@ import io.debezium.transforms.outbox.AbstractEventRouterTest; /** - * Integration test for {@link io.debezium.transforms.outbox.EventRouter} with {@link PostgresConnector} + * Integration test for {@link io.debezium.transforms.outbox.EventRouter} with {@link YBPostgresConnector} * * @author Renato Mefi (gh@mefi.in) */ -public class OutboxEventRouterIT extends AbstractEventRouterTest { +public class OutboxEventRouterIT extends AbstractEventRouterTest { private static final String SETUP_OUTBOX_SCHEMA = "DROP SCHEMA IF EXISTS outboxsmtit CASCADE;" + "CREATE SCHEMA outboxsmtit;"; @@ -47,8 +47,8 @@ public void beforeEach() throws Exception { } @Override - protected Class getConnectorClass() { - return PostgresConnector.class; + protected Class getConnectorClass() { + return YBPostgresConnector.class; } @Override diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresDefaultValueConverterIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresDefaultValueConverterIT.java index 77302cae90d..49ae37a7524 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresDefaultValueConverterIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresDefaultValueConverterIT.java @@ -52,7 +52,7 @@ public void shouldSetTheNullValueInSnapshot() throws Exception { Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.getValue()) .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "s1"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted("postgres", TestHelper.TEST_SERVER); @@ -69,7 +69,7 @@ public void shouldSetTheNullValueInStreaming() throws Exception { Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.getValue()) .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "s1"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted("postgres", TestHelper.TEST_SERVER); @@ -99,7 +99,7 @@ public void testShouldHandleDefaultValueFunctionsWithSchemaPrefixes() throws Exc TestHelper.execute(ddl); Configuration config = TestHelper.defaultConfig().build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMetricsIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMetricsIT.java index 7ff4d50f290..7afb9c95624 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMetricsIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMetricsIT.java @@ -59,7 +59,7 @@ public void after() throws Exception { @Test public void testLifecycle() throws Exception { // start connector - start(PostgresConnector.class, + start(YBPostgresConnector.class, TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.ALWAYS) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) @@ -100,7 +100,7 @@ public void testSnapshotOnlyMetrics() throws Exception { TestHelper.execute(INIT_STATEMENTS, INSERT_STATEMENTS); // start connector - start(PostgresConnector.class, + start(YBPostgresConnector.class, TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) @@ -115,7 +115,7 @@ public void testSnapshotAndStreamingMetrics() throws Exception { TestHelper.execute(INIT_STATEMENTS, INSERT_STATEMENTS); // start connector - start(PostgresConnector.class, + start(YBPostgresConnector.class, TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.ALWAYS) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) @@ -138,7 +138,7 @@ public void testSnapshotAndStreamingWithCustomMetrics() throws Exception { .with(PostgresConnectorConfig.CUSTOM_METRIC_TAGS, "env=test,bu=bigdata") .build(); Map customMetricTags = new PostgresConnectorConfig(config).getCustomMetricTags(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertSnapshotWithCustomMetrics(customMetricTags); assertStreamingWithCustomMetrics(customMetricTags); @@ -150,7 +150,7 @@ public void testStreamingOnlyMetrics() throws Exception { TestHelper.execute(INIT_STATEMENTS); // start connector - start(PostgresConnector.class, + start(YBPostgresConnector.class, TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) @@ -275,7 +275,7 @@ public void oneRecordInQueue() throws Exception { .with(PostgresConnectorConfig.MAX_BATCH_SIZE, 1) .with(PostgresConnectorConfig.POLL_INTERVAL_MS, 100L) .with(PostgresConnectorConfig.MAX_QUEUE_SIZE_IN_BYTES, 10000L); - start(PostgresConnector.class, configBuilder.build(), loggingCompletion(), null, x -> { + start(YBPostgresConnector.class, configBuilder.build(), loggingCompletion(), null, x -> { LOGGER.info("Record '{}' arrived", x); step1.countDown(); try { diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMoneyIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMoneyIT.java index 2d7192e414c..38b9058655b 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMoneyIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMoneyIT.java @@ -51,7 +51,7 @@ public void shouldReceiveChangesForInsertsWithPreciseMode() throws Exception { Configuration config = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); // insert 2 records for testing @@ -77,7 +77,7 @@ public void shouldReceiveChangesForInsertsWithStringMode() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER) .with(PostgresConnectorConfig.DECIMAL_HANDLING_MODE, "string") .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); // insert 2 records for testing @@ -103,7 +103,7 @@ public void shouldReceiveChangesForInsertsWithDoubleMode() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER) .with(PostgresConnectorConfig.DECIMAL_HANDLING_MODE, "double") .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); // insert 2 records for testing @@ -128,7 +128,7 @@ public void shouldReceiveChangesForInsertNullAndZeroMoney() throws Exception { Configuration config = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); // insert 2 records for testing diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresReselectColumnsProcessorIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresReselectColumnsProcessorIT.java index a3548342e69..b917a9eb258 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresReselectColumnsProcessorIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresReselectColumnsProcessorIT.java @@ -30,7 +30,7 @@ * * @author Chris Cranford */ -public class PostgresReselectColumnsProcessorIT extends AbstractReselectProcessorTest { +public class PostgresReselectColumnsProcessorIT extends AbstractReselectProcessorTest { public static final String CREATE_STMT = "DROP SCHEMA IF EXISTS s1 CASCADE;" + "CREATE SCHEMA s1; "; @@ -53,8 +53,8 @@ public void afterEach() throws Exception { } @Override - protected Class getConnectorClass() { - return PostgresConnector.class; + protected Class getConnectorClass() { + return YBPostgresConnector.class; } @Override @@ -120,7 +120,7 @@ public void testToastColumnReselectedWhenValueIsUnavailable() throws Exception { .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s1\\.dbz4321_toast") .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); waitForStreamingStarted(); final String text = RandomStringUtils.randomAlphabetic(10000); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresShutdownIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresShutdownIT.java index 92420fa6d9b..1817e6ea6b8 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresShutdownIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresShutdownIT.java @@ -34,7 +34,7 @@ import io.debezium.util.Testing; /** - * Integration test for {@link PostgresConnector} using an {@link EmbeddedEngine} and Testcontainers infrastructure for when Postgres is shutdown during streaming + * Integration test for {@link YBPostgresConnector} using an {@link EmbeddedEngine} and Testcontainers infrastructure for when Postgres is shutdown during streaming */ public class PostgresShutdownIT extends AbstractConnectorTest { @@ -114,7 +114,7 @@ public void shouldStopOnPostgresFastShutdown() throws Exception { String initialHeartbeat = postgresConnection.queryAndMap( "SELECT ts FROM s1.heartbeat;", postgresConnection.singleResultMapper(rs -> rs.getString("ts"), "Could not fetch keepalive info")); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted("postgres", TestHelper.TEST_SERVER); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresSkipMessagesWithoutChangeConfigIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresSkipMessagesWithoutChangeConfigIT.java index 1b4fef818a4..2bae1d45796 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresSkipMessagesWithoutChangeConfigIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresSkipMessagesWithoutChangeConfigIT.java @@ -58,7 +58,7 @@ public void shouldSkipEventsWithNoChangeInIncludedColumnsWhenSkipEnabled() throw .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); TestHelper.execute("INSERT INTO updates_test.debezium_test (id,white,black) VALUES (1,1,1);"); @@ -98,7 +98,7 @@ public void shouldSkipEventsWithNoChangeInIncludedColumnsWhenSkipEnabledWithExcl .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); TestHelper.execute("INSERT INTO updates_test.debezium_test (id,white,black) VALUES (1,1,1);"); @@ -136,7 +136,7 @@ public void shouldNotSkipEventsWithNoChangeInIncludedColumnsWhenSkipEnabledButTa .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); TestHelper.execute("INSERT INTO updates_test.debezium_test (id,white,black) VALUES (1,1,1);"); @@ -177,7 +177,7 @@ public void shouldNotSkipEventsWithNoChangeInIncludedColumnsWhenSkipDisabled() t .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); TestHelper.execute("INSERT INTO updates_test.debezium_test (id,white,black) VALUES (1,1,1);"); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PublicGeometryIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PublicGeometryIT.java index 624fbcd4620..454e8af3cd6 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PublicGeometryIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PublicGeometryIT.java @@ -90,7 +90,7 @@ public void shouldReceiveChangesForInsertsWithPostgisTypes() throws Exception { } private void setupRecordsProducer(Configuration.Builder config) { - start(PostgresConnector.class, config + start(YBPostgresConnector.class, config .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER) .build()); assertConnectorIsRunning(); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/RecordsSnapshotProducerIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/RecordsSnapshotProducerIT.java index e6a4a651195..44146d33241 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/RecordsSnapshotProducerIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/RecordsSnapshotProducerIT.java @@ -1218,7 +1218,7 @@ public void shouldIncludePartitionedTableIntoSnapshot() throws Exception { Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY.getValue()) .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s1.part"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -1256,7 +1256,7 @@ public void shouldGenerateSnapshotWhenSignalDataCollectionIsPresentWithoutTableI private void buildNoStreamProducer(Configuration.Builder config) { alterConfig(config); - start(PostgresConnector.class, config + start(YBPostgresConnector.class, config .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY) .with(PostgresConnectorConfig.SNAPSHOT_MODE_CLASS, CustomTestSnapshot.class.getName()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) @@ -1266,7 +1266,7 @@ private void buildNoStreamProducer(Configuration.Builder config) { private void buildWithStreamProducer(Configuration.Builder config) { alterConfig(config); - start(PostgresConnector.class, config + start(YBPostgresConnector.class, config .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.ALWAYS) .with(PostgresConnectorConfig.SNAPSHOT_MODE_CLASS, CustomTestSnapshot.class.getName()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/RecordsStreamProducerIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/RecordsStreamProducerIT.java index 2bff1f17ad6..ea4611af835 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/RecordsStreamProducerIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/RecordsStreamProducerIT.java @@ -150,7 +150,7 @@ public void before() throws Exception { private void startConnector(Function customConfig, boolean waitForSnapshot, Predicate isStopRecord) throws InterruptedException { - start(PostgresConnector.class, new PostgresConnectorConfig(customConfig.apply(TestHelper.defaultConfig() + start(YBPostgresConnector.class, new PostgresConnectorConfig(customConfig.apply(TestHelper.defaultConfig() .with(PostgresConnectorConfig.INCLUDE_UNKNOWN_DATATYPES, false) .with(PostgresConnectorConfig.SCHEMA_EXCLUDE_LIST, "postgis") .with(PostgresConnectorConfig.SNAPSHOT_MODE, waitForSnapshot ? SnapshotMode.INITIAL : SnapshotMode.NEVER)) diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SignalsIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SignalsIT.java index 68090504f21..c081b44f401 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SignalsIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SignalsIT.java @@ -70,7 +70,7 @@ public void signalLog() throws InterruptedException { .with(PostgresConnectorConfig.SIGNAL_DATA_COLLECTION, "s1.debezium_signal") .with(CommonConnectorConfig.SIGNAL_POLL_INTERVAL_MS, "500") .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); TestHelper.waitForDefaultReplicationSlotBeActive(); @@ -105,7 +105,7 @@ public void signalingDisabled() throws InterruptedException { .with(CommonConnectorConfig.SIGNAL_POLL_INTERVAL_MS, "500") .with(CommonConnectorConfig.SIGNAL_ENABLED_CHANNELS, "") .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); TestHelper.waitForDefaultReplicationSlotBeActive(); @@ -138,7 +138,7 @@ public void signalSchemaChange() throws InterruptedException { .with(PostgresConnectorConfig.SIGNAL_DATA_COLLECTION, "s1.debezium_signal") .with(CommonConnectorConfig.SIGNAL_POLL_INTERVAL_MS, "500") .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); TestHelper.waitForDefaultReplicationSlotBeActive(); @@ -218,7 +218,7 @@ public void jmxSignals() throws Exception { .with(CommonConnectorConfig.SIGNAL_POLL_INTERVAL_MS, "500") .with(CommonConnectorConfig.SIGNAL_ENABLED_CHANNELS, "jmx") .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); TestHelper.waitForDefaultReplicationSlotBeActive(); @@ -244,7 +244,7 @@ public void customAction() throws Exception { .with(CommonConnectorConfig.SIGNAL_POLL_INTERVAL_MS, "500") .with(CommonConnectorConfig.SIGNAL_ENABLED_CHANNELS, "jmx") .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); TestHelper.waitForDefaultReplicationSlotBeActive(); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SnapshotWithOverridesProducerIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SnapshotWithOverridesProducerIT.java index 60b654e387b..0beef910bdd 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SnapshotWithOverridesProducerIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SnapshotWithOverridesProducerIT.java @@ -86,7 +86,7 @@ public void shouldUseMultipleOverriddenSelectStatementsDuringSnapshotting() thro } private void buildProducer(Configuration.Builder config) { - start(PostgresConnector.class, config + start(YBPostgresConnector.class, config .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY) .build()); assertConnectorIsRunning(); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TablesWithoutPrimaryKeyIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TablesWithoutPrimaryKeyIT.java index 345a989d894..3a9c451d9f9 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TablesWithoutPrimaryKeyIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TablesWithoutPrimaryKeyIT.java @@ -44,7 +44,7 @@ public void before() throws SQLException { public void shouldProcessFromSnapshot() throws Exception { TestHelper.execute(STATEMENTS); - start(PostgresConnector.class, TestHelper.defaultConfig() + start(YBPostgresConnector.class, TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY) .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "nopk") .build()); @@ -66,7 +66,7 @@ public void shouldProcessFromSnapshot() throws Exception { public void shouldProcessFromSnapshotOld() throws Exception { TestHelper.execute(STATEMENTS); - start(PostgresConnector.class, TestHelper.defaultConfig() + start(YBPostgresConnector.class, TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY) .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "nopk") .build()); @@ -86,7 +86,7 @@ public void shouldProcessFromSnapshotOld() throws Exception { @Test public void shouldProcessFromStreaming() throws Exception { - start(PostgresConnector.class, TestHelper.defaultConfig() + start(YBPostgresConnector.class, TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER) .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "nopk") .build()); @@ -125,7 +125,7 @@ public void shouldProcessFromStreaming() throws Exception { @Test public void shouldProcessFromStreamingOld() throws Exception { - start(PostgresConnector.class, TestHelper.defaultConfig() + start(YBPostgresConnector.class, TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER) .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "nopk") .build()); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TransactionMetadataIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TransactionMetadataIT.java index bd65c93c538..3ab3ba1e94c 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TransactionMetadataIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TransactionMetadataIT.java @@ -80,7 +80,7 @@ public void transactionMetadata() throws InterruptedException { .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .with(PostgresConnectorConfig.PROVIDE_TRANSACTION_METADATA, true) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); TestHelper.waitForDefaultReplicationSlotBeActive(); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorConfigDefTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YBPostgresConnectorConfigDefTest.java similarity index 92% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorConfigDefTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YBPostgresConnectorConfigDefTest.java index debbe9b8227..1ae5e9ab5a9 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorConfigDefTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YBPostgresConnectorConfigDefTest.java @@ -12,10 +12,10 @@ import io.debezium.config.ConfigDefinitionMetadataTest; import io.debezium.config.Configuration; -public class PostgresConnectorConfigDefTest extends ConfigDefinitionMetadataTest { +public class YBPostgresConnectorConfigDefTest extends ConfigDefinitionMetadataTest { - public PostgresConnectorConfigDefTest() { - super(new PostgresConnector()); + public YBPostgresConnectorConfigDefTest() { + super(new YBPostgresConnector()); } @Test diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YBPostgresConnectorIT.java similarity index 95% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YBPostgresConnectorIT.java index 818ada97539..6531ed9f732 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YBPostgresConnectorIT.java @@ -107,12 +107,12 @@ import org.slf4j.LoggerFactory; /** - * Integration test for {@link PostgresConnector} using an {@link io.debezium.engine.DebeziumEngine} + * Integration test for {@link YBPostgresConnector} using an {@link io.debezium.engine.DebeziumEngine} * * @author Horia Chiorean (hchiorea@redhat.com) */ -public class PostgresConnectorIT extends AbstractConnectorTest { - private static final Logger LOGGER = LoggerFactory.getLogger(PostgresConnectorIT.class); +public class YBPostgresConnectorIT extends AbstractConnectorTest { + private static final Logger LOGGER = LoggerFactory.getLogger(YBPostgresConnectorIT.class); /* * Specific tests that need to extend the initial DDL set should do it in a form of @@ -127,7 +127,7 @@ public class PostgresConnectorIT extends AbstractConnectorTest { "CREATE TABLE s1.a (pk SERIAL, aa integer, PRIMARY KEY(pk));" + "CREATE TABLE s2.a (pk SERIAL, aa integer, bb varchar(20), PRIMARY KEY(pk));"; protected static final String SETUP_TABLES_STMT = CREATE_TABLES_STMT + INSERT_STMT; - private PostgresConnector connector; + private YBPostgresConnector connector; @Rule public final TestRule skipName = new SkipTestDependingOnDecoderPluginNameRule(); @@ -151,7 +151,7 @@ public void after() { @Test public void shouldValidateConnectorConfigDef() { - connector = new PostgresConnector(); + connector = new YBPostgresConnector(); ConfigDef configDef = connector.config(); assertThat(configDef).isNotNull(); PostgresConnectorConfig.ALL_FIELDS.forEach(this::validateFieldDef); @@ -164,7 +164,7 @@ public void shouldNotStartWithInvalidConfiguration() throws Exception { // we expect the engine will log at least one error, so preface it ... logger.info("Attempting to start the connector with an INVALID configuration, so MULTIPLE error messages & one exceptions will appear in the log"); - start(PostgresConnector.class, config, (success, msg, error) -> { + start(YBPostgresConnector.class, config, (success, msg, error) -> { assertThat(success).isFalse(); assertThat(error).isNotNull(); }); @@ -174,7 +174,7 @@ public void shouldNotStartWithInvalidConfiguration() throws Exception { @Test public void shouldValidateMinimalConfiguration() throws Exception { Configuration config = TestHelper.defaultConfig().build(); - Config validateConfig = new PostgresConnector().validate(config.asMap()); + Config validateConfig = new YBPostgresConnector().validate(config.asMap()); validateConfig.configValues().forEach(configValue -> assertTrue("Unexpected error for: " + configValue.name(), configValue.errorMessages().isEmpty())); } @@ -193,7 +193,7 @@ public void shouldNotStartWithInvalidSlotConfigAndUserRoles() throws Exception { .with(PostgresConnectorConfig.SLOT_NAME, ReplicationConnection.Builder.DEFAULT_SLOT_NAME) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); waitForStreamingRunning(); Configuration failingConfig = TestHelper.defaultConfig() @@ -203,7 +203,7 @@ public void shouldNotStartWithInvalidSlotConfigAndUserRoles() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER) .with(PostgresConnectorConfig.SLOT_NAME, ReplicationConnection.Builder.DEFAULT_SLOT_NAME) .build(); - List validatedConfig = new PostgresConnector().validate(failingConfig.asMap()).configValues(); + List validatedConfig = new YBPostgresConnector().validate(failingConfig.asMap()).configValues(); final List invalidProperties = Collections.singletonList("database.user"); validatedConfig.forEach( @@ -218,7 +218,7 @@ public void shouldNotStartWithInvalidSlotConfigAndUserRoles() throws Exception { public void shouldValidateConfiguration() throws Exception { // use an empty configuration which should be invalid because of the lack of DB connection details Configuration config = Configuration.create().build(); - PostgresConnector connector = new PostgresConnector(); + YBPostgresConnector connector = new YBPostgresConnector(); Config validatedConfig = connector.validate(config.asMap()); // validate that the required fields have errors assertConfigurationErrors(validatedConfig, PostgresConnectorConfig.HOSTNAME, 1); @@ -263,7 +263,7 @@ public void shouldValidateReplicationSlotName() throws Exception { Configuration config = Configuration.create() .with(PostgresConnectorConfig.SLOT_NAME, "xx-aa") .build(); - PostgresConnector connector = new PostgresConnector(); + YBPostgresConnector connector = new YBPostgresConnector(); Config validatedConfig = connector.validate(config.asMap()); assertConfigurationErrors(validatedConfig, PostgresConnectorConfig.SLOT_NAME, 1); @@ -275,7 +275,7 @@ public void shouldSupportSSLParameters() throws Exception { // SSL is enabled Configuration config = TestHelper.defaultConfig().with(PostgresConnectorConfig.SSL_MODE, PostgresConnectorConfig.SecureConnectionMode.REQUIRED).build(); - start(PostgresConnector.class, config, (success, msg, error) -> { + start(YBPostgresConnector.class, config, (success, msg, error) -> { if (TestHelper.shouldSSLConnectionFail()) { // we expect the task to fail at startup when we're printing the server info assertThat(success).isFalse(); @@ -301,7 +301,7 @@ public void shouldProduceEventsWithInitialSnapshot() throws Exception { Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); // check the records from the snapshot @@ -320,7 +320,7 @@ public void shouldProduceEventsWithInitialSnapshot() throws Exception { // start the connector back up and check that a new snapshot has not been performed (we're running initial only mode) // but the 2 records that we were inserted while we were down will be retrieved - start(PostgresConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); + start(YBPostgresConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); assertConnectorIsRunning(); assertRecordsAfterInsert(2, 3, 3); @@ -333,7 +333,7 @@ public void initialSnapshotWithExistingSlot() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); // now stop the connector stopConnector(); @@ -350,7 +350,7 @@ public void initialSnapshotWithExistingSlot() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE); - start(PostgresConnector.class, configBuilderInitial.build()); + start(YBPostgresConnector.class, configBuilderInitial.build()); assertConnectorIsRunning(); assertRecordsFromSnapshot(2, 1, 1); @@ -361,7 +361,7 @@ public void initialSnapshotWithExistingSlot() throws Exception { @FixFor("DBZ-1235") public void shouldUseMillisecondsForTransactionCommitTime() throws InterruptedException { TestHelper.execute(SETUP_TABLES_STMT); - start(PostgresConnector.class, TestHelper.defaultConfig().build()); + start(YBPostgresConnector.class, TestHelper.defaultConfig().build()); assertConnectorIsRunning(); // check records from snapshot @@ -395,7 +395,7 @@ public void shouldConsumeMessagesFromSnapshot() throws Exception { .with(PostgresConnectorConfig.MAX_QUEUE_SIZE, recordCount / 2) .with(PostgresConnectorConfig.MAX_BATCH_SIZE, 10) .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "s1"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -416,7 +416,7 @@ public void shouldConsumeMessagesFromSnapshotOld() throws Exception { .with(PostgresConnectorConfig.MAX_QUEUE_SIZE, recordCount / 2) .with(PostgresConnectorConfig.MAX_BATCH_SIZE, 10) .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "s1"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -447,7 +447,7 @@ public void shouldReceiveChangesForChangePKColumnDefinition() throws Exception { "CREATE TABLE changepk.test_table (pk SERIAL, text TEXT, PRIMARY KEY(pk));", "INSERT INTO changepk.test_table(text) VALUES ('insert');"); - start(PostgresConnector.class, config.getConfig()); + start(YBPostgresConnector.class, config.getConfig()); assertConnectorIsRunning(); @@ -488,7 +488,7 @@ public void shouldReceiveChangesForChangePKColumnDefinition() throws Exception { + "ALTER TABLE changepk.test_table ADD PRIMARY KEY(newpk,pk3);" + "INSERT INTO changepk.test_table VALUES(5, 'dropandaddpkcol',10)"); - start(PostgresConnector.class, config.getConfig()); + start(YBPostgresConnector.class, config.getConfig()); records = consumeRecordsByTopic(2); @@ -548,7 +548,7 @@ public void shouldReceiveChangesForChangeColumnDefault() throws Exception { final String topicName = topicName("default_change.test_table"); - start(PostgresConnector.class, config.getConfig()); + start(YBPostgresConnector.class, config.getConfig()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -630,7 +630,7 @@ public void shouldReceiveChangesForChangeColumnDefault() throws Exception { TestHelper.execute("INSERT INTO default_change.test_table(i, text) VALUES (DEFAULT, DEFAULT);"); - start(PostgresConnector.class, config.getConfig()); + start(YBPostgresConnector.class, config.getConfig()); assertConnectorIsRunning(); @@ -706,7 +706,7 @@ public void showThatSchemaColumnDefaultMayApplyRetroactively() throws Exception "CREATE TABLE default_change.test_table (pk SERIAL, i INT DEFAULT 1, text TEXT DEFAULT 'foo', PRIMARY KEY(pk));", "INSERT INTO default_change.test_table(i, text) VALUES (DEFAULT, DEFAULT);"); - start(PostgresConnector.class, config.getConfig()); + start(YBPostgresConnector.class, config.getConfig()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -738,7 +738,7 @@ public void showThatSchemaColumnDefaultMayApplyRetroactively() throws Exception "ALTER TABLE default_change.test_table ADD COLUMN tstz TIMESTAMPTZ DEFAULT '2021-03-20 14:44:28 +1'::TIMESTAMPTZ;", "INSERT INTO default_change.test_table(i, text, bi, tstz) VALUES (DEFAULT, DEFAULT, DEFAULT, DEFAULT);"); - start(PostgresConnector.class, config.getConfig()); + start(YBPostgresConnector.class, config.getConfig()); assertConnectorIsRunning(); @@ -810,7 +810,7 @@ public void shouldIgnoreEventsForDeletedTable() throws Exception { Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -830,7 +830,7 @@ public void shouldIgnoreEventsForDeletedTable() throws Exception { TestHelper.execute(INSERT_STMT); TestHelper.execute("DROP TABLE s1.a"); - start(PostgresConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); + start(YBPostgresConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -848,7 +848,7 @@ public void shouldNotIgnoreEventsForDeletedTable() throws Exception { Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -868,7 +868,7 @@ public void shouldNotIgnoreEventsForDeletedTable() throws Exception { TestHelper.execute(INSERT_STMT); TestHelper.execute("DROP TABLE s1.a"); - start(PostgresConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); + start(YBPostgresConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -886,7 +886,7 @@ public void shouldIgnoreViews() throws Exception { Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -907,7 +907,7 @@ public void shouldIgnoreViews() throws Exception { // start the connector back up and check that a new snapshot has not been performed (we're running initial only mode) // but the 2 records that we were inserted while we were down will be retrieved - start(PostgresConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); + start(YBPostgresConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -923,7 +923,7 @@ public void shouldLimitDecoderLog() throws Exception { Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -944,7 +944,7 @@ public void shouldLimitDecoderLog() throws Exception { // start the connector back up and check that a new snapshot has not been performed (we're running initial only mode) // but the 2 records that we were inserted while we were down will be retrieved - start(PostgresConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); + start(YBPostgresConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -962,7 +962,7 @@ public void shouldExecuteOnConnectStatements() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.getValue()) .with(PostgresConnectorConfig.ON_CONNECT_STATEMENTS, "INSERT INTO s1.a (aa) VALUES (2); INSERT INTO s2.a (aa, bb) VALUES (2, 'hello;; world');") .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -989,7 +989,7 @@ public void shouldProduceEventsWhenSnapshotsAreNeverAllowed() throws Interrupted .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); // YB Note: Added a wait for replication slot to be active. @@ -1013,7 +1013,7 @@ public void shouldNotProduceEventsWithInitialOnlySnapshot() throws InterruptedEx .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); // check the records from the snapshot @@ -1033,7 +1033,7 @@ public void shouldProduceEventsWhenAlwaysTakingSnapshots() throws InterruptedExc Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.ALWAYS.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -1048,7 +1048,7 @@ public void shouldProduceEventsWhenAlwaysTakingSnapshots() throws InterruptedExc assertNoRecordsToConsume(); // start the connector back up and check that a new snapshot has been performed - start(PostgresConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); + start(YBPostgresConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -1065,7 +1065,7 @@ public void shouldHaveBeforeImageOfUpdatedRow() throws InterruptedException { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); // YB Note: Added a wait for replication slot to be active. @@ -1112,7 +1112,7 @@ public void shouldResumeSnapshotIfFailingMidstream() throws Exception { fail("A controlled exception was expected...."); } }; - start(PostgresConnector.class, configBuilder.build(), completionCallback, stopOnPKPredicate(2)); + start(YBPostgresConnector.class, configBuilder.build(), completionCallback, stopOnPKPredicate(2)); // YB Note: Increasing the wait time since the connector is taking slightly higher time to initialize. // wait until we know we've raised the exception at startup AND the engine has been shutdown if (!latch.await(TestHelper.waitTimeForRecords() * 15, TimeUnit.SECONDS)) { @@ -1128,7 +1128,7 @@ public void shouldResumeSnapshotIfFailingMidstream() throws Exception { // make sure there are no records to consume assertNoRecordsToConsume(); // start the connector back up and check that it took another full snapshot since previously it was stopped midstream - start(PostgresConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); + start(YBPostgresConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); assertConnectorIsRunning(); // check that the snapshot was recreated @@ -1152,7 +1152,7 @@ public void shouldRecoverFromRetriableException() throws Exception { .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); @@ -1184,7 +1184,7 @@ public void shouldUpdateReplicaIdentity() throws Exception { .with(PostgresConnectorConfig.REPLICA_IDENTITY_AUTOSET_VALUES, "s1.a:FULL,s2.a:DEFAULT") .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -1217,7 +1217,7 @@ public void shouldUpdateReplicaIdentityWithRegExp() throws Exception { .with(PostgresConnectorConfig.REPLICA_IDENTITY_AUTOSET_VALUES, "(.*).a:FULL,s2.*:NOTHING") .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -1251,7 +1251,7 @@ public void shouldNotUpdateReplicaIdentityWithRegExpDuplicated() throws Exceptio .with(PostgresConnectorConfig.REPLICA_IDENTITY_AUTOSET_VALUES, "s.*:FULL,s2.*:NOTHING") .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -1279,7 +1279,7 @@ public void shouldUpdateReplicaIdentityWithOneTable() throws Exception { .with(PostgresConnectorConfig.REPLICA_IDENTITY_AUTOSET_VALUES, "s1.a:FULL") .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -1309,7 +1309,7 @@ public void shouldUpdateReplicaIdentityUsingIndex() throws Exception { .with(PostgresConnectorConfig.REPLICA_IDENTITY_AUTOSET_VALUES, "s1.a:FULL,s2.a:INDEX a_pkey") .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -1349,7 +1349,7 @@ public void shouldLogOwnershipErrorForReplicaIdentityUpdate() throws Exception { .with("database.password", "role_2_pass") .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -1374,7 +1374,7 @@ public void shouldCheckTablesToUpdateReplicaIdentityAreCaptured() throws Excepti .with(PostgresConnectorConfig.REPLICA_IDENTITY_AUTOSET_VALUES, "s1.a:FULL,s2.b:DEFAULT") .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -1424,7 +1424,7 @@ public void shouldTakeExcludeListFiltersIntoAccount() throws Exception { .with(PostgresConnectorConfig.TABLE_EXCLUDE_LIST, ".+b") .with(PostgresConnectorConfig.COLUMN_EXCLUDE_LIST, ".+bb"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); // check the records from the snapshot take the filters into account @@ -1470,7 +1470,7 @@ public void shouldTakeBlacklistFiltersIntoAccount() throws Exception { .with(PostgresConnectorConfig.TABLE_EXCLUDE_LIST, ".+b") .with(PostgresConnectorConfig.COLUMN_EXCLUDE_LIST, ".+bb"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); // check the records from the snapshot take the filters into account @@ -1513,7 +1513,7 @@ public void shouldTakeColumnIncludeListFilterIntoAccount() throws Exception { .with("column.mask.with.5.chars", ".+cc") .with(PostgresConnectorConfig.COLUMN_INCLUDE_LIST, ".+aa,.+cc"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); SourceRecords actualRecords = consumeRecordsByTopic(1); @@ -1542,7 +1542,7 @@ public void shouldRemoveWhiteSpaceChars() throws Exception { .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "s1") .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, tableWhitelistWithWhitespace); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); SourceRecords actualRecords = consumeRecordsByTopic(2); @@ -1572,7 +1572,7 @@ public void shouldRemoveWhiteSpaceCharsOld() throws Exception { .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "s1") .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, tableWhitelistWithWhitespace); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); SourceRecords actualRecords = consumeRecordsByTopic(2); @@ -1600,7 +1600,7 @@ public void shouldCloseTxAfterTypeQuery() throws Exception { .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s1.b") .with(PostgresConnectorConfig.INCLUDE_UNKNOWN_DATATYPES, true); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -1634,7 +1634,7 @@ public void shouldReplaceInvalidTopicNameCharacters() throws Exception { .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "s1") .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s1\\.dbz_878_some\\|test@data"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); SourceRecords actualRecords = consumeRecordsByTopic(1); @@ -1661,7 +1661,7 @@ public void shouldNotSendEmptyOffset() throws InterruptedException, SQLException .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s1.a") .with(Heartbeat.HEARTBEAT_INTERVAL, 10) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning(); // Generate empty logical decoding message @@ -1682,7 +1682,7 @@ public void shouldRegularlyFlushLsn() throws InterruptedException, SQLException .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s1.a") .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); @@ -1727,7 +1727,7 @@ public void shouldRegularlyFlushLsnWithTxMonitoring() throws InterruptedExceptio .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s1.a") .with(PostgresConnectorConfig.PROVIDE_TRANSACTION_METADATA, true) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); // there shouldn't be any snapshot records @@ -1742,7 +1742,7 @@ public void shouldRegularlyFlushLsnWithTxMonitoring() throws InterruptedExceptio stopConnector(); assertConnectorNotRunning(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); // there shouldn't be any snapshot records, only potentially transaction messages @@ -1782,7 +1782,7 @@ public void shouldAllowForCustomSnapshot() throws InterruptedException { .with(PostgresConnectorConfig.SNAPSHOT_MODE_CLASS, CustomTestSnapshot.class.getName()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); SourceRecords actualRecords = consumeRecordsByTopic(1); @@ -1813,7 +1813,7 @@ record = s2recs.get(0); .with(PostgresConnectorConfig.SNAPSHOT_MODE_CLASS, CustomTestSnapshot.class.getName()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); actualRecords = consumeRecordsByTopic(4); @@ -1836,7 +1836,7 @@ public void shouldAllowForSelectiveSnapshot() throws InterruptedException { .with(CommonConnectorConfig.SNAPSHOT_MODE_TABLES, "s1.a") .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); /* Snapshot must be taken only for the listed tables */ @@ -1863,7 +1863,7 @@ public void shouldAllowForSelectiveSnapshot() throws InterruptedException { stopConnector(); /* start the connector back up and make sure snapshot is being taken */ - start(PostgresConnector.class, configBuilder + start(YBPostgresConnector.class, configBuilder .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .with(PostgresConnectorConfig.SNAPSHOT_MODE_TABLES, "s2.a") .build()); @@ -1892,7 +1892,7 @@ public void shouldAllowForExportedSnapshot() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); // Consume records from the snapshot @@ -1926,7 +1926,7 @@ public void shouldAllowForExportedSnapshot() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); TestHelper.execute(INSERT_STMT); @@ -1962,7 +1962,7 @@ public void exportedSnapshotShouldNotSkipRecordOfParallelTx() throws Exception { pgConnection.setAutoCommit(false); pgConnection.executeWithoutCommitting(INSERT_STMT); final AtomicBoolean inserted = new AtomicBoolean(); - start(PostgresConnector.class, config, loggingCompletion(), x -> false, x -> { + start(YBPostgresConnector.class, config, loggingCompletion(), x -> false, x -> { if (!inserted.get()) { TestHelper.execute(INSERT_STMT); try { @@ -2011,7 +2011,7 @@ public void exportedSnapshotShouldNotSkipRecordOfParallelTxPgoutput() throws Exc pgConnection.setAutoCommit(false); pgConnection.executeWithoutCommitting(INSERT_STMT); final AtomicBoolean inserted = new AtomicBoolean(); - start(PostgresConnector.class, config, loggingCompletion(), x -> false, x -> { + start(YBPostgresConnector.class, config, loggingCompletion(), x -> false, x -> { if (!inserted.get()) { TestHelper.execute(INSERT_STMT); try { @@ -2051,7 +2051,7 @@ public void shouldPerformSnapshotOnceForInitialOnlySnapshotMode() throws Excepti .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); // Lets wait for snapshot to finish before proceeding @@ -2082,7 +2082,7 @@ public void shouldPerformSnapshotOnceForInitialOnlySnapshotMode() throws Excepti .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); waitForConnectorShutdown("postgres", TestHelper.TEST_SERVER); @@ -2101,7 +2101,7 @@ public void snapshotInitialOnlyFollowedByNever() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); // now stop the connector stopConnector(); @@ -2115,7 +2115,7 @@ public void snapshotInitialOnlyFollowedByNever() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); // Lets wait for snapshot to finish before proceeding @@ -2133,7 +2133,7 @@ public void snapshotInitialOnlyFollowedByNever() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); assertRecordsAfterInsert(2, 2, 2); @@ -2149,7 +2149,7 @@ public void shouldResumeStreamingFromSlotPositionForCustomSnapshot() throws Exce .with(PostgresConnectorConfig.SNAPSHOT_MODE_CLASS, CustomStartFromStreamingTestSnapshot.class.getName()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -2172,7 +2172,7 @@ public void shouldResumeStreamingFromSlotPositionForCustomSnapshot() throws Exce .with(PostgresConnectorConfig.SNAPSHOT_MODE_CLASS, CustomStartFromStreamingTestSnapshot.class.getName()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -2210,7 +2210,7 @@ public void customSnapshotterSkipsTablesOnRestart() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.ALWAYS.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -2233,7 +2233,7 @@ public void customSnapshotterSkipsTablesOnRestart() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE_CLASS, CustomPartialTableTestSnapshot.class.getName()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -2276,7 +2276,7 @@ public void customSnapshotterSkipsTablesOnRestartWithConcurrentTx() throws Excep .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.ALWAYS.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -2299,7 +2299,7 @@ public void customSnapshotterSkipsTablesOnRestartWithConcurrentTx() throws Excep .with(PostgresConnectorConfig.SNAPSHOT_MODE_CLASS, CustomPartialTableTestSnapshot.class.getName()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); Awaitility.await() @@ -2349,7 +2349,7 @@ public void testCustomSnapshotterSnapshotCompleteLifecycleHook() throws Exceptio .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.CUSTOM.getValue()) .with(PostgresConnectorConfig.SNAPSHOT_MODE_CLASS, CustomLifecycleHookTestSnapshot.class.getName()) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -2418,7 +2418,7 @@ public void testStreamingPerformance() throws Exception { Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); final long recordsCount = 1000000; final int batchSize = 1000; @@ -2459,7 +2459,7 @@ public void testSnapshotPerformance() throws Exception { batchInsertRecords(recordsCount, batchSize).get(); // start the connector only after we've finished inserting all the records - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); CompletableFuture.runAsync(() -> consumeRecords(recordsCount)) @@ -2482,7 +2482,7 @@ public void testEmptySchemaWarningAfterApplyingFilters() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY.getValue()) .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "my_products"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForAvailableRecords(10 * (TestHelper.waitTimeForRecords() * 5), TimeUnit.MILLISECONDS); @@ -2502,7 +2502,7 @@ public void testNoEmptySchemaWarningAfterApplyingFilters() throws Exception { Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY.getValue()); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForAvailableRecords(100, TimeUnit.MILLISECONDS); @@ -2523,7 +2523,7 @@ public void testCustomPublicationNameUsed() throws Exception { Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.PUBLICATION_NAME, "cdc"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForAvailableRecords(100, TimeUnit.MILLISECONDS); @@ -2541,7 +2541,7 @@ public void shouldRewriteIdentityKey() throws InterruptedException { // rewrite key from table 'a': from {pk} to {pk, aa} .with(PostgresConnectorConfig.MSG_KEY_COLUMNS, "(.*)1.a:pk,aa"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); waitForSnapshotToBeCompleted(); SourceRecords records = consumeRecordsByTopic(2); records.recordsForTopic("test_server.s1.a").forEach(record -> { @@ -2573,14 +2573,14 @@ public void shouldNotIssueWarningForNoMonitoredTablesAfterApplyingFilters() thro .build(); // Start connector, verify that it does not log no captured tables warning - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); waitForSnapshotToBeCompleted(); SourceRecords records = consumeRecordsByTopic(1); assertThat(logInterceptor.containsMessage(DatabaseSchema.NO_CAPTURED_DATA_COLLECTIONS_WARNING)).isFalse(); stopConnector(); // Restart connector, verify it does not log no captured tables warning - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); waitForStreamingRunning(); assertThat(logInterceptor.containsMessage(DatabaseSchema.NO_CAPTURED_DATA_COLLECTIONS_WARNING)).isFalse(); } @@ -2598,7 +2598,7 @@ public void shouldClearDatabaseWarnings() throws Exception { .with(PostgresConnectorConfig.POLL_INTERVAL_MS, "10") .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); waitForSnapshotToBeCompleted(); Awaitility.await().atMost(Duration.ofSeconds(TestHelper.waitTimeForRecords() * 6)) .until(() -> logInterceptor.containsMessage("Server-side message: 'Exiting startup callback'")); @@ -2622,7 +2622,7 @@ public void shouldCreatePublicationWhenReplicationSlotExists() throws Exception // Start connector with no snapshot; by default replication slot and publication should be created // Wait until streaming mode begins to proceed - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); waitForStreamingRunning(); // Check that publication was created @@ -2635,7 +2635,7 @@ public void shouldCreatePublicationWhenReplicationSlotExists() throws Exception // Create log interceptor and restart the connector, should observe publication gets re-created final LogInterceptor interceptor = new LogInterceptor(PostgresReplicationConnection.class); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); waitForStreamingRunning(); // YB Note: Increasing the wait time. @@ -2655,7 +2655,7 @@ public void shouldConsumeEventsWithMaskedColumns() throws Exception { TestHelper.execute(SETUP_TABLES_STMT); Configuration.Builder configBuilder = TestHelper.defaultConfig() .with("column.mask.with.5.chars", "s2.a.bb"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); SourceRecords actualRecords = consumeRecordsByTopic(2); @@ -2718,7 +2718,7 @@ public void shouldConsumeEventsWithMaskedHashedColumns() throws Exception { "CREATE TABLE s2.b (pk SERIAL, bb varchar(255), PRIMARY KEY(pk));"); Configuration.Builder configBuilder = TestHelper.defaultConfig() .with("column.mask.hash.SHA-256.with.salt.CzQMA0cB5K", "s2.a.bb, s2.b.bb"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); SourceRecords actualRecords = consumeRecordsByTopic(2); @@ -2797,7 +2797,7 @@ public void shouldConsumeEventsWithTruncatedColumns() throws Exception { TestHelper.execute(SETUP_TABLES_STMT); Configuration.Builder configBuilder = TestHelper.defaultConfig() .with("column.truncate.to.3.chars", "s2.a.bb"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); SourceRecords actualRecords = consumeRecordsByTopic(2); @@ -2861,7 +2861,7 @@ public void shouldAckLsnOnSourceByDefault() throws Exception { .with(PostgresConnectorConfig.SLOT_NAME, ReplicationConnection.Builder.DEFAULT_SLOT_NAME) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, "false"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -2874,7 +2874,7 @@ public void shouldAckLsnOnSourceByDefault() throws Exception { TestHelper.execute("INSERT INTO s2.a (aa,bb) VALUES (1, 'test');"); TestHelper.execute("UPDATE s2.a SET aa=2, bb='hello' WHERE pk=2;"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -2899,7 +2899,7 @@ public void testYBCustomChangesForUpdate() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER) .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s2.a"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForStreamingRunning(); TestHelper.waitFor(Duration.ofSeconds(5)); @@ -2953,7 +2953,7 @@ public void testSkipMessagesWithoutChange(ReplicaIdentityInfo.ReplicaIdentity re .with(PostgresConnectorConfig.SKIP_MESSAGES_WITHOUT_CHANGE, true) .with(PostgresConnectorConfig.COLUMN_INCLUDE_LIST, "s2.a.pk,s2.a.aa"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForStreamingRunning(); TestHelper.waitFor(Duration.ofSeconds(5)); @@ -3014,7 +3014,7 @@ public void customYBStructureShouldBePresentInSnapshotRecords() throws Exception .with(PostgresConnectorConfig.SLOT_NAME, ReplicationConnection.Builder.DEFAULT_SLOT_NAME) .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s2.a"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -3047,7 +3047,7 @@ public void shouldNotAckLsnOnSource() throws Exception { .with(PostgresConnectorConfig.SLOT_NAME, ReplicationConnection.Builder.DEFAULT_SLOT_NAME) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, "false"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -3062,7 +3062,7 @@ public void shouldNotAckLsnOnSource() throws Exception { TestHelper.execute("INSERT INTO s2.a (aa,bb) VALUES (1, 'test');"); TestHelper.execute("UPDATE s2.a SET aa=2, bb='hello' WHERE pk=2;"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -3086,7 +3086,7 @@ public void shouldOutputRecordsInCloudEventsFormat() throws Exception { .with(CommonConnectorConfig.PROVIDE_TRANSACTION_METADATA, true) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -3147,7 +3147,7 @@ public void testYBChangesForMultiHostConfiguration() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER) .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s2.a"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForStreamingRunning(); TestHelper.waitFor(Duration.ofSeconds(5)); @@ -3180,7 +3180,7 @@ public void shouldConfigureSubscriptionsForAllTablesByDefault() throws Exception Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.PUBLICATION_NAME, "cdc"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForAvailableRecords(100, TimeUnit.MILLISECONDS); @@ -3207,7 +3207,7 @@ public void shouldConfigureSubscriptionsFromTableFilters() throws Exception { .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "public.numeric_table,public.text_table,s1.a,s2.a") .with(PostgresConnectorConfig.PUBLICATION_AUTOCREATE_MODE, PostgresConnectorConfig.AutoCreateMode.FILTERED.getValue()); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForAvailableRecords(100, TimeUnit.MILLISECONDS); @@ -3243,7 +3243,7 @@ public void shouldThrowWhenAutocreationIsDisabled() throws Exception { assertEquals(error.getMessage(), "Publication autocreation is disabled, please create one and restart the connector."); }; - start(PostgresConnector.class, configBuilder.build(), cb); + start(YBPostgresConnector.class, configBuilder.build(), cb); waitForAvailableRecords(100, TimeUnit.MILLISECONDS); stopConnector(); @@ -3264,7 +3264,7 @@ public void shouldProduceMessagesOnlyForConfiguredTables() throws Exception { .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s2.a") .with(PostgresConnectorConfig.PUBLICATION_AUTOCREATE_MODE, PostgresConnectorConfig.AutoCreateMode.FILTERED.getValue()); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -3288,7 +3288,7 @@ public void shouldProduceMessagesOnlyForConfiguredTables() throws Exception { @FixFor("DBZ-2885") @SkipWhenDecoderPluginNameIsNot(value = SkipWhenDecoderPluginNameIsNot.DecoderPluginName.PGOUTPUT, reason = "Publication configuration only valid for PGOUTPUT decoder") public void shouldThrowWhenTableFiltersIsEmpty() throws Exception { - final LogInterceptor logInterceptor = new LogInterceptor(PostgresConnectorIT.class); + final LogInterceptor logInterceptor = new LogInterceptor(YBPostgresConnectorIT.class); TestHelper.dropAllSchemas(); TestHelper.dropPublication("cdc"); @@ -3300,7 +3300,7 @@ public void shouldThrowWhenTableFiltersIsEmpty() throws Exception { .with(PostgresConnectorConfig.PUBLICATION_AUTOCREATE_MODE, PostgresConnectorConfig.AutoCreateMode.FILTERED.getValue()) .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "nonexistent.table"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorNotRunning(); assertTrue(logInterceptor.containsStacktraceElement("No table filters found for filtered publication cdc")); } @@ -3320,7 +3320,7 @@ public void shouldUpdatePublicationForConfiguredTables() throws Exception { .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .with(PostgresConnectorConfig.PUBLICATION_AUTOCREATE_MODE, PostgresConnectorConfig.AutoCreateMode.FILTERED.getValue()); - start(PostgresConnector.class, initalConfigBuilder.build()); + start(YBPostgresConnector.class, initalConfigBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -3349,7 +3349,7 @@ public void shouldUpdatePublicationForConfiguredTables() throws Exception { .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s1.a") .with(PostgresConnectorConfig.PUBLICATION_AUTOCREATE_MODE, PostgresConnectorConfig.AutoCreateMode.FILTERED.getValue()); - start(PostgresConnector.class, updatedConfigBuilder.build()); + start(YBPostgresConnector.class, updatedConfigBuilder.build()); assertConnectorIsRunning(); // snapshot record s1.a @@ -3388,7 +3388,7 @@ public void shouldUpdateExistingPublicationForConfiguredPartitionedTables() thro .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s1.part") .with(PostgresConnectorConfig.PUBLICATION_AUTOCREATE_MODE, PostgresConnectorConfig.AutoCreateMode.FILTERED.getValue()); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -3423,7 +3423,7 @@ public void shouldEmitNoEventsForSkippedCreateOperations() throws Exception { .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .with(PostgresConnectorConfig.SKIPPED_OPERATIONS, Envelope.Operation.UPDATE.code()) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); assertNoRecordsToConsume(); @@ -3470,7 +3470,7 @@ public void nonSuperUserSnapshotAndStreaming() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE); - start(PostgresConnector.class, configBuilderInitial.build()); + start(YBPostgresConnector.class, configBuilderInitial.build()); assertConnectorIsRunning(); // insert some more records - these should not be part of the snapshot @@ -3521,7 +3521,7 @@ private List getSequence(SourceRecord record) { @FixFor("DBZ-2911") public void shouldHaveLastCommitLsn() throws InterruptedException { TestHelper.execute(SETUP_TABLES_STMT); - start(PostgresConnector.class, TestHelper.defaultConfig() + start(YBPostgresConnector.class, TestHelper.defaultConfig() .with(PostgresConnectorConfig.PROVIDE_TRANSACTION_METADATA, true) .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER.getValue()) .build()); @@ -3574,7 +3574,7 @@ public void testCreateNumericReplicationSlotName() throws Exception { TestHelper.execute(SETUP_TABLES_STMT); Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SLOT_NAME, "12345"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); waitForStreamingRunning(); assertConnectorIsRunning(); } @@ -3585,7 +3585,7 @@ public void testStreamingWithNumericReplicationSlotName() throws Exception { TestHelper.execute(SETUP_TABLES_STMT); Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SLOT_NAME, "12345"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); waitForStreamingRunning(); assertConnectorIsRunning(); @@ -3608,7 +3608,7 @@ public void testStreamingWithNumericReplicationSlotName() throws Exception { public void testShouldNotCloseConnectionFetchingMetadataWithNewDataTypes() throws Exception { TestHelper.execute(CREATE_TABLES_STMT); Configuration config = TestHelper.defaultConfig().build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); waitForStreamingRunning(); assertConnectorIsRunning(); @@ -3639,7 +3639,7 @@ public void shouldReselectToastColumnsOnPrimaryKeyChange() throws Exception { TestHelper.execute("INSERT INTO s1.dbz5295 (pk,data,data2) values (1,'" + toastValue1 + "','" + toastValue2 + "');"); Configuration config = TestHelper.defaultConfig().build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); waitForStreamingRunning(); SourceRecords records = consumeRecordsByTopic(1); @@ -3690,7 +3690,7 @@ public void shouldSuppressLoggingOptionalOfExcludedColumns() throws Exception { Configuration config = TestHelper.defaultConfig() .with("column.exclude.list", "s1.dbz5783.data") .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); @@ -3709,7 +3709,7 @@ public void shouldSuppressLoggingOptionalOfExcludedColumns() throws Exception { @FixFor("DBZ-5739") @SkipWhenDatabaseVersion(check = LESS_THAN, major = 11, reason = "This needs pg_replication_slot_advance which is supported only on Postgres 11+") public void shouldStopConnectorOnSlotRecreation() throws InterruptedException { - final LogInterceptor logInterceptor = new LogInterceptor(PostgresConnectorIT.class); + final LogInterceptor logInterceptor = new LogInterceptor(YBPostgresConnectorIT.class); TestHelper.execute(SETUP_TABLES_STMT); Configuration.Builder configBuilder = TestHelper.defaultConfig() @@ -3717,7 +3717,7 @@ public void shouldStopConnectorOnSlotRecreation() throws InterruptedException { .with(CommonConnectorConfig.SNAPSHOT_MODE_TABLES, "s1.a") .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); consumeRecordsByTopic(1); @@ -3732,7 +3732,7 @@ public void shouldStopConnectorOnSlotRecreation() throws InterruptedException { .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .with(PostgresConnectorConfig.SLOT_SEEK_TO_KNOWN_OFFSET, Boolean.TRUE); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); Awaitility.await().atMost(TestHelper.waitTimeForRecords() * 5, TimeUnit.SECONDS) .until(() -> logInterceptor.containsStacktraceElement("Cannot seek to the last known offset ")); assertConnectorNotRunning(); @@ -3750,7 +3750,7 @@ public void shouldSeekToCorrectOffset() throws InterruptedException { .with(CommonConnectorConfig.SNAPSHOT_MODE_TABLES, "s1.a") .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); consumeRecordsByTopic(1); @@ -3765,7 +3765,7 @@ public void shouldSeekToCorrectOffset() throws InterruptedException { .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .with(PostgresConnectorConfig.SLOT_SEEK_TO_KNOWN_OFFSET, Boolean.TRUE); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); consumeRecordsByTopic(1); assertConnectorIsRunning(); @@ -3804,7 +3804,7 @@ public void shouldInvokeSnapshotterAbortedMethod() throws Exception { } }; - start(PostgresConnector.class, configBuilder.build(), completionCallback, stopOnPKPredicate(1)); + start(YBPostgresConnector.class, configBuilder.build(), completionCallback, stopOnPKPredicate(1)); // wait until we know we've raised the exception at startup AND the engine has been shutdown if (!latch.await(TestHelper.waitTimeForRecords() * 5, TimeUnit.SECONDS)) { @@ -3837,7 +3837,7 @@ public void shouldThrowRightExceptionWhenNoCustomSnapshotClassProvided() { Configuration config = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.CUSTOM.getValue()) .build(); - start(PostgresConnector.class, config, (success, msg, err) -> { + start(YBPostgresConnector.class, config, (success, msg, err) -> { error.set(err); message.set(msg); status.set(success); @@ -3868,7 +3868,7 @@ public void shouldIncludeTableWithBackSlashInName() throws Exception { .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s1.back\\\\slash"); - start(PostgresConnector.class, configBuilder.build()); + start(YBPostgresConnector.class, configBuilder.build()); assertConnectorIsRunning(); TestHelper.execute("INSERT INTO s1.\"back\\slash\" (aa, bb) VALUES (3, 3);"); @@ -3896,7 +3896,7 @@ public void shouldAddNewFieldToSourceInfo() throws InterruptedException { "CREATE SCHEMA IF NOT EXISTS s1;", "CREATE TABLE s1.DBZ6076 (pk SERIAL, aa integer, PRIMARY KEY(pk));", "INSERT INTO s1.DBZ6076 (aa) VALUES (1);"); - start(PostgresConnector.class, TestHelper.defaultConfig() + start(YBPostgresConnector.class, TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.name()) .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s1.DBZ6076") .with(PostgresConnectorConfig.SOURCE_INFO_STRUCT_MAKER, CustomPostgresSourceInfoStructMaker.class.getName()) @@ -3926,7 +3926,7 @@ public void shouldAddNewFieldToSourceInfo() throws InterruptedException { @FixFor("DBZ-6076") public void shouldUseDefaultSourceInfoStructMaker() throws InterruptedException { TestHelper.execute(SETUP_TABLES_STMT); - start(PostgresConnector.class, TestHelper.defaultConfig() + start(YBPostgresConnector.class, TestHelper.defaultConfig() .build()); assertConnectorIsRunning(); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorTaskIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YBPostgresConnectorTaskIT.java similarity index 98% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorTaskIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YBPostgresConnectorTaskIT.java index 172fd53545b..9f58c6c5ecd 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorTaskIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YBPostgresConnectorTaskIT.java @@ -22,7 +22,7 @@ /** * Integration test for {@link PostgresConnectorTask} class. */ -public class PostgresConnectorTaskIT { +public class YBPostgresConnectorTaskIT { @Test @FixFor("DBZ-519") diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteReplicaIdentityIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteReplicaIdentityIT.java index fef97945de6..a0dcf2832bd 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteReplicaIdentityIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteReplicaIdentityIT.java @@ -39,7 +39,7 @@ public class YugabyteReplicaIdentityIT extends AbstractConnectorTest { private static final String INSERT_STMT = "INSERT INTO s1.a (aa) VALUES (1);" + "INSERT INTO s2.a (aa) VALUES (1);"; - private PostgresConnector connector; + private YBPostgresConnector connector; @BeforeClass public static void beforeClass() throws SQLException { @@ -68,7 +68,7 @@ public void shouldProduceOldValuesWithReplicaIdentityFull() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); // YB Note: Added a wait for replication slot to be active. @@ -106,7 +106,7 @@ public void shouldProduceExpectedValuesWithReplicaIdentityDefault() throws Excep .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); // YB Note: Added a wait for replication slot to be active. @@ -148,7 +148,7 @@ public void shouldProduceEventsWithValuesForChangedColumnWithReplicaIdentityChan .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); // YB Note: Added a wait for replication slot to be active. @@ -206,7 +206,7 @@ public void shouldThrowExceptionWithReplicaIdentityNothingOnUpdatesAndDeletes() .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); // YB Note: Added a wait for replication slot to be active. @@ -241,7 +241,7 @@ public void shouldHaveBeforeImageForDeletesForReplicaIdentityFull() throws Excep .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); // YB Note: Added a wait for replication slot to be active. @@ -282,7 +282,7 @@ public void shouldHaveBeforeImageForDeletesForReplicaIdentityDefault() throws Ex .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); // YB Note: Added a wait for replication slot to be active. @@ -324,7 +324,7 @@ public void shouldHaveBeforeImageForDeletesForReplicaIdentityChange() throws Exc .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); assertConnectorIsRunning(); // YB Note: Added a wait for replication slot to be active. diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumYBPostgresConnectorResourceIT.java similarity index 97% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumYBPostgresConnectorResourceIT.java index 5b0f17e4520..1f8e74c8086 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumYBPostgresConnectorResourceIT.java @@ -21,18 +21,18 @@ import org.junit.Test; import io.debezium.connector.postgresql.Module; -import io.debezium.connector.postgresql.PostgresConnector; +import io.debezium.connector.postgresql.YBPostgresConnector; import io.debezium.connector.postgresql.PostgresConnectorConfig; import io.debezium.testing.testcontainers.Connector; import io.debezium.testing.testcontainers.ConnectorConfiguration; import io.debezium.testing.testcontainers.testhelper.RestExtensionTestInfrastructure; import io.restassured.http.ContentType; -public class DebeziumPostgresConnectorResourceIT { +public class DebeziumYBPostgresConnectorResourceIT { @BeforeClass public static void checkCondition() { - Assume.assumeThat("Skipping DebeziumPostgresConnectorResourceIT tests when assembly profile is not active!", + Assume.assumeThat("Skipping DebeziumYBPostgresConnectorResourceIT tests when assembly profile is not active!", System.getProperty("isAssemblyProfileActive", "false"), is("true")); } @@ -84,7 +84,7 @@ public void testInvalidHostnameConnection() { public void testInvalidConnection() { given() .port(RestExtensionTestInfrastructure.getDebeziumContainer().getFirstMappedPort()) - .when().contentType(ContentType.JSON).accept(ContentType.JSON).body("{\"connector.class\": \"" + PostgresConnector.class.getName() + "\"}") + .when().contentType(ContentType.JSON).accept(ContentType.JSON).body("{\"connector.class\": \"" + YBPostgresConnector.class.getName() + "\"}") .put(DebeziumPostgresConnectorResource.BASE_PATH + DebeziumPostgresConnectorResource.VALIDATE_CONNECTION_ENDPOINT) .then().log().all() .statusCode(200) diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceNoDatabaseIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumYBPostgresConnectorResourceNoDatabaseIT.java similarity index 89% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceNoDatabaseIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumYBPostgresConnectorResourceNoDatabaseIT.java index c9d7a8bc7c6..8a349a2863d 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceNoDatabaseIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumYBPostgresConnectorResourceNoDatabaseIT.java @@ -17,14 +17,14 @@ import org.junit.Test; import io.debezium.connector.postgresql.Module; -import io.debezium.connector.postgresql.PostgresConnector; +import io.debezium.connector.postgresql.YBPostgresConnector; import io.debezium.testing.testcontainers.testhelper.RestExtensionTestInfrastructure; -public class DebeziumPostgresConnectorResourceNoDatabaseIT { +public class DebeziumYBPostgresConnectorResourceNoDatabaseIT { @BeforeClass public static void checkCondition() { - Assume.assumeThat("Skipping DebeziumPostgresConnectorResourceIT tests when assembly profile is not active!", + Assume.assumeThat("Skipping DebeziumYBPostgresConnectorResourceIT tests when assembly profile is not active!", System.getProperty("isAssemblyProfileActive", "false"), is("true")); } @@ -65,7 +65,7 @@ public void testSchemaEndpoint() { .body("properties.isEmpty()", is(false)) .body("x-connector-id", is("postgres")) .body("x-version", is(Module.version())) - .body("x-className", is(PostgresConnector.class.getName())) + .body("x-className", is(YBPostgresConnector.class.getName())) .body("properties", hasKey("topic.prefix")) .body("properties", hasKey("plugin.name")) .body("properties", hasKey("slot.name")) diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbDatabaseTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbDatabaseTest.java index 87724c29914..0a34dbdca3d 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbDatabaseTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbDatabaseTest.java @@ -9,6 +9,7 @@ import java.sql.SQLException; +import io.debezium.connector.postgresql.YBPostgresConnector; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -19,7 +20,6 @@ import org.testcontainers.lifecycle.Startables; import io.debezium.config.Configuration; -import io.debezium.connector.postgresql.PostgresConnector; import io.debezium.connector.postgresql.PostgresConnectorConfig; import io.debezium.connector.postgresql.PostgresConnectorConfig.SnapshotMode; import io.debezium.connector.postgresql.TestHelper; @@ -94,7 +94,7 @@ protected void insertData() throws SQLException { public void shouldTransformChunks() throws Exception { Testing.Print.enable(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); insertData(); @@ -112,7 +112,7 @@ public void shouldTransformChunks() throws Exception { public void shouldTransformAggregates() throws Exception { Testing.Print.enable(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); insertData(); @@ -142,7 +142,7 @@ public void shouldTransformAggregates() throws Exception { public void shouldTransformCompressedChunks() throws Exception { Testing.Print.enable(); - start(PostgresConnector.class, config); + start(YBPostgresConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); insertData(); diff --git a/debezium-connector-postgres/src/test/resources/logback-test.xml b/debezium-connector-postgres/src/test/resources/logback-test.xml index c2bf2d54754..67df491d802 100644 --- a/debezium-connector-postgres/src/test/resources/logback-test.xml +++ b/debezium-connector-postgres/src/test/resources/logback-test.xml @@ -33,7 +33,7 @@ additivity="false"> - + From 5033e3103fa5cb55e04f4b16ea78b85222daad84 Mon Sep 17 00:00:00 2001 From: Vaibhav Kushwaha Date: Mon, 8 Jul 2024 12:03:28 +0530 Subject: [PATCH 10/15] changed naming and versioning scheme --- debezium-api/pom.xml | 2 +- debezium-assembly-descriptors/pom.xml | 2 +- debezium-bom/pom.xml | 2 +- debezium-connect-rest-extension/pom.xml | 2 +- debezium-connector-mongodb/pom.xml | 2 +- debezium-connector-mysql/pom.xml | 2 +- debezium-connector-oracle/pom.xml | 2 +- debezium-connector-postgres/pom.xml | 2 +- .../postgresql/PostgresConnectorConfig.java | 2 +- .../postgresql/PostgresConnectorTask.java | 4 +- .../postgresql/PostgresErrorHandler.java | 2 +- .../connector/postgresql/PostgresSchema.java | 2 +- .../PostgresStreamingChangeEventSource.java | 4 +- .../postgresql/ReplicaIdentityMapper.java | 2 +- ...onnector.java => YugabyteDBConnector.java} | 6 +- .../metadata/PostgresConnectorMetadata.java | 4 +- .../DebeziumPostgresConnectorResource.java | 8 +- ...pache.kafka.connect.source.SourceConnector | 2 +- .../postgresql/BlockingSnapshotIT.java | 4 +- .../postgresql/CloudEventsConverterIT.java | 8 +- .../postgresql/CustomTestSnapshot.java | 2 +- .../postgresql/DebeziumEngineIT.java | 8 +- .../connector/postgresql/DomainTypesIT.java | 4 +- .../postgresql/IncrementalSnapshotIT.java | 6 +- .../postgresql/LogicalDecodingMessageIT.java | 12 +- .../connector/postgresql/NotificationsIT.java | 6 +- .../postgresql/OutboxEventRouterIT.java | 8 +- .../PostgresDefaultValueConverterIT.java | 6 +- .../postgresql/PostgresMetricsIT.java | 12 +- .../connector/postgresql/PostgresMoneyIT.java | 8 +- .../PostgresReselectColumnsProcessorIT.java | 8 +- .../postgresql/PostgresShutdownIT.java | 4 +- ...gresSkipMessagesWithoutChangeConfigIT.java | 8 +- .../postgresql/PublicGeometryIT.java | 2 +- .../postgresql/RecordsSnapshotProducerIT.java | 6 +- .../postgresql/RecordsStreamProducerIT.java | 2 +- .../connector/postgresql/SignalsIT.java | 10 +- .../SnapshotWithOverridesProducerIT.java | 2 +- .../postgresql/TablesWithoutPrimaryKeyIT.java | 8 +- .../postgresql/TransactionMetadataIT.java | 2 +- ... => YugabyteDBConnectorConfigDefTest.java} | 6 +- ...ctorIT.java => YugabyteDBConnectorIT.java} | 260 +++++++++--------- ...IT.java => YugabyteDBConnectorTaskIT.java} | 2 +- .../postgresql/YugabyteReplicaIdentityIT.java | 16 +- ...ebeziumYugabyteDBConnectorResourceIT.java} | 8 +- ...abyteDBConnectorResourceNoDatabaseIT.java} | 8 +- .../timescaledb/TimescaleDbDatabaseTest.java | 8 +- .../src/test/resources/logback-test.xml | 2 +- debezium-connector-sqlserver/pom.xml | 2 +- debezium-core/pom.xml | 2 +- debezium-ddl-parser/pom.xml | 2 +- debezium-embedded/pom.xml | 2 +- debezium-interceptor/pom.xml | 2 +- debezium-microbenchmark-oracle/pom.xml | 2 +- debezium-microbenchmark/pom.xml | 2 +- debezium-parent/pom.xml | 2 +- .../deployment/pom.xml | 2 +- debezium-quarkus-outbox-common/pom.xml | 2 +- .../runtime/pom.xml | 2 +- .../deployment/pom.xml | 2 +- .../integration-tests/pom.xml | 2 +- debezium-quarkus-outbox-reactive/pom.xml | 2 +- .../runtime/pom.xml | 2 +- debezium-quarkus-outbox/deployment/pom.xml | 2 +- .../integration-tests/pom.xml | 2 +- debezium-quarkus-outbox/pom.xml | 2 +- debezium-quarkus-outbox/runtime/pom.xml | 2 +- debezium-schema-generator/pom.xml | 2 +- .../debezium-scripting-languages/pom.xml | 2 +- debezium-scripting/debezium-scripting/pom.xml | 2 +- debezium-scripting/pom.xml | 2 +- .../debezium-storage-azure-blob/pom.xml | 2 +- .../debezium-storage-file/pom.xml | 2 +- .../debezium-storage-jdbc/pom.xml | 2 +- .../debezium-storage-kafka/pom.xml | 2 +- .../debezium-storage-redis/pom.xml | 2 +- .../debezium-storage-rocketmq/pom.xml | 2 +- debezium-storage/debezium-storage-s3/pom.xml | 2 +- .../debezium-storage-tests/pom.xml | 2 +- debezium-storage/pom.xml | 2 +- .../debezium-testing-system/pom.xml | 4 +- .../debezium-testing-testcontainers/pom.xml | 2 +- debezium-testing/pom.xml | 2 +- documentation/antora.yml | 2 +- pom.xml | 2 +- support/checkstyle/pom.xml | 2 +- support/ide-configs/pom.xml | 2 +- support/revapi/pom.xml | 2 +- 88 files changed, 290 insertions(+), 290 deletions(-) rename debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/{YBPostgresConnector.java => YugabyteDBConnector.java} (98%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/{YBPostgresConnectorConfigDefTest.java => YugabyteDBConnectorConfigDefTest.java} (93%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/{YBPostgresConnectorIT.java => YugabyteDBConnectorIT.java} (96%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/{YBPostgresConnectorTaskIT.java => YugabyteDBConnectorTaskIT.java} (98%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/{DebeziumYBPostgresConnectorResourceIT.java => DebeziumYugabyteDBConnectorResourceIT.java} (98%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/{DebeziumYBPostgresConnectorResourceNoDatabaseIT.java => DebeziumYugabyteDBConnectorResourceNoDatabaseIT.java} (91%) diff --git a/debezium-api/pom.xml b/debezium-api/pom.xml index 16b618f635e..12c124b7224 100644 --- a/debezium-api/pom.xml +++ b/debezium-api/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-assembly-descriptors/pom.xml b/debezium-assembly-descriptors/pom.xml index d32b8477ec0..a2a4690a354 100644 --- a/debezium-assembly-descriptors/pom.xml +++ b/debezium-assembly-descriptors/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-bom/pom.xml b/debezium-bom/pom.xml index 92da82eacc4..21511a3b44e 100644 --- a/debezium-bom/pom.xml +++ b/debezium-bom/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-build-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/debezium-connect-rest-extension/pom.xml b/debezium-connect-rest-extension/pom.xml index ae28fe84a94..22865b90855 100644 --- a/debezium-connect-rest-extension/pom.xml +++ b/debezium-connect-rest-extension/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-connector-mongodb/pom.xml b/debezium-connector-mongodb/pom.xml index b1331bfe348..b91675f1a54 100644 --- a/debezium-connector-mongodb/pom.xml +++ b/debezium-connector-mongodb/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-connector-mysql/pom.xml b/debezium-connector-mysql/pom.xml index 0115f422c92..699e1ccb800 100644 --- a/debezium-connector-mysql/pom.xml +++ b/debezium-connector-mysql/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-connector-oracle/pom.xml b/debezium-connector-oracle/pom.xml index 90e3e0197e8..bfb3e8af0bc 100644 --- a/debezium-connector-oracle/pom.xml +++ b/debezium-connector-oracle/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-connector-postgres/pom.xml b/debezium-connector-postgres/pom.xml index 893ea19b412..3aac3e88add 100644 --- a/debezium-connector-postgres/pom.xml +++ b/debezium-connector-postgres/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorConfig.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorConfig.java index ea01ec38075..f77f5808936 100755 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorConfig.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorConfig.java @@ -54,7 +54,7 @@ import io.debezium.util.Strings; /** - * The configuration properties for the {@link YBPostgresConnector} + * The configuration properties for the {@link YugabyteDBConnector} * * @author Horia Chiorean */ diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorTask.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorTask.java index 894c66af6bd..38d961b8b0d 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorTask.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorTask.java @@ -195,7 +195,7 @@ public ChangeEventSourceCoordinator st final PostgresEventMetadataProvider metadataProvider = new PostgresEventMetadataProvider(); SignalProcessor signalProcessor = new SignalProcessor<>( - YBPostgresConnector.class, connectorConfig, Map.of(), + YugabyteDBConnector.class, connectorConfig, Map.of(), getAvailableSignalChannels(), DocumentReader.defaultReader(), previousOffsets); @@ -235,7 +235,7 @@ public ChangeEventSourceCoordinator st ChangeEventSourceCoordinator coordinator = new PostgresChangeEventSourceCoordinator( previousOffsets, errorHandler, - YBPostgresConnector.class, + YugabyteDBConnector.class, connectorConfig, new PostgresChangeEventSourceFactory( connectorConfig, diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresErrorHandler.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresErrorHandler.java index d8dc145b1ec..cedccbf43c7 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresErrorHandler.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresErrorHandler.java @@ -21,7 +21,7 @@ public class PostgresErrorHandler extends ErrorHandler { public PostgresErrorHandler(PostgresConnectorConfig connectorConfig, ChangeEventQueue queue, ErrorHandler replacedErrorHandler) { - super(YBPostgresConnector.class, connectorConfig, queue, replacedErrorHandler); + super(YugabyteDBConnector.class, connectorConfig, queue, replacedErrorHandler); } @Override diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSchema.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSchema.java index a26c6599588..cc4e29de22d 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSchema.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresSchema.java @@ -32,7 +32,7 @@ import io.debezium.spi.topic.TopicNamingStrategy; /** - * Component that records the schema information for the {@link YBPostgresConnector}. The schema information contains + * Component that records the schema information for the {@link YugabyteDBConnector}. The schema information contains * the {@link Tables table definitions} and the Kafka Connect {@link #schemaFor(TableId) Schema}s for each table, where the * {@link Schema} excludes any columns that have been {@link PostgresConnectorConfig#COLUMN_EXCLUDE_LIST specified} in the * configuration. diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresStreamingChangeEventSource.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresStreamingChangeEventSource.java index f6c7937cae4..6491ea7c686 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresStreamingChangeEventSource.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresStreamingChangeEventSource.java @@ -165,7 +165,7 @@ public void execute(ChangeEventSourceContext context, PostgresPartition partitio // such that the connection times out. We must enable keep // alive to ensure that it doesn't time out ReplicationStream stream = this.replicationStream.get(); - stream.startKeepAlive(Threads.newSingleThreadExecutor(YBPostgresConnector.class, connectorConfig.getLogicalName(), KEEP_ALIVE_THREAD_NAME)); + stream.startKeepAlive(Threads.newSingleThreadExecutor(YugabyteDBConnector.class, connectorConfig.getLogicalName(), KEEP_ALIVE_THREAD_NAME)); initSchema(); @@ -200,7 +200,7 @@ public void execute(ChangeEventSourceContext context, PostgresPartition partitio replicationStream.set(replicationConnection.startStreaming(walPosition.getLastEventStoredLsn(), walPosition)); stream = this.replicationStream.get(); - stream.startKeepAlive(Threads.newSingleThreadExecutor(YBPostgresConnector.class, connectorConfig.getLogicalName(), KEEP_ALIVE_THREAD_NAME)); + stream.startKeepAlive(Threads.newSingleThreadExecutor(YugabyteDBConnector.class, connectorConfig.getLogicalName(), KEEP_ALIVE_THREAD_NAME)); } } else { LOGGER.info("Connector config provide.transaction.metadata is set to true. Therefore, skip records filtering in order to ship entire transactions."); diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/ReplicaIdentityMapper.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/ReplicaIdentityMapper.java index 9b93e4d7520..85d1a2bee27 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/ReplicaIdentityMapper.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/ReplicaIdentityMapper.java @@ -21,7 +21,7 @@ import io.debezium.relational.TableId; /** - * Class that records Replica Identity information for the {@link YBPostgresConnector} + * Class that records Replica Identity information for the {@link YugabyteDBConnector} * @author Ben White, Miguel Sotomayor */ @Immutable diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YBPostgresConnector.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YugabyteDBConnector.java similarity index 98% rename from debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YBPostgresConnector.java rename to debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YugabyteDBConnector.java index 850d544706f..335d73bfb53 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YBPostgresConnector.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/YugabyteDBConnector.java @@ -36,12 +36,12 @@ * * @author Horia Chiorean */ -public class YBPostgresConnector extends RelationalBaseSourceConnector { +public class YugabyteDBConnector extends RelationalBaseSourceConnector { - private static final Logger LOGGER = LoggerFactory.getLogger(YBPostgresConnector.class); + private static final Logger LOGGER = LoggerFactory.getLogger(YugabyteDBConnector.class); private Map props; - public YBPostgresConnector() { + public YugabyteDBConnector() { } @Override diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/metadata/PostgresConnectorMetadata.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/metadata/PostgresConnectorMetadata.java index 66801d25874..0f879647393 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/metadata/PostgresConnectorMetadata.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/metadata/PostgresConnectorMetadata.java @@ -7,7 +7,7 @@ import io.debezium.config.Field; import io.debezium.connector.postgresql.Module; -import io.debezium.connector.postgresql.YBPostgresConnector; +import io.debezium.connector.postgresql.YugabyteDBConnector; import io.debezium.connector.postgresql.PostgresConnectorConfig; import io.debezium.metadata.ConnectorDescriptor; import io.debezium.metadata.ConnectorMetadata; @@ -16,7 +16,7 @@ public class PostgresConnectorMetadata implements ConnectorMetadata { @Override public ConnectorDescriptor getConnectorDescriptor() { - return new ConnectorDescriptor("postgres", "Debezium PostgreSQL Connector", YBPostgresConnector.class.getName(), Module.version()); + return new ConnectorDescriptor("postgres", "Debezium PostgreSQL Connector", YugabyteDBConnector.class.getName(), Module.version()); } @Override diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResource.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResource.java index 1a854745a54..91d52f3eb54 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResource.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResource.java @@ -16,7 +16,7 @@ import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; -import io.debezium.connector.postgresql.YBPostgresConnector; +import io.debezium.connector.postgresql.YugabyteDBConnector; import org.apache.kafka.connect.health.ConnectClusterState; import io.debezium.config.Configuration; @@ -36,7 +36,7 @@ @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public class DebeziumPostgresConnectorResource - implements SchemaResource, ConnectionValidationResource, FilterValidationResource, MetricsResource { + implements SchemaResource, ConnectionValidationResource, FilterValidationResource, MetricsResource { public static final String BASE_PATH = "/debezium/postgres"; public static final String VERSION_ENDPOINT = "/version"; @@ -53,8 +53,8 @@ public String getConnectorVersion() { } @Override - public YBPostgresConnector getConnector() { - return new YBPostgresConnector(); + public YugabyteDBConnector getConnector() { + return new YugabyteDBConnector(); } @Override diff --git a/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.source.SourceConnector b/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.source.SourceConnector index 79070ced248..2f31254804d 100644 --- a/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.source.SourceConnector +++ b/debezium-connector-postgres/src/main/resources/META-INF/services/org.apache.kafka.connect.source.SourceConnector @@ -1 +1 @@ -io.debezium.connector.postgresql.YBPostgresConnector \ No newline at end of file +io.debezium.connector.postgresql.YugabyteDBConnector \ No newline at end of file diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/BlockingSnapshotIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/BlockingSnapshotIT.java index d48a2653367..f57e9985d0d 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/BlockingSnapshotIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/BlockingSnapshotIT.java @@ -78,8 +78,8 @@ protected Configuration.Builder mutableConfig(boolean signalTableOnly, boolean s } @Override - protected Class connectorClass() { - return YBPostgresConnector.class; + protected Class connectorClass() { + return YugabyteDBConnector.class; } @Override diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CloudEventsConverterIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CloudEventsConverterIT.java index bc1a0dfe143..48ed0108ab7 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CloudEventsConverterIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CloudEventsConverterIT.java @@ -16,11 +16,11 @@ import io.debezium.jdbc.JdbcConnection; /** - * Integration test for {@link io.debezium.converters.CloudEventsConverter} with {@link YBPostgresConnector} + * Integration test for {@link io.debezium.converters.CloudEventsConverter} with {@link YugabyteDBConnector} * * @author Roman Kudryashov */ -public class CloudEventsConverterIT extends AbstractCloudEventsConverterTest { +public class CloudEventsConverterIT extends AbstractCloudEventsConverterTest { private static final String SETUP_SCHEMA = "DROP SCHEMA IF EXISTS s1 CASCADE;" + "CREATE SCHEMA s1;"; @@ -51,8 +51,8 @@ public void beforeEach() throws Exception { } @Override - protected Class getConnectorClass() { - return YBPostgresConnector.class; + protected Class getConnectorClass() { + return YugabyteDBConnector.class; } @Override diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomTestSnapshot.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomTestSnapshot.java index e98884d255b..3b2dd3be192 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomTestSnapshot.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomTestSnapshot.java @@ -16,7 +16,7 @@ import io.debezium.relational.TableId; /** - * This is a small class used in YBPostgresConnectorIT to test a custom snapshot + * This is a small class used in YugabyteDBConnectorIT to test a custom snapshot * * It is tightly coupled to the test there, but needs to be placed here in order * to allow for class loading to work diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DebeziumEngineIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DebeziumEngineIT.java index 9fe7a6f8a7e..3fcaf3dfd03 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DebeziumEngineIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DebeziumEngineIT.java @@ -82,7 +82,7 @@ public void shouldSerializeToJson() throws Exception { final Properties props = new Properties(); props.putAll(TestHelper.defaultConfig().build().asMap()); props.setProperty("name", "debezium-engine"); - props.setProperty("connector.class", "io.debezium.connector.postgresql.YBPostgresConnector"); + props.setProperty("connector.class", "io.debezium.connector.postgresql.YugabyteDBConnector"); props.setProperty(StandaloneConfig.OFFSET_STORAGE_FILE_FILENAME_CONFIG, OFFSET_STORE_PATH.toAbsolutePath().toString()); props.setProperty("offset.flush.interval.ms", "0"); @@ -129,7 +129,7 @@ public void shouldSerializeToAvro() throws Exception { final Properties props = new Properties(); props.putAll(TestHelper.defaultConfig().build().asMap()); props.setProperty("name", "debezium-engine"); - props.setProperty("connector.class", "io.debezium.connector.postgresql.YBPostgresConnector"); + props.setProperty("connector.class", "io.debezium.connector.postgresql.YugabyteDBConnector"); props.setProperty(StandaloneConfig.OFFSET_STORAGE_FILE_FILENAME_CONFIG, OFFSET_STORE_PATH.toAbsolutePath().toString()); props.setProperty("offset.flush.interval.ms", "0"); @@ -169,7 +169,7 @@ public void shouldSerializeToCloudEvents() throws Exception { final Properties props = new Properties(); props.putAll(TestHelper.defaultConfig().build().asMap()); props.setProperty("name", "debezium-engine"); - props.setProperty("connector.class", "io.debezium.connector.postgresql.YBPostgresConnector"); + props.setProperty("connector.class", "io.debezium.connector.postgresql.YugabyteDBConnector"); props.setProperty(StandaloneConfig.OFFSET_STORAGE_FILE_FILENAME_CONFIG, OFFSET_STORE_PATH.toAbsolutePath().toString()); props.setProperty("offset.flush.interval.ms", "0"); @@ -244,7 +244,7 @@ public void testOffsetsCommitAfterStop() throws Exception { final Properties props = new Properties(); props.putAll(TestHelper.defaultConfig().build().asMap()); props.setProperty("name", "debezium-engine"); - props.setProperty("connector.class", "io.debezium.connector.postgresql.YBPostgresConnector"); + props.setProperty("connector.class", "io.debezium.connector.postgresql.YugabyteDBConnector"); props.setProperty(StandaloneConfig.OFFSET_STORAGE_FILE_FILENAME_CONFIG, OFFSET_STORE_PATH.toAbsolutePath().toString()); props.setProperty("offset.flush.interval.ms", "3000"); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DomainTypesIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DomainTypesIT.java index 08e299268cc..de4d6e1105d 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DomainTypesIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/DomainTypesIT.java @@ -43,7 +43,7 @@ public void before() throws SQLException { @Test @FixFor("DBZ-3657") public void shouldNotChokeOnDomainTypeInArray() throws Exception { - start(YBPostgresConnector.class, TestHelper.defaultConfig() + start(YugabyteDBConnector.class, TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER) .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "domaintypes") .build()); @@ -63,7 +63,7 @@ public void shouldNotChokeOnDomainTypeInArray() throws Exception { @Test @FixFor("DBZ-3657") public void shouldExportDomainTypeInArrayAsUnknown() throws Exception { - start(YBPostgresConnector.class, TestHelper.defaultConfig() + start(YugabyteDBConnector.class, TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER) .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "domaintypes") .with(PostgresConnectorConfig.INCLUDE_UNKNOWN_DATATYPES, true) diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/IncrementalSnapshotIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/IncrementalSnapshotIT.java index dbd5fa7573e..caa9eba39ce 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/IncrementalSnapshotIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/IncrementalSnapshotIT.java @@ -41,7 +41,7 @@ import io.debezium.util.Collect; import io.debezium.util.Testing; -public class IncrementalSnapshotIT extends AbstractIncrementalSnapshotTest { +public class IncrementalSnapshotIT extends AbstractIncrementalSnapshotTest { private static final Logger LOGGER = LoggerFactory.getLogger(IncrementalSnapshotIT.class); @@ -134,8 +134,8 @@ protected Configuration.Builder mutableConfig(boolean signalTableOnly, boolean s } @Override - protected Class connectorClass() { - return YBPostgresConnector.class; + protected Class connectorClass() { + return YugabyteDBConnector.class; } @Override diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/LogicalDecodingMessageIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/LogicalDecodingMessageIT.java index 4fdd7c3d02b..587c08b8010 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/LogicalDecodingMessageIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/LogicalDecodingMessageIT.java @@ -76,7 +76,7 @@ public void shouldNotConsumeLogicalDecodingMessagesWhenAllPrefixesAreInTheExclud TestHelper.execute(SETUP_TABLES_STMT); Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.LOGICAL_DECODING_MESSAGE_PREFIX_EXCLUDE_LIST, ".*"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -99,7 +99,7 @@ public void shouldConsumeNonTransactionalLogicalDecodingMessages() throws Except TestHelper.execute(SETUP_TABLES_STMT); Configuration.Builder configBuilder = TestHelper.defaultConfig(); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -138,7 +138,7 @@ public void shouldConsumeTransactionalLogicalDecodingMessages() throws Exception TestHelper.execute(SETUP_TABLES_STMT); Configuration.Builder configBuilder = TestHelper.defaultConfig(); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -180,7 +180,7 @@ public void shouldApplyBinaryHandlingMode() throws Exception { Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.BINARY_HANDLING_MODE, "base64"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -206,7 +206,7 @@ public void shouldNotConsumeLogicalDecodingMessagesWithExcludedPrefixes() throws TestHelper.execute(SETUP_TABLES_STMT); Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.LOGICAL_DECODING_MESSAGE_PREFIX_EXCLUDE_LIST, "excluded_prefix, prefix:excluded"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -232,7 +232,7 @@ public void shouldOnlyConsumeLogicalDecodingMessagesWithIncludedPrefixes() throw TestHelper.execute(SETUP_TABLES_STMT); Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.LOGICAL_DECODING_MESSAGE_PREFIX_INCLUDE_LIST, "included_prefix, prefix:included, ano.*er_included"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/NotificationsIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/NotificationsIT.java index 5c58c04b244..7c443c4f5fa 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/NotificationsIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/NotificationsIT.java @@ -14,7 +14,7 @@ import io.debezium.config.Configuration; import io.debezium.pipeline.notification.AbstractNotificationsIT; -public class NotificationsIT extends AbstractNotificationsIT { +public class NotificationsIT extends AbstractNotificationsIT { @Before public void before() throws SQLException { @@ -31,8 +31,8 @@ public void after() { } @Override - protected Class connectorClass() { - return YBPostgresConnector.class; + protected Class connectorClass() { + return YugabyteDBConnector.class; } @Override diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/OutboxEventRouterIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/OutboxEventRouterIT.java index 3f80d19baba..b1731a3a596 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/OutboxEventRouterIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/OutboxEventRouterIT.java @@ -19,11 +19,11 @@ import io.debezium.transforms.outbox.AbstractEventRouterTest; /** - * Integration test for {@link io.debezium.transforms.outbox.EventRouter} with {@link YBPostgresConnector} + * Integration test for {@link io.debezium.transforms.outbox.EventRouter} with {@link YugabyteDBConnector} * * @author Renato Mefi (gh@mefi.in) */ -public class OutboxEventRouterIT extends AbstractEventRouterTest { +public class OutboxEventRouterIT extends AbstractEventRouterTest { private static final String SETUP_OUTBOX_SCHEMA = "DROP SCHEMA IF EXISTS outboxsmtit CASCADE;" + "CREATE SCHEMA outboxsmtit;"; @@ -47,8 +47,8 @@ public void beforeEach() throws Exception { } @Override - protected Class getConnectorClass() { - return YBPostgresConnector.class; + protected Class getConnectorClass() { + return YugabyteDBConnector.class; } @Override diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresDefaultValueConverterIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresDefaultValueConverterIT.java index 49ae37a7524..b54e0e1fbc2 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresDefaultValueConverterIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresDefaultValueConverterIT.java @@ -52,7 +52,7 @@ public void shouldSetTheNullValueInSnapshot() throws Exception { Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.getValue()) .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "s1"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted("postgres", TestHelper.TEST_SERVER); @@ -69,7 +69,7 @@ public void shouldSetTheNullValueInStreaming() throws Exception { Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.getValue()) .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "s1"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted("postgres", TestHelper.TEST_SERVER); @@ -99,7 +99,7 @@ public void testShouldHandleDefaultValueFunctionsWithSchemaPrefixes() throws Exc TestHelper.execute(ddl); Configuration config = TestHelper.defaultConfig().build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMetricsIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMetricsIT.java index 7afb9c95624..5cc76aa6c4a 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMetricsIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMetricsIT.java @@ -59,7 +59,7 @@ public void after() throws Exception { @Test public void testLifecycle() throws Exception { // start connector - start(YBPostgresConnector.class, + start(YugabyteDBConnector.class, TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.ALWAYS) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) @@ -100,7 +100,7 @@ public void testSnapshotOnlyMetrics() throws Exception { TestHelper.execute(INIT_STATEMENTS, INSERT_STATEMENTS); // start connector - start(YBPostgresConnector.class, + start(YugabyteDBConnector.class, TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) @@ -115,7 +115,7 @@ public void testSnapshotAndStreamingMetrics() throws Exception { TestHelper.execute(INIT_STATEMENTS, INSERT_STATEMENTS); // start connector - start(YBPostgresConnector.class, + start(YugabyteDBConnector.class, TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.ALWAYS) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) @@ -138,7 +138,7 @@ public void testSnapshotAndStreamingWithCustomMetrics() throws Exception { .with(PostgresConnectorConfig.CUSTOM_METRIC_TAGS, "env=test,bu=bigdata") .build(); Map customMetricTags = new PostgresConnectorConfig(config).getCustomMetricTags(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertSnapshotWithCustomMetrics(customMetricTags); assertStreamingWithCustomMetrics(customMetricTags); @@ -150,7 +150,7 @@ public void testStreamingOnlyMetrics() throws Exception { TestHelper.execute(INIT_STATEMENTS); // start connector - start(YBPostgresConnector.class, + start(YugabyteDBConnector.class, TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) @@ -275,7 +275,7 @@ public void oneRecordInQueue() throws Exception { .with(PostgresConnectorConfig.MAX_BATCH_SIZE, 1) .with(PostgresConnectorConfig.POLL_INTERVAL_MS, 100L) .with(PostgresConnectorConfig.MAX_QUEUE_SIZE_IN_BYTES, 10000L); - start(YBPostgresConnector.class, configBuilder.build(), loggingCompletion(), null, x -> { + start(YugabyteDBConnector.class, configBuilder.build(), loggingCompletion(), null, x -> { LOGGER.info("Record '{}' arrived", x); step1.countDown(); try { diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMoneyIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMoneyIT.java index 38b9058655b..a444e7245b5 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMoneyIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresMoneyIT.java @@ -51,7 +51,7 @@ public void shouldReceiveChangesForInsertsWithPreciseMode() throws Exception { Configuration config = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); // insert 2 records for testing @@ -77,7 +77,7 @@ public void shouldReceiveChangesForInsertsWithStringMode() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER) .with(PostgresConnectorConfig.DECIMAL_HANDLING_MODE, "string") .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); // insert 2 records for testing @@ -103,7 +103,7 @@ public void shouldReceiveChangesForInsertsWithDoubleMode() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER) .with(PostgresConnectorConfig.DECIMAL_HANDLING_MODE, "double") .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); // insert 2 records for testing @@ -128,7 +128,7 @@ public void shouldReceiveChangesForInsertNullAndZeroMoney() throws Exception { Configuration config = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); // insert 2 records for testing diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresReselectColumnsProcessorIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresReselectColumnsProcessorIT.java index b917a9eb258..db32e16639e 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresReselectColumnsProcessorIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresReselectColumnsProcessorIT.java @@ -30,7 +30,7 @@ * * @author Chris Cranford */ -public class PostgresReselectColumnsProcessorIT extends AbstractReselectProcessorTest { +public class PostgresReselectColumnsProcessorIT extends AbstractReselectProcessorTest { public static final String CREATE_STMT = "DROP SCHEMA IF EXISTS s1 CASCADE;" + "CREATE SCHEMA s1; "; @@ -53,8 +53,8 @@ public void afterEach() throws Exception { } @Override - protected Class getConnectorClass() { - return YBPostgresConnector.class; + protected Class getConnectorClass() { + return YugabyteDBConnector.class; } @Override @@ -120,7 +120,7 @@ public void testToastColumnReselectedWhenValueIsUnavailable() throws Exception { .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s1\\.dbz4321_toast") .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); waitForStreamingStarted(); final String text = RandomStringUtils.randomAlphabetic(10000); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresShutdownIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresShutdownIT.java index 1817e6ea6b8..a1b1adaa23e 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresShutdownIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresShutdownIT.java @@ -34,7 +34,7 @@ import io.debezium.util.Testing; /** - * Integration test for {@link YBPostgresConnector} using an {@link EmbeddedEngine} and Testcontainers infrastructure for when Postgres is shutdown during streaming + * Integration test for {@link YugabyteDBConnector} using an {@link EmbeddedEngine} and Testcontainers infrastructure for when Postgres is shutdown during streaming */ public class PostgresShutdownIT extends AbstractConnectorTest { @@ -114,7 +114,7 @@ public void shouldStopOnPostgresFastShutdown() throws Exception { String initialHeartbeat = postgresConnection.queryAndMap( "SELECT ts FROM s1.heartbeat;", postgresConnection.singleResultMapper(rs -> rs.getString("ts"), "Could not fetch keepalive info")); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted("postgres", TestHelper.TEST_SERVER); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresSkipMessagesWithoutChangeConfigIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresSkipMessagesWithoutChangeConfigIT.java index 2bae1d45796..cfe2ccbfdb5 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresSkipMessagesWithoutChangeConfigIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresSkipMessagesWithoutChangeConfigIT.java @@ -58,7 +58,7 @@ public void shouldSkipEventsWithNoChangeInIncludedColumnsWhenSkipEnabled() throw .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); TestHelper.execute("INSERT INTO updates_test.debezium_test (id,white,black) VALUES (1,1,1);"); @@ -98,7 +98,7 @@ public void shouldSkipEventsWithNoChangeInIncludedColumnsWhenSkipEnabledWithExcl .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); TestHelper.execute("INSERT INTO updates_test.debezium_test (id,white,black) VALUES (1,1,1);"); @@ -136,7 +136,7 @@ public void shouldNotSkipEventsWithNoChangeInIncludedColumnsWhenSkipEnabledButTa .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); TestHelper.execute("INSERT INTO updates_test.debezium_test (id,white,black) VALUES (1,1,1);"); @@ -177,7 +177,7 @@ public void shouldNotSkipEventsWithNoChangeInIncludedColumnsWhenSkipDisabled() t .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); TestHelper.execute("INSERT INTO updates_test.debezium_test (id,white,black) VALUES (1,1,1);"); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PublicGeometryIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PublicGeometryIT.java index 454e8af3cd6..67a1b27861a 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PublicGeometryIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PublicGeometryIT.java @@ -90,7 +90,7 @@ public void shouldReceiveChangesForInsertsWithPostgisTypes() throws Exception { } private void setupRecordsProducer(Configuration.Builder config) { - start(YBPostgresConnector.class, config + start(YugabyteDBConnector.class, config .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER) .build()); assertConnectorIsRunning(); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/RecordsSnapshotProducerIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/RecordsSnapshotProducerIT.java index 44146d33241..551504558d8 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/RecordsSnapshotProducerIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/RecordsSnapshotProducerIT.java @@ -1218,7 +1218,7 @@ public void shouldIncludePartitionedTableIntoSnapshot() throws Exception { Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY.getValue()) .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s1.part"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -1256,7 +1256,7 @@ public void shouldGenerateSnapshotWhenSignalDataCollectionIsPresentWithoutTableI private void buildNoStreamProducer(Configuration.Builder config) { alterConfig(config); - start(YBPostgresConnector.class, config + start(YugabyteDBConnector.class, config .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY) .with(PostgresConnectorConfig.SNAPSHOT_MODE_CLASS, CustomTestSnapshot.class.getName()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) @@ -1266,7 +1266,7 @@ private void buildNoStreamProducer(Configuration.Builder config) { private void buildWithStreamProducer(Configuration.Builder config) { alterConfig(config); - start(YBPostgresConnector.class, config + start(YugabyteDBConnector.class, config .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.ALWAYS) .with(PostgresConnectorConfig.SNAPSHOT_MODE_CLASS, CustomTestSnapshot.class.getName()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/RecordsStreamProducerIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/RecordsStreamProducerIT.java index ea4611af835..1967ea0006f 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/RecordsStreamProducerIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/RecordsStreamProducerIT.java @@ -150,7 +150,7 @@ public void before() throws Exception { private void startConnector(Function customConfig, boolean waitForSnapshot, Predicate isStopRecord) throws InterruptedException { - start(YBPostgresConnector.class, new PostgresConnectorConfig(customConfig.apply(TestHelper.defaultConfig() + start(YugabyteDBConnector.class, new PostgresConnectorConfig(customConfig.apply(TestHelper.defaultConfig() .with(PostgresConnectorConfig.INCLUDE_UNKNOWN_DATATYPES, false) .with(PostgresConnectorConfig.SCHEMA_EXCLUDE_LIST, "postgis") .with(PostgresConnectorConfig.SNAPSHOT_MODE, waitForSnapshot ? SnapshotMode.INITIAL : SnapshotMode.NEVER)) diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SignalsIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SignalsIT.java index c081b44f401..a83df14805f 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SignalsIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SignalsIT.java @@ -70,7 +70,7 @@ public void signalLog() throws InterruptedException { .with(PostgresConnectorConfig.SIGNAL_DATA_COLLECTION, "s1.debezium_signal") .with(CommonConnectorConfig.SIGNAL_POLL_INTERVAL_MS, "500") .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); TestHelper.waitForDefaultReplicationSlotBeActive(); @@ -105,7 +105,7 @@ public void signalingDisabled() throws InterruptedException { .with(CommonConnectorConfig.SIGNAL_POLL_INTERVAL_MS, "500") .with(CommonConnectorConfig.SIGNAL_ENABLED_CHANNELS, "") .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); TestHelper.waitForDefaultReplicationSlotBeActive(); @@ -138,7 +138,7 @@ public void signalSchemaChange() throws InterruptedException { .with(PostgresConnectorConfig.SIGNAL_DATA_COLLECTION, "s1.debezium_signal") .with(CommonConnectorConfig.SIGNAL_POLL_INTERVAL_MS, "500") .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); TestHelper.waitForDefaultReplicationSlotBeActive(); @@ -218,7 +218,7 @@ public void jmxSignals() throws Exception { .with(CommonConnectorConfig.SIGNAL_POLL_INTERVAL_MS, "500") .with(CommonConnectorConfig.SIGNAL_ENABLED_CHANNELS, "jmx") .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); TestHelper.waitForDefaultReplicationSlotBeActive(); @@ -244,7 +244,7 @@ public void customAction() throws Exception { .with(CommonConnectorConfig.SIGNAL_POLL_INTERVAL_MS, "500") .with(CommonConnectorConfig.SIGNAL_ENABLED_CHANNELS, "jmx") .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); TestHelper.waitForDefaultReplicationSlotBeActive(); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SnapshotWithOverridesProducerIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SnapshotWithOverridesProducerIT.java index 0beef910bdd..0257196eff4 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SnapshotWithOverridesProducerIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/SnapshotWithOverridesProducerIT.java @@ -86,7 +86,7 @@ public void shouldUseMultipleOverriddenSelectStatementsDuringSnapshotting() thro } private void buildProducer(Configuration.Builder config) { - start(YBPostgresConnector.class, config + start(YugabyteDBConnector.class, config .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY) .build()); assertConnectorIsRunning(); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TablesWithoutPrimaryKeyIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TablesWithoutPrimaryKeyIT.java index 3a9c451d9f9..b0493525f77 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TablesWithoutPrimaryKeyIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TablesWithoutPrimaryKeyIT.java @@ -44,7 +44,7 @@ public void before() throws SQLException { public void shouldProcessFromSnapshot() throws Exception { TestHelper.execute(STATEMENTS); - start(YBPostgresConnector.class, TestHelper.defaultConfig() + start(YugabyteDBConnector.class, TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY) .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "nopk") .build()); @@ -66,7 +66,7 @@ public void shouldProcessFromSnapshot() throws Exception { public void shouldProcessFromSnapshotOld() throws Exception { TestHelper.execute(STATEMENTS); - start(YBPostgresConnector.class, TestHelper.defaultConfig() + start(YugabyteDBConnector.class, TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY) .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "nopk") .build()); @@ -86,7 +86,7 @@ public void shouldProcessFromSnapshotOld() throws Exception { @Test public void shouldProcessFromStreaming() throws Exception { - start(YBPostgresConnector.class, TestHelper.defaultConfig() + start(YugabyteDBConnector.class, TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER) .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "nopk") .build()); @@ -125,7 +125,7 @@ public void shouldProcessFromStreaming() throws Exception { @Test public void shouldProcessFromStreamingOld() throws Exception { - start(YBPostgresConnector.class, TestHelper.defaultConfig() + start(YugabyteDBConnector.class, TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER) .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "nopk") .build()); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TransactionMetadataIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TransactionMetadataIT.java index 3ab3ba1e94c..1674f342822 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TransactionMetadataIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/TransactionMetadataIT.java @@ -80,7 +80,7 @@ public void transactionMetadata() throws InterruptedException { .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .with(PostgresConnectorConfig.PROVIDE_TRANSACTION_METADATA, true) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); TestHelper.waitForDefaultReplicationSlotBeActive(); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YBPostgresConnectorConfigDefTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteDBConnectorConfigDefTest.java similarity index 93% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YBPostgresConnectorConfigDefTest.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteDBConnectorConfigDefTest.java index 1ae5e9ab5a9..c17ecb4f681 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YBPostgresConnectorConfigDefTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteDBConnectorConfigDefTest.java @@ -12,10 +12,10 @@ import io.debezium.config.ConfigDefinitionMetadataTest; import io.debezium.config.Configuration; -public class YBPostgresConnectorConfigDefTest extends ConfigDefinitionMetadataTest { +public class YugabyteDBConnectorConfigDefTest extends ConfigDefinitionMetadataTest { - public YBPostgresConnectorConfigDefTest() { - super(new YBPostgresConnector()); + public YugabyteDBConnectorConfigDefTest() { + super(new YugabyteDBConnector()); } @Test diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YBPostgresConnectorIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteDBConnectorIT.java similarity index 96% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YBPostgresConnectorIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteDBConnectorIT.java index 6531ed9f732..a85f7f04f7d 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YBPostgresConnectorIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteDBConnectorIT.java @@ -107,12 +107,12 @@ import org.slf4j.LoggerFactory; /** - * Integration test for {@link YBPostgresConnector} using an {@link io.debezium.engine.DebeziumEngine} + * Integration test for {@link YugabyteDBConnector} using an {@link io.debezium.engine.DebeziumEngine} * * @author Horia Chiorean (hchiorea@redhat.com) */ -public class YBPostgresConnectorIT extends AbstractConnectorTest { - private static final Logger LOGGER = LoggerFactory.getLogger(YBPostgresConnectorIT.class); +public class YugabyteDBConnectorIT extends AbstractConnectorTest { + private static final Logger LOGGER = LoggerFactory.getLogger(YugabyteDBConnectorIT.class); /* * Specific tests that need to extend the initial DDL set should do it in a form of @@ -127,7 +127,7 @@ public class YBPostgresConnectorIT extends AbstractConnectorTest { "CREATE TABLE s1.a (pk SERIAL, aa integer, PRIMARY KEY(pk));" + "CREATE TABLE s2.a (pk SERIAL, aa integer, bb varchar(20), PRIMARY KEY(pk));"; protected static final String SETUP_TABLES_STMT = CREATE_TABLES_STMT + INSERT_STMT; - private YBPostgresConnector connector; + private YugabyteDBConnector connector; @Rule public final TestRule skipName = new SkipTestDependingOnDecoderPluginNameRule(); @@ -151,7 +151,7 @@ public void after() { @Test public void shouldValidateConnectorConfigDef() { - connector = new YBPostgresConnector(); + connector = new YugabyteDBConnector(); ConfigDef configDef = connector.config(); assertThat(configDef).isNotNull(); PostgresConnectorConfig.ALL_FIELDS.forEach(this::validateFieldDef); @@ -164,7 +164,7 @@ public void shouldNotStartWithInvalidConfiguration() throws Exception { // we expect the engine will log at least one error, so preface it ... logger.info("Attempting to start the connector with an INVALID configuration, so MULTIPLE error messages & one exceptions will appear in the log"); - start(YBPostgresConnector.class, config, (success, msg, error) -> { + start(YugabyteDBConnector.class, config, (success, msg, error) -> { assertThat(success).isFalse(); assertThat(error).isNotNull(); }); @@ -174,7 +174,7 @@ public void shouldNotStartWithInvalidConfiguration() throws Exception { @Test public void shouldValidateMinimalConfiguration() throws Exception { Configuration config = TestHelper.defaultConfig().build(); - Config validateConfig = new YBPostgresConnector().validate(config.asMap()); + Config validateConfig = new YugabyteDBConnector().validate(config.asMap()); validateConfig.configValues().forEach(configValue -> assertTrue("Unexpected error for: " + configValue.name(), configValue.errorMessages().isEmpty())); } @@ -193,7 +193,7 @@ public void shouldNotStartWithInvalidSlotConfigAndUserRoles() throws Exception { .with(PostgresConnectorConfig.SLOT_NAME, ReplicationConnection.Builder.DEFAULT_SLOT_NAME) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); waitForStreamingRunning(); Configuration failingConfig = TestHelper.defaultConfig() @@ -203,7 +203,7 @@ public void shouldNotStartWithInvalidSlotConfigAndUserRoles() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER) .with(PostgresConnectorConfig.SLOT_NAME, ReplicationConnection.Builder.DEFAULT_SLOT_NAME) .build(); - List validatedConfig = new YBPostgresConnector().validate(failingConfig.asMap()).configValues(); + List validatedConfig = new YugabyteDBConnector().validate(failingConfig.asMap()).configValues(); final List invalidProperties = Collections.singletonList("database.user"); validatedConfig.forEach( @@ -218,7 +218,7 @@ public void shouldNotStartWithInvalidSlotConfigAndUserRoles() throws Exception { public void shouldValidateConfiguration() throws Exception { // use an empty configuration which should be invalid because of the lack of DB connection details Configuration config = Configuration.create().build(); - YBPostgresConnector connector = new YBPostgresConnector(); + YugabyteDBConnector connector = new YugabyteDBConnector(); Config validatedConfig = connector.validate(config.asMap()); // validate that the required fields have errors assertConfigurationErrors(validatedConfig, PostgresConnectorConfig.HOSTNAME, 1); @@ -263,7 +263,7 @@ public void shouldValidateReplicationSlotName() throws Exception { Configuration config = Configuration.create() .with(PostgresConnectorConfig.SLOT_NAME, "xx-aa") .build(); - YBPostgresConnector connector = new YBPostgresConnector(); + YugabyteDBConnector connector = new YugabyteDBConnector(); Config validatedConfig = connector.validate(config.asMap()); assertConfigurationErrors(validatedConfig, PostgresConnectorConfig.SLOT_NAME, 1); @@ -275,7 +275,7 @@ public void shouldSupportSSLParameters() throws Exception { // SSL is enabled Configuration config = TestHelper.defaultConfig().with(PostgresConnectorConfig.SSL_MODE, PostgresConnectorConfig.SecureConnectionMode.REQUIRED).build(); - start(YBPostgresConnector.class, config, (success, msg, error) -> { + start(YugabyteDBConnector.class, config, (success, msg, error) -> { if (TestHelper.shouldSSLConnectionFail()) { // we expect the task to fail at startup when we're printing the server info assertThat(success).isFalse(); @@ -301,7 +301,7 @@ public void shouldProduceEventsWithInitialSnapshot() throws Exception { Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); // check the records from the snapshot @@ -320,7 +320,7 @@ public void shouldProduceEventsWithInitialSnapshot() throws Exception { // start the connector back up and check that a new snapshot has not been performed (we're running initial only mode) // but the 2 records that we were inserted while we were down will be retrieved - start(YBPostgresConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); + start(YugabyteDBConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); assertConnectorIsRunning(); assertRecordsAfterInsert(2, 3, 3); @@ -333,7 +333,7 @@ public void initialSnapshotWithExistingSlot() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); // now stop the connector stopConnector(); @@ -350,7 +350,7 @@ public void initialSnapshotWithExistingSlot() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE); - start(YBPostgresConnector.class, configBuilderInitial.build()); + start(YugabyteDBConnector.class, configBuilderInitial.build()); assertConnectorIsRunning(); assertRecordsFromSnapshot(2, 1, 1); @@ -361,7 +361,7 @@ public void initialSnapshotWithExistingSlot() throws Exception { @FixFor("DBZ-1235") public void shouldUseMillisecondsForTransactionCommitTime() throws InterruptedException { TestHelper.execute(SETUP_TABLES_STMT); - start(YBPostgresConnector.class, TestHelper.defaultConfig().build()); + start(YugabyteDBConnector.class, TestHelper.defaultConfig().build()); assertConnectorIsRunning(); // check records from snapshot @@ -395,7 +395,7 @@ public void shouldConsumeMessagesFromSnapshot() throws Exception { .with(PostgresConnectorConfig.MAX_QUEUE_SIZE, recordCount / 2) .with(PostgresConnectorConfig.MAX_BATCH_SIZE, 10) .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "s1"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -416,7 +416,7 @@ public void shouldConsumeMessagesFromSnapshotOld() throws Exception { .with(PostgresConnectorConfig.MAX_QUEUE_SIZE, recordCount / 2) .with(PostgresConnectorConfig.MAX_BATCH_SIZE, 10) .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "s1"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -447,7 +447,7 @@ public void shouldReceiveChangesForChangePKColumnDefinition() throws Exception { "CREATE TABLE changepk.test_table (pk SERIAL, text TEXT, PRIMARY KEY(pk));", "INSERT INTO changepk.test_table(text) VALUES ('insert');"); - start(YBPostgresConnector.class, config.getConfig()); + start(YugabyteDBConnector.class, config.getConfig()); assertConnectorIsRunning(); @@ -488,7 +488,7 @@ public void shouldReceiveChangesForChangePKColumnDefinition() throws Exception { + "ALTER TABLE changepk.test_table ADD PRIMARY KEY(newpk,pk3);" + "INSERT INTO changepk.test_table VALUES(5, 'dropandaddpkcol',10)"); - start(YBPostgresConnector.class, config.getConfig()); + start(YugabyteDBConnector.class, config.getConfig()); records = consumeRecordsByTopic(2); @@ -548,7 +548,7 @@ public void shouldReceiveChangesForChangeColumnDefault() throws Exception { final String topicName = topicName("default_change.test_table"); - start(YBPostgresConnector.class, config.getConfig()); + start(YugabyteDBConnector.class, config.getConfig()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -630,7 +630,7 @@ public void shouldReceiveChangesForChangeColumnDefault() throws Exception { TestHelper.execute("INSERT INTO default_change.test_table(i, text) VALUES (DEFAULT, DEFAULT);"); - start(YBPostgresConnector.class, config.getConfig()); + start(YugabyteDBConnector.class, config.getConfig()); assertConnectorIsRunning(); @@ -706,7 +706,7 @@ public void showThatSchemaColumnDefaultMayApplyRetroactively() throws Exception "CREATE TABLE default_change.test_table (pk SERIAL, i INT DEFAULT 1, text TEXT DEFAULT 'foo', PRIMARY KEY(pk));", "INSERT INTO default_change.test_table(i, text) VALUES (DEFAULT, DEFAULT);"); - start(YBPostgresConnector.class, config.getConfig()); + start(YugabyteDBConnector.class, config.getConfig()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -738,7 +738,7 @@ public void showThatSchemaColumnDefaultMayApplyRetroactively() throws Exception "ALTER TABLE default_change.test_table ADD COLUMN tstz TIMESTAMPTZ DEFAULT '2021-03-20 14:44:28 +1'::TIMESTAMPTZ;", "INSERT INTO default_change.test_table(i, text, bi, tstz) VALUES (DEFAULT, DEFAULT, DEFAULT, DEFAULT);"); - start(YBPostgresConnector.class, config.getConfig()); + start(YugabyteDBConnector.class, config.getConfig()); assertConnectorIsRunning(); @@ -810,7 +810,7 @@ public void shouldIgnoreEventsForDeletedTable() throws Exception { Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -830,7 +830,7 @@ public void shouldIgnoreEventsForDeletedTable() throws Exception { TestHelper.execute(INSERT_STMT); TestHelper.execute("DROP TABLE s1.a"); - start(YBPostgresConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); + start(YugabyteDBConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -848,7 +848,7 @@ public void shouldNotIgnoreEventsForDeletedTable() throws Exception { Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -868,7 +868,7 @@ public void shouldNotIgnoreEventsForDeletedTable() throws Exception { TestHelper.execute(INSERT_STMT); TestHelper.execute("DROP TABLE s1.a"); - start(YBPostgresConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); + start(YugabyteDBConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -886,7 +886,7 @@ public void shouldIgnoreViews() throws Exception { Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -907,7 +907,7 @@ public void shouldIgnoreViews() throws Exception { // start the connector back up and check that a new snapshot has not been performed (we're running initial only mode) // but the 2 records that we were inserted while we were down will be retrieved - start(YBPostgresConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); + start(YugabyteDBConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -923,7 +923,7 @@ public void shouldLimitDecoderLog() throws Exception { Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -944,7 +944,7 @@ public void shouldLimitDecoderLog() throws Exception { // start the connector back up and check that a new snapshot has not been performed (we're running initial only mode) // but the 2 records that we were inserted while we were down will be retrieved - start(YBPostgresConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); + start(YugabyteDBConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -962,7 +962,7 @@ public void shouldExecuteOnConnectStatements() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.getValue()) .with(PostgresConnectorConfig.ON_CONNECT_STATEMENTS, "INSERT INTO s1.a (aa) VALUES (2); INSERT INTO s2.a (aa, bb) VALUES (2, 'hello;; world');") .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -989,7 +989,7 @@ public void shouldProduceEventsWhenSnapshotsAreNeverAllowed() throws Interrupted .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); // YB Note: Added a wait for replication slot to be active. @@ -1013,7 +1013,7 @@ public void shouldNotProduceEventsWithInitialOnlySnapshot() throws InterruptedEx .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); // check the records from the snapshot @@ -1033,7 +1033,7 @@ public void shouldProduceEventsWhenAlwaysTakingSnapshots() throws InterruptedExc Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.ALWAYS.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -1048,7 +1048,7 @@ public void shouldProduceEventsWhenAlwaysTakingSnapshots() throws InterruptedExc assertNoRecordsToConsume(); // start the connector back up and check that a new snapshot has been performed - start(YBPostgresConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); + start(YugabyteDBConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -1065,7 +1065,7 @@ public void shouldHaveBeforeImageOfUpdatedRow() throws InterruptedException { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); // YB Note: Added a wait for replication slot to be active. @@ -1112,7 +1112,7 @@ public void shouldResumeSnapshotIfFailingMidstream() throws Exception { fail("A controlled exception was expected...."); } }; - start(YBPostgresConnector.class, configBuilder.build(), completionCallback, stopOnPKPredicate(2)); + start(YugabyteDBConnector.class, configBuilder.build(), completionCallback, stopOnPKPredicate(2)); // YB Note: Increasing the wait time since the connector is taking slightly higher time to initialize. // wait until we know we've raised the exception at startup AND the engine has been shutdown if (!latch.await(TestHelper.waitTimeForRecords() * 15, TimeUnit.SECONDS)) { @@ -1128,7 +1128,7 @@ public void shouldResumeSnapshotIfFailingMidstream() throws Exception { // make sure there are no records to consume assertNoRecordsToConsume(); // start the connector back up and check that it took another full snapshot since previously it was stopped midstream - start(YBPostgresConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); + start(YugabyteDBConnector.class, configBuilder.with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE).build()); assertConnectorIsRunning(); // check that the snapshot was recreated @@ -1152,7 +1152,7 @@ public void shouldRecoverFromRetriableException() throws Exception { .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); @@ -1184,7 +1184,7 @@ public void shouldUpdateReplicaIdentity() throws Exception { .with(PostgresConnectorConfig.REPLICA_IDENTITY_AUTOSET_VALUES, "s1.a:FULL,s2.a:DEFAULT") .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -1217,7 +1217,7 @@ public void shouldUpdateReplicaIdentityWithRegExp() throws Exception { .with(PostgresConnectorConfig.REPLICA_IDENTITY_AUTOSET_VALUES, "(.*).a:FULL,s2.*:NOTHING") .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -1251,7 +1251,7 @@ public void shouldNotUpdateReplicaIdentityWithRegExpDuplicated() throws Exceptio .with(PostgresConnectorConfig.REPLICA_IDENTITY_AUTOSET_VALUES, "s.*:FULL,s2.*:NOTHING") .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -1279,7 +1279,7 @@ public void shouldUpdateReplicaIdentityWithOneTable() throws Exception { .with(PostgresConnectorConfig.REPLICA_IDENTITY_AUTOSET_VALUES, "s1.a:FULL") .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -1309,7 +1309,7 @@ public void shouldUpdateReplicaIdentityUsingIndex() throws Exception { .with(PostgresConnectorConfig.REPLICA_IDENTITY_AUTOSET_VALUES, "s1.a:FULL,s2.a:INDEX a_pkey") .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -1349,7 +1349,7 @@ public void shouldLogOwnershipErrorForReplicaIdentityUpdate() throws Exception { .with("database.password", "role_2_pass") .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -1374,7 +1374,7 @@ public void shouldCheckTablesToUpdateReplicaIdentityAreCaptured() throws Excepti .with(PostgresConnectorConfig.REPLICA_IDENTITY_AUTOSET_VALUES, "s1.a:FULL,s2.b:DEFAULT") .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -1424,7 +1424,7 @@ public void shouldTakeExcludeListFiltersIntoAccount() throws Exception { .with(PostgresConnectorConfig.TABLE_EXCLUDE_LIST, ".+b") .with(PostgresConnectorConfig.COLUMN_EXCLUDE_LIST, ".+bb"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); // check the records from the snapshot take the filters into account @@ -1470,7 +1470,7 @@ public void shouldTakeBlacklistFiltersIntoAccount() throws Exception { .with(PostgresConnectorConfig.TABLE_EXCLUDE_LIST, ".+b") .with(PostgresConnectorConfig.COLUMN_EXCLUDE_LIST, ".+bb"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); // check the records from the snapshot take the filters into account @@ -1513,7 +1513,7 @@ public void shouldTakeColumnIncludeListFilterIntoAccount() throws Exception { .with("column.mask.with.5.chars", ".+cc") .with(PostgresConnectorConfig.COLUMN_INCLUDE_LIST, ".+aa,.+cc"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); SourceRecords actualRecords = consumeRecordsByTopic(1); @@ -1542,7 +1542,7 @@ public void shouldRemoveWhiteSpaceChars() throws Exception { .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "s1") .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, tableWhitelistWithWhitespace); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); SourceRecords actualRecords = consumeRecordsByTopic(2); @@ -1572,7 +1572,7 @@ public void shouldRemoveWhiteSpaceCharsOld() throws Exception { .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "s1") .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, tableWhitelistWithWhitespace); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); SourceRecords actualRecords = consumeRecordsByTopic(2); @@ -1600,7 +1600,7 @@ public void shouldCloseTxAfterTypeQuery() throws Exception { .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s1.b") .with(PostgresConnectorConfig.INCLUDE_UNKNOWN_DATATYPES, true); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -1634,7 +1634,7 @@ public void shouldReplaceInvalidTopicNameCharacters() throws Exception { .with(PostgresConnectorConfig.SCHEMA_INCLUDE_LIST, "s1") .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s1\\.dbz_878_some\\|test@data"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); SourceRecords actualRecords = consumeRecordsByTopic(1); @@ -1661,7 +1661,7 @@ public void shouldNotSendEmptyOffset() throws InterruptedException, SQLException .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s1.a") .with(Heartbeat.HEARTBEAT_INTERVAL, 10) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning(); // Generate empty logical decoding message @@ -1682,7 +1682,7 @@ public void shouldRegularlyFlushLsn() throws InterruptedException, SQLException .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s1.a") .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); @@ -1727,7 +1727,7 @@ public void shouldRegularlyFlushLsnWithTxMonitoring() throws InterruptedExceptio .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s1.a") .with(PostgresConnectorConfig.PROVIDE_TRANSACTION_METADATA, true) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); // there shouldn't be any snapshot records @@ -1742,7 +1742,7 @@ public void shouldRegularlyFlushLsnWithTxMonitoring() throws InterruptedExceptio stopConnector(); assertConnectorNotRunning(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); // there shouldn't be any snapshot records, only potentially transaction messages @@ -1782,7 +1782,7 @@ public void shouldAllowForCustomSnapshot() throws InterruptedException { .with(PostgresConnectorConfig.SNAPSHOT_MODE_CLASS, CustomTestSnapshot.class.getName()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); SourceRecords actualRecords = consumeRecordsByTopic(1); @@ -1813,7 +1813,7 @@ record = s2recs.get(0); .with(PostgresConnectorConfig.SNAPSHOT_MODE_CLASS, CustomTestSnapshot.class.getName()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); actualRecords = consumeRecordsByTopic(4); @@ -1836,7 +1836,7 @@ public void shouldAllowForSelectiveSnapshot() throws InterruptedException { .with(CommonConnectorConfig.SNAPSHOT_MODE_TABLES, "s1.a") .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); /* Snapshot must be taken only for the listed tables */ @@ -1863,7 +1863,7 @@ public void shouldAllowForSelectiveSnapshot() throws InterruptedException { stopConnector(); /* start the connector back up and make sure snapshot is being taken */ - start(YBPostgresConnector.class, configBuilder + start(YugabyteDBConnector.class, configBuilder .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .with(PostgresConnectorConfig.SNAPSHOT_MODE_TABLES, "s2.a") .build()); @@ -1892,7 +1892,7 @@ public void shouldAllowForExportedSnapshot() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); // Consume records from the snapshot @@ -1926,7 +1926,7 @@ public void shouldAllowForExportedSnapshot() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); TestHelper.execute(INSERT_STMT); @@ -1962,7 +1962,7 @@ public void exportedSnapshotShouldNotSkipRecordOfParallelTx() throws Exception { pgConnection.setAutoCommit(false); pgConnection.executeWithoutCommitting(INSERT_STMT); final AtomicBoolean inserted = new AtomicBoolean(); - start(YBPostgresConnector.class, config, loggingCompletion(), x -> false, x -> { + start(YugabyteDBConnector.class, config, loggingCompletion(), x -> false, x -> { if (!inserted.get()) { TestHelper.execute(INSERT_STMT); try { @@ -2011,7 +2011,7 @@ public void exportedSnapshotShouldNotSkipRecordOfParallelTxPgoutput() throws Exc pgConnection.setAutoCommit(false); pgConnection.executeWithoutCommitting(INSERT_STMT); final AtomicBoolean inserted = new AtomicBoolean(); - start(YBPostgresConnector.class, config, loggingCompletion(), x -> false, x -> { + start(YugabyteDBConnector.class, config, loggingCompletion(), x -> false, x -> { if (!inserted.get()) { TestHelper.execute(INSERT_STMT); try { @@ -2051,7 +2051,7 @@ public void shouldPerformSnapshotOnceForInitialOnlySnapshotMode() throws Excepti .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); // Lets wait for snapshot to finish before proceeding @@ -2082,7 +2082,7 @@ public void shouldPerformSnapshotOnceForInitialOnlySnapshotMode() throws Excepti .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); waitForConnectorShutdown("postgres", TestHelper.TEST_SERVER); @@ -2101,7 +2101,7 @@ public void snapshotInitialOnlyFollowedByNever() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); // now stop the connector stopConnector(); @@ -2115,7 +2115,7 @@ public void snapshotInitialOnlyFollowedByNever() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); // Lets wait for snapshot to finish before proceeding @@ -2133,7 +2133,7 @@ public void snapshotInitialOnlyFollowedByNever() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); assertRecordsAfterInsert(2, 2, 2); @@ -2149,7 +2149,7 @@ public void shouldResumeStreamingFromSlotPositionForCustomSnapshot() throws Exce .with(PostgresConnectorConfig.SNAPSHOT_MODE_CLASS, CustomStartFromStreamingTestSnapshot.class.getName()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -2172,7 +2172,7 @@ public void shouldResumeStreamingFromSlotPositionForCustomSnapshot() throws Exce .with(PostgresConnectorConfig.SNAPSHOT_MODE_CLASS, CustomStartFromStreamingTestSnapshot.class.getName()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -2210,7 +2210,7 @@ public void customSnapshotterSkipsTablesOnRestart() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.ALWAYS.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -2233,7 +2233,7 @@ public void customSnapshotterSkipsTablesOnRestart() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE_CLASS, CustomPartialTableTestSnapshot.class.getName()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -2276,7 +2276,7 @@ public void customSnapshotterSkipsTablesOnRestartWithConcurrentTx() throws Excep .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.ALWAYS.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -2299,7 +2299,7 @@ public void customSnapshotterSkipsTablesOnRestartWithConcurrentTx() throws Excep .with(PostgresConnectorConfig.SNAPSHOT_MODE_CLASS, CustomPartialTableTestSnapshot.class.getName()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); Awaitility.await() @@ -2349,7 +2349,7 @@ public void testCustomSnapshotterSnapshotCompleteLifecycleHook() throws Exceptio .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.CUSTOM.getValue()) .with(PostgresConnectorConfig.SNAPSHOT_MODE_CLASS, CustomLifecycleHookTestSnapshot.class.getName()) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -2418,7 +2418,7 @@ public void testStreamingPerformance() throws Exception { Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); final long recordsCount = 1000000; final int batchSize = 1000; @@ -2459,7 +2459,7 @@ public void testSnapshotPerformance() throws Exception { batchInsertRecords(recordsCount, batchSize).get(); // start the connector only after we've finished inserting all the records - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); CompletableFuture.runAsync(() -> consumeRecords(recordsCount)) @@ -2482,7 +2482,7 @@ public void testEmptySchemaWarningAfterApplyingFilters() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY.getValue()) .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "my_products"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForAvailableRecords(10 * (TestHelper.waitTimeForRecords() * 5), TimeUnit.MILLISECONDS); @@ -2502,7 +2502,7 @@ public void testNoEmptySchemaWarningAfterApplyingFilters() throws Exception { Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL_ONLY.getValue()); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForAvailableRecords(100, TimeUnit.MILLISECONDS); @@ -2523,7 +2523,7 @@ public void testCustomPublicationNameUsed() throws Exception { Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.PUBLICATION_NAME, "cdc"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForAvailableRecords(100, TimeUnit.MILLISECONDS); @@ -2541,7 +2541,7 @@ public void shouldRewriteIdentityKey() throws InterruptedException { // rewrite key from table 'a': from {pk} to {pk, aa} .with(PostgresConnectorConfig.MSG_KEY_COLUMNS, "(.*)1.a:pk,aa"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); waitForSnapshotToBeCompleted(); SourceRecords records = consumeRecordsByTopic(2); records.recordsForTopic("test_server.s1.a").forEach(record -> { @@ -2573,14 +2573,14 @@ public void shouldNotIssueWarningForNoMonitoredTablesAfterApplyingFilters() thro .build(); // Start connector, verify that it does not log no captured tables warning - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); waitForSnapshotToBeCompleted(); SourceRecords records = consumeRecordsByTopic(1); assertThat(logInterceptor.containsMessage(DatabaseSchema.NO_CAPTURED_DATA_COLLECTIONS_WARNING)).isFalse(); stopConnector(); // Restart connector, verify it does not log no captured tables warning - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); waitForStreamingRunning(); assertThat(logInterceptor.containsMessage(DatabaseSchema.NO_CAPTURED_DATA_COLLECTIONS_WARNING)).isFalse(); } @@ -2598,7 +2598,7 @@ public void shouldClearDatabaseWarnings() throws Exception { .with(PostgresConnectorConfig.POLL_INTERVAL_MS, "10") .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); waitForSnapshotToBeCompleted(); Awaitility.await().atMost(Duration.ofSeconds(TestHelper.waitTimeForRecords() * 6)) .until(() -> logInterceptor.containsMessage("Server-side message: 'Exiting startup callback'")); @@ -2622,7 +2622,7 @@ public void shouldCreatePublicationWhenReplicationSlotExists() throws Exception // Start connector with no snapshot; by default replication slot and publication should be created // Wait until streaming mode begins to proceed - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); waitForStreamingRunning(); // Check that publication was created @@ -2635,7 +2635,7 @@ public void shouldCreatePublicationWhenReplicationSlotExists() throws Exception // Create log interceptor and restart the connector, should observe publication gets re-created final LogInterceptor interceptor = new LogInterceptor(PostgresReplicationConnection.class); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); waitForStreamingRunning(); // YB Note: Increasing the wait time. @@ -2655,7 +2655,7 @@ public void shouldConsumeEventsWithMaskedColumns() throws Exception { TestHelper.execute(SETUP_TABLES_STMT); Configuration.Builder configBuilder = TestHelper.defaultConfig() .with("column.mask.with.5.chars", "s2.a.bb"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); SourceRecords actualRecords = consumeRecordsByTopic(2); @@ -2718,7 +2718,7 @@ public void shouldConsumeEventsWithMaskedHashedColumns() throws Exception { "CREATE TABLE s2.b (pk SERIAL, bb varchar(255), PRIMARY KEY(pk));"); Configuration.Builder configBuilder = TestHelper.defaultConfig() .with("column.mask.hash.SHA-256.with.salt.CzQMA0cB5K", "s2.a.bb, s2.b.bb"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); SourceRecords actualRecords = consumeRecordsByTopic(2); @@ -2797,7 +2797,7 @@ public void shouldConsumeEventsWithTruncatedColumns() throws Exception { TestHelper.execute(SETUP_TABLES_STMT); Configuration.Builder configBuilder = TestHelper.defaultConfig() .with("column.truncate.to.3.chars", "s2.a.bb"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); SourceRecords actualRecords = consumeRecordsByTopic(2); @@ -2861,7 +2861,7 @@ public void shouldAckLsnOnSourceByDefault() throws Exception { .with(PostgresConnectorConfig.SLOT_NAME, ReplicationConnection.Builder.DEFAULT_SLOT_NAME) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, "false"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -2874,7 +2874,7 @@ public void shouldAckLsnOnSourceByDefault() throws Exception { TestHelper.execute("INSERT INTO s2.a (aa,bb) VALUES (1, 'test');"); TestHelper.execute("UPDATE s2.a SET aa=2, bb='hello' WHERE pk=2;"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -2899,7 +2899,7 @@ public void testYBCustomChangesForUpdate() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER) .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s2.a"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForStreamingRunning(); TestHelper.waitFor(Duration.ofSeconds(5)); @@ -2953,7 +2953,7 @@ public void testSkipMessagesWithoutChange(ReplicaIdentityInfo.ReplicaIdentity re .with(PostgresConnectorConfig.SKIP_MESSAGES_WITHOUT_CHANGE, true) .with(PostgresConnectorConfig.COLUMN_INCLUDE_LIST, "s2.a.pk,s2.a.aa"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForStreamingRunning(); TestHelper.waitFor(Duration.ofSeconds(5)); @@ -3014,7 +3014,7 @@ public void customYBStructureShouldBePresentInSnapshotRecords() throws Exception .with(PostgresConnectorConfig.SLOT_NAME, ReplicationConnection.Builder.DEFAULT_SLOT_NAME) .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s2.a"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -3047,7 +3047,7 @@ public void shouldNotAckLsnOnSource() throws Exception { .with(PostgresConnectorConfig.SLOT_NAME, ReplicationConnection.Builder.DEFAULT_SLOT_NAME) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, "false"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -3062,7 +3062,7 @@ public void shouldNotAckLsnOnSource() throws Exception { TestHelper.execute("INSERT INTO s2.a (aa,bb) VALUES (1, 'test');"); TestHelper.execute("UPDATE s2.a SET aa=2, bb='hello' WHERE pk=2;"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForStreamingRunning(); @@ -3086,7 +3086,7 @@ public void shouldOutputRecordsInCloudEventsFormat() throws Exception { .with(CommonConnectorConfig.PROVIDE_TRANSACTION_METADATA, true) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -3147,7 +3147,7 @@ public void testYBChangesForMultiHostConfiguration() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER) .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s2.a"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForStreamingRunning(); TestHelper.waitFor(Duration.ofSeconds(5)); @@ -3180,7 +3180,7 @@ public void shouldConfigureSubscriptionsForAllTablesByDefault() throws Exception Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.PUBLICATION_NAME, "cdc"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForAvailableRecords(100, TimeUnit.MILLISECONDS); @@ -3207,7 +3207,7 @@ public void shouldConfigureSubscriptionsFromTableFilters() throws Exception { .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "public.numeric_table,public.text_table,s1.a,s2.a") .with(PostgresConnectorConfig.PUBLICATION_AUTOCREATE_MODE, PostgresConnectorConfig.AutoCreateMode.FILTERED.getValue()); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForAvailableRecords(100, TimeUnit.MILLISECONDS); @@ -3243,7 +3243,7 @@ public void shouldThrowWhenAutocreationIsDisabled() throws Exception { assertEquals(error.getMessage(), "Publication autocreation is disabled, please create one and restart the connector."); }; - start(YBPostgresConnector.class, configBuilder.build(), cb); + start(YugabyteDBConnector.class, configBuilder.build(), cb); waitForAvailableRecords(100, TimeUnit.MILLISECONDS); stopConnector(); @@ -3264,7 +3264,7 @@ public void shouldProduceMessagesOnlyForConfiguredTables() throws Exception { .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s2.a") .with(PostgresConnectorConfig.PUBLICATION_AUTOCREATE_MODE, PostgresConnectorConfig.AutoCreateMode.FILTERED.getValue()); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -3288,7 +3288,7 @@ public void shouldProduceMessagesOnlyForConfiguredTables() throws Exception { @FixFor("DBZ-2885") @SkipWhenDecoderPluginNameIsNot(value = SkipWhenDecoderPluginNameIsNot.DecoderPluginName.PGOUTPUT, reason = "Publication configuration only valid for PGOUTPUT decoder") public void shouldThrowWhenTableFiltersIsEmpty() throws Exception { - final LogInterceptor logInterceptor = new LogInterceptor(YBPostgresConnectorIT.class); + final LogInterceptor logInterceptor = new LogInterceptor(YugabyteDBConnectorIT.class); TestHelper.dropAllSchemas(); TestHelper.dropPublication("cdc"); @@ -3300,7 +3300,7 @@ public void shouldThrowWhenTableFiltersIsEmpty() throws Exception { .with(PostgresConnectorConfig.PUBLICATION_AUTOCREATE_MODE, PostgresConnectorConfig.AutoCreateMode.FILTERED.getValue()) .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "nonexistent.table"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorNotRunning(); assertTrue(logInterceptor.containsStacktraceElement("No table filters found for filtered publication cdc")); } @@ -3320,7 +3320,7 @@ public void shouldUpdatePublicationForConfiguredTables() throws Exception { .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE) .with(PostgresConnectorConfig.PUBLICATION_AUTOCREATE_MODE, PostgresConnectorConfig.AutoCreateMode.FILTERED.getValue()); - start(YBPostgresConnector.class, initalConfigBuilder.build()); + start(YugabyteDBConnector.class, initalConfigBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -3349,7 +3349,7 @@ public void shouldUpdatePublicationForConfiguredTables() throws Exception { .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s1.a") .with(PostgresConnectorConfig.PUBLICATION_AUTOCREATE_MODE, PostgresConnectorConfig.AutoCreateMode.FILTERED.getValue()); - start(YBPostgresConnector.class, updatedConfigBuilder.build()); + start(YugabyteDBConnector.class, updatedConfigBuilder.build()); assertConnectorIsRunning(); // snapshot record s1.a @@ -3388,7 +3388,7 @@ public void shouldUpdateExistingPublicationForConfiguredPartitionedTables() thro .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s1.part") .with(PostgresConnectorConfig.PUBLICATION_AUTOCREATE_MODE, PostgresConnectorConfig.AutoCreateMode.FILTERED.getValue()); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); waitForSnapshotToBeCompleted(); @@ -3423,7 +3423,7 @@ public void shouldEmitNoEventsForSkippedCreateOperations() throws Exception { .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .with(PostgresConnectorConfig.SKIPPED_OPERATIONS, Envelope.Operation.UPDATE.code()) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); assertNoRecordsToConsume(); @@ -3470,7 +3470,7 @@ public void nonSuperUserSnapshotAndStreaming() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE); - start(YBPostgresConnector.class, configBuilderInitial.build()); + start(YugabyteDBConnector.class, configBuilderInitial.build()); assertConnectorIsRunning(); // insert some more records - these should not be part of the snapshot @@ -3521,7 +3521,7 @@ private List getSequence(SourceRecord record) { @FixFor("DBZ-2911") public void shouldHaveLastCommitLsn() throws InterruptedException { TestHelper.execute(SETUP_TABLES_STMT); - start(YBPostgresConnector.class, TestHelper.defaultConfig() + start(YugabyteDBConnector.class, TestHelper.defaultConfig() .with(PostgresConnectorConfig.PROVIDE_TRANSACTION_METADATA, true) .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.NEVER.getValue()) .build()); @@ -3574,7 +3574,7 @@ public void testCreateNumericReplicationSlotName() throws Exception { TestHelper.execute(SETUP_TABLES_STMT); Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SLOT_NAME, "12345"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); waitForStreamingRunning(); assertConnectorIsRunning(); } @@ -3585,7 +3585,7 @@ public void testStreamingWithNumericReplicationSlotName() throws Exception { TestHelper.execute(SETUP_TABLES_STMT); Configuration.Builder configBuilder = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SLOT_NAME, "12345"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); waitForStreamingRunning(); assertConnectorIsRunning(); @@ -3608,7 +3608,7 @@ public void testStreamingWithNumericReplicationSlotName() throws Exception { public void testShouldNotCloseConnectionFetchingMetadataWithNewDataTypes() throws Exception { TestHelper.execute(CREATE_TABLES_STMT); Configuration config = TestHelper.defaultConfig().build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); waitForStreamingRunning(); assertConnectorIsRunning(); @@ -3639,7 +3639,7 @@ public void shouldReselectToastColumnsOnPrimaryKeyChange() throws Exception { TestHelper.execute("INSERT INTO s1.dbz5295 (pk,data,data2) values (1,'" + toastValue1 + "','" + toastValue2 + "');"); Configuration config = TestHelper.defaultConfig().build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); waitForStreamingRunning(); SourceRecords records = consumeRecordsByTopic(1); @@ -3690,7 +3690,7 @@ public void shouldSuppressLoggingOptionalOfExcludedColumns() throws Exception { Configuration config = TestHelper.defaultConfig() .with("column.exclude.list", "s1.dbz5783.data") .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); @@ -3709,7 +3709,7 @@ public void shouldSuppressLoggingOptionalOfExcludedColumns() throws Exception { @FixFor("DBZ-5739") @SkipWhenDatabaseVersion(check = LESS_THAN, major = 11, reason = "This needs pg_replication_slot_advance which is supported only on Postgres 11+") public void shouldStopConnectorOnSlotRecreation() throws InterruptedException { - final LogInterceptor logInterceptor = new LogInterceptor(YBPostgresConnectorIT.class); + final LogInterceptor logInterceptor = new LogInterceptor(YugabyteDBConnectorIT.class); TestHelper.execute(SETUP_TABLES_STMT); Configuration.Builder configBuilder = TestHelper.defaultConfig() @@ -3717,7 +3717,7 @@ public void shouldStopConnectorOnSlotRecreation() throws InterruptedException { .with(CommonConnectorConfig.SNAPSHOT_MODE_TABLES, "s1.a") .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); consumeRecordsByTopic(1); @@ -3732,7 +3732,7 @@ public void shouldStopConnectorOnSlotRecreation() throws InterruptedException { .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .with(PostgresConnectorConfig.SLOT_SEEK_TO_KNOWN_OFFSET, Boolean.TRUE); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); Awaitility.await().atMost(TestHelper.waitTimeForRecords() * 5, TimeUnit.SECONDS) .until(() -> logInterceptor.containsStacktraceElement("Cannot seek to the last known offset ")); assertConnectorNotRunning(); @@ -3750,7 +3750,7 @@ public void shouldSeekToCorrectOffset() throws InterruptedException { .with(CommonConnectorConfig.SNAPSHOT_MODE_TABLES, "s1.a") .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.FALSE); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); consumeRecordsByTopic(1); @@ -3765,7 +3765,7 @@ public void shouldSeekToCorrectOffset() throws InterruptedException { .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .with(PostgresConnectorConfig.SLOT_SEEK_TO_KNOWN_OFFSET, Boolean.TRUE); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); consumeRecordsByTopic(1); assertConnectorIsRunning(); @@ -3804,7 +3804,7 @@ public void shouldInvokeSnapshotterAbortedMethod() throws Exception { } }; - start(YBPostgresConnector.class, configBuilder.build(), completionCallback, stopOnPKPredicate(1)); + start(YugabyteDBConnector.class, configBuilder.build(), completionCallback, stopOnPKPredicate(1)); // wait until we know we've raised the exception at startup AND the engine has been shutdown if (!latch.await(TestHelper.waitTimeForRecords() * 5, TimeUnit.SECONDS)) { @@ -3837,7 +3837,7 @@ public void shouldThrowRightExceptionWhenNoCustomSnapshotClassProvided() { Configuration config = TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.CUSTOM.getValue()) .build(); - start(YBPostgresConnector.class, config, (success, msg, err) -> { + start(YugabyteDBConnector.class, config, (success, msg, err) -> { error.set(err); message.set(msg); status.set(success); @@ -3868,7 +3868,7 @@ public void shouldIncludeTableWithBackSlashInName() throws Exception { .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s1.back\\\\slash"); - start(YBPostgresConnector.class, configBuilder.build()); + start(YugabyteDBConnector.class, configBuilder.build()); assertConnectorIsRunning(); TestHelper.execute("INSERT INTO s1.\"back\\slash\" (aa, bb) VALUES (3, 3);"); @@ -3896,7 +3896,7 @@ public void shouldAddNewFieldToSourceInfo() throws InterruptedException { "CREATE SCHEMA IF NOT EXISTS s1;", "CREATE TABLE s1.DBZ6076 (pk SERIAL, aa integer, PRIMARY KEY(pk));", "INSERT INTO s1.DBZ6076 (aa) VALUES (1);"); - start(YBPostgresConnector.class, TestHelper.defaultConfig() + start(YugabyteDBConnector.class, TestHelper.defaultConfig() .with(PostgresConnectorConfig.SNAPSHOT_MODE, SnapshotMode.INITIAL.name()) .with(PostgresConnectorConfig.TABLE_INCLUDE_LIST, "s1.DBZ6076") .with(PostgresConnectorConfig.SOURCE_INFO_STRUCT_MAKER, CustomPostgresSourceInfoStructMaker.class.getName()) @@ -3926,7 +3926,7 @@ public void shouldAddNewFieldToSourceInfo() throws InterruptedException { @FixFor("DBZ-6076") public void shouldUseDefaultSourceInfoStructMaker() throws InterruptedException { TestHelper.execute(SETUP_TABLES_STMT); - start(YBPostgresConnector.class, TestHelper.defaultConfig() + start(YugabyteDBConnector.class, TestHelper.defaultConfig() .build()); assertConnectorIsRunning(); diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YBPostgresConnectorTaskIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteDBConnectorTaskIT.java similarity index 98% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YBPostgresConnectorTaskIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteDBConnectorTaskIT.java index 9f58c6c5ecd..0d06df672f9 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YBPostgresConnectorTaskIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteDBConnectorTaskIT.java @@ -22,7 +22,7 @@ /** * Integration test for {@link PostgresConnectorTask} class. */ -public class YBPostgresConnectorTaskIT { +public class YugabyteDBConnectorTaskIT { @Test @FixFor("DBZ-519") diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteReplicaIdentityIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteReplicaIdentityIT.java index a0dcf2832bd..9d92f342bcd 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteReplicaIdentityIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteReplicaIdentityIT.java @@ -39,7 +39,7 @@ public class YugabyteReplicaIdentityIT extends AbstractConnectorTest { private static final String INSERT_STMT = "INSERT INTO s1.a (aa) VALUES (1);" + "INSERT INTO s2.a (aa) VALUES (1);"; - private YBPostgresConnector connector; + private YugabyteDBConnector connector; @BeforeClass public static void beforeClass() throws SQLException { @@ -68,7 +68,7 @@ public void shouldProduceOldValuesWithReplicaIdentityFull() throws Exception { .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); // YB Note: Added a wait for replication slot to be active. @@ -106,7 +106,7 @@ public void shouldProduceExpectedValuesWithReplicaIdentityDefault() throws Excep .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); // YB Note: Added a wait for replication slot to be active. @@ -148,7 +148,7 @@ public void shouldProduceEventsWithValuesForChangedColumnWithReplicaIdentityChan .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); // YB Note: Added a wait for replication slot to be active. @@ -206,7 +206,7 @@ public void shouldThrowExceptionWithReplicaIdentityNothingOnUpdatesAndDeletes() .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); // YB Note: Added a wait for replication slot to be active. @@ -241,7 +241,7 @@ public void shouldHaveBeforeImageForDeletesForReplicaIdentityFull() throws Excep .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); // YB Note: Added a wait for replication slot to be active. @@ -282,7 +282,7 @@ public void shouldHaveBeforeImageForDeletesForReplicaIdentityDefault() throws Ex .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); // YB Note: Added a wait for replication slot to be active. @@ -324,7 +324,7 @@ public void shouldHaveBeforeImageForDeletesForReplicaIdentityChange() throws Exc .with(PostgresConnectorConfig.SNAPSHOT_MODE, PostgresConnectorConfig.SnapshotMode.NEVER.getValue()) .with(PostgresConnectorConfig.DROP_SLOT_ON_STOP, Boolean.TRUE) .build(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); assertConnectorIsRunning(); // YB Note: Added a wait for replication slot to be active. diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumYBPostgresConnectorResourceIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumYugabyteDBConnectorResourceIT.java similarity index 98% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumYBPostgresConnectorResourceIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumYugabyteDBConnectorResourceIT.java index 1f8e74c8086..204e6808262 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumYBPostgresConnectorResourceIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumYugabyteDBConnectorResourceIT.java @@ -14,6 +14,7 @@ import java.util.Locale; import java.util.Map; +import io.debezium.connector.postgresql.YugabyteDBConnector; import org.junit.After; import org.junit.Assume; import org.junit.Before; @@ -21,18 +22,17 @@ import org.junit.Test; import io.debezium.connector.postgresql.Module; -import io.debezium.connector.postgresql.YBPostgresConnector; import io.debezium.connector.postgresql.PostgresConnectorConfig; import io.debezium.testing.testcontainers.Connector; import io.debezium.testing.testcontainers.ConnectorConfiguration; import io.debezium.testing.testcontainers.testhelper.RestExtensionTestInfrastructure; import io.restassured.http.ContentType; -public class DebeziumYBPostgresConnectorResourceIT { +public class DebeziumYugabyteDBConnectorResourceIT { @BeforeClass public static void checkCondition() { - Assume.assumeThat("Skipping DebeziumYBPostgresConnectorResourceIT tests when assembly profile is not active!", + Assume.assumeThat("Skipping DebeziumYugabyteDBConnectorResourceIT tests when assembly profile is not active!", System.getProperty("isAssemblyProfileActive", "false"), is("true")); } @@ -84,7 +84,7 @@ public void testInvalidHostnameConnection() { public void testInvalidConnection() { given() .port(RestExtensionTestInfrastructure.getDebeziumContainer().getFirstMappedPort()) - .when().contentType(ContentType.JSON).accept(ContentType.JSON).body("{\"connector.class\": \"" + YBPostgresConnector.class.getName() + "\"}") + .when().contentType(ContentType.JSON).accept(ContentType.JSON).body("{\"connector.class\": \"" + YugabyteDBConnector.class.getName() + "\"}") .put(DebeziumPostgresConnectorResource.BASE_PATH + DebeziumPostgresConnectorResource.VALIDATE_CONNECTION_ENDPOINT) .then().log().all() .statusCode(200) diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumYBPostgresConnectorResourceNoDatabaseIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumYugabyteDBConnectorResourceNoDatabaseIT.java similarity index 91% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumYBPostgresConnectorResourceNoDatabaseIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumYugabyteDBConnectorResourceNoDatabaseIT.java index 8a349a2863d..974b961e5eb 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumYBPostgresConnectorResourceNoDatabaseIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumYugabyteDBConnectorResourceNoDatabaseIT.java @@ -10,6 +10,7 @@ import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.Matchers.hasKey; +import io.debezium.connector.postgresql.YugabyteDBConnector; import org.junit.After; import org.junit.Assume; import org.junit.Before; @@ -17,14 +18,13 @@ import org.junit.Test; import io.debezium.connector.postgresql.Module; -import io.debezium.connector.postgresql.YBPostgresConnector; import io.debezium.testing.testcontainers.testhelper.RestExtensionTestInfrastructure; -public class DebeziumYBPostgresConnectorResourceNoDatabaseIT { +public class DebeziumYugabyteDBConnectorResourceNoDatabaseIT { @BeforeClass public static void checkCondition() { - Assume.assumeThat("Skipping DebeziumYBPostgresConnectorResourceIT tests when assembly profile is not active!", + Assume.assumeThat("Skipping DebeziumYugabyteDBConnectorResourceIT tests when assembly profile is not active!", System.getProperty("isAssemblyProfileActive", "false"), is("true")); } @@ -65,7 +65,7 @@ public void testSchemaEndpoint() { .body("properties.isEmpty()", is(false)) .body("x-connector-id", is("postgres")) .body("x-version", is(Module.version())) - .body("x-className", is(YBPostgresConnector.class.getName())) + .body("x-className", is(YugabyteDBConnector.class.getName())) .body("properties", hasKey("topic.prefix")) .body("properties", hasKey("plugin.name")) .body("properties", hasKey("slot.name")) diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbDatabaseTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbDatabaseTest.java index 0a34dbdca3d..1d04e06fabd 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbDatabaseTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/transforms/timescaledb/TimescaleDbDatabaseTest.java @@ -9,7 +9,7 @@ import java.sql.SQLException; -import io.debezium.connector.postgresql.YBPostgresConnector; +import io.debezium.connector.postgresql.YugabyteDBConnector; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -94,7 +94,7 @@ protected void insertData() throws SQLException { public void shouldTransformChunks() throws Exception { Testing.Print.enable(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); insertData(); @@ -112,7 +112,7 @@ public void shouldTransformChunks() throws Exception { public void shouldTransformAggregates() throws Exception { Testing.Print.enable(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); insertData(); @@ -142,7 +142,7 @@ public void shouldTransformAggregates() throws Exception { public void shouldTransformCompressedChunks() throws Exception { Testing.Print.enable(); - start(YBPostgresConnector.class, config); + start(YugabyteDBConnector.class, config); waitForStreamingRunning("postgres", TestHelper.TEST_SERVER); insertData(); diff --git a/debezium-connector-postgres/src/test/resources/logback-test.xml b/debezium-connector-postgres/src/test/resources/logback-test.xml index 67df491d802..95faa1e192c 100644 --- a/debezium-connector-postgres/src/test/resources/logback-test.xml +++ b/debezium-connector-postgres/src/test/resources/logback-test.xml @@ -33,7 +33,7 @@ additivity="false"> - + diff --git a/debezium-connector-sqlserver/pom.xml b/debezium-connector-sqlserver/pom.xml index 88cfa390913..2086562e102 100644 --- a/debezium-connector-sqlserver/pom.xml +++ b/debezium-connector-sqlserver/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-core/pom.xml b/debezium-core/pom.xml index c112243d4a9..aabff12fa9f 100644 --- a/debezium-core/pom.xml +++ b/debezium-core/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-ddl-parser/pom.xml b/debezium-ddl-parser/pom.xml index 64ff2292153..90b3139c008 100644 --- a/debezium-ddl-parser/pom.xml +++ b/debezium-ddl-parser/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-embedded/pom.xml b/debezium-embedded/pom.xml index 3f5ed4d0c50..c137bea99ab 100644 --- a/debezium-embedded/pom.xml +++ b/debezium-embedded/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-interceptor/pom.xml b/debezium-interceptor/pom.xml index 441142a2832..1c8bde902de 100644 --- a/debezium-interceptor/pom.xml +++ b/debezium-interceptor/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-microbenchmark-oracle/pom.xml b/debezium-microbenchmark-oracle/pom.xml index 0ee2b841fa5..2fee1d5ad9f 100644 --- a/debezium-microbenchmark-oracle/pom.xml +++ b/debezium-microbenchmark-oracle/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-microbenchmark/pom.xml b/debezium-microbenchmark/pom.xml index 80c9d661065..e42fd03a6a2 100644 --- a/debezium-microbenchmark/pom.xml +++ b/debezium-microbenchmark/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-parent/pom.xml b/debezium-parent/pom.xml index ea5476f62d7..87eda03a49c 100644 --- a/debezium-parent/pom.xml +++ b/debezium-parent/pom.xml @@ -4,7 +4,7 @@ io.debezium debezium-build-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml diff --git a/debezium-quarkus-outbox-common/deployment/pom.xml b/debezium-quarkus-outbox-common/deployment/pom.xml index 4a5e0661a5d..7666c570195 100644 --- a/debezium-quarkus-outbox-common/deployment/pom.xml +++ b/debezium-quarkus-outbox-common/deployment/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-quarkus-outbox-common-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml diff --git a/debezium-quarkus-outbox-common/pom.xml b/debezium-quarkus-outbox-common/pom.xml index a153bd87f89..20a55ddda00 100644 --- a/debezium-quarkus-outbox-common/pom.xml +++ b/debezium-quarkus-outbox-common/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml diff --git a/debezium-quarkus-outbox-common/runtime/pom.xml b/debezium-quarkus-outbox-common/runtime/pom.xml index 69ef6766100..106474a8e8c 100644 --- a/debezium-quarkus-outbox-common/runtime/pom.xml +++ b/debezium-quarkus-outbox-common/runtime/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-quarkus-outbox-common-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml diff --git a/debezium-quarkus-outbox-reactive/deployment/pom.xml b/debezium-quarkus-outbox-reactive/deployment/pom.xml index 799e3cc2d97..babab0d005b 100644 --- a/debezium-quarkus-outbox-reactive/deployment/pom.xml +++ b/debezium-quarkus-outbox-reactive/deployment/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-quarkus-outbox-reactive-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml diff --git a/debezium-quarkus-outbox-reactive/integration-tests/pom.xml b/debezium-quarkus-outbox-reactive/integration-tests/pom.xml index bd294d8190a..e068ed8c08d 100644 --- a/debezium-quarkus-outbox-reactive/integration-tests/pom.xml +++ b/debezium-quarkus-outbox-reactive/integration-tests/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-quarkus-outbox-reactive-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml diff --git a/debezium-quarkus-outbox-reactive/pom.xml b/debezium-quarkus-outbox-reactive/pom.xml index c6c8eda0ddf..bc7926e7691 100644 --- a/debezium-quarkus-outbox-reactive/pom.xml +++ b/debezium-quarkus-outbox-reactive/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml diff --git a/debezium-quarkus-outbox-reactive/runtime/pom.xml b/debezium-quarkus-outbox-reactive/runtime/pom.xml index 644dae0621c..3d51fc460bc 100644 --- a/debezium-quarkus-outbox-reactive/runtime/pom.xml +++ b/debezium-quarkus-outbox-reactive/runtime/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-quarkus-outbox-reactive-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml diff --git a/debezium-quarkus-outbox/deployment/pom.xml b/debezium-quarkus-outbox/deployment/pom.xml index 35130dbb420..aacec9ac9d9 100644 --- a/debezium-quarkus-outbox/deployment/pom.xml +++ b/debezium-quarkus-outbox/deployment/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-quarkus-outbox-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml diff --git a/debezium-quarkus-outbox/integration-tests/pom.xml b/debezium-quarkus-outbox/integration-tests/pom.xml index 9e658e4bca2..26acfb8181d 100644 --- a/debezium-quarkus-outbox/integration-tests/pom.xml +++ b/debezium-quarkus-outbox/integration-tests/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-quarkus-outbox-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml diff --git a/debezium-quarkus-outbox/pom.xml b/debezium-quarkus-outbox/pom.xml index 487a996fe68..36d61f946ae 100644 --- a/debezium-quarkus-outbox/pom.xml +++ b/debezium-quarkus-outbox/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml diff --git a/debezium-quarkus-outbox/runtime/pom.xml b/debezium-quarkus-outbox/runtime/pom.xml index a3d926174c3..02ce93f00f1 100644 --- a/debezium-quarkus-outbox/runtime/pom.xml +++ b/debezium-quarkus-outbox/runtime/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-quarkus-outbox-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml diff --git a/debezium-schema-generator/pom.xml b/debezium-schema-generator/pom.xml index 04d1a784c8c..7a9288a747f 100644 --- a/debezium-schema-generator/pom.xml +++ b/debezium-schema-generator/pom.xml @@ -5,7 +5,7 @@ io.debezium debezium-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml diff --git a/debezium-scripting/debezium-scripting-languages/pom.xml b/debezium-scripting/debezium-scripting-languages/pom.xml index 3014b278910..c9983eb96c3 100644 --- a/debezium-scripting/debezium-scripting-languages/pom.xml +++ b/debezium-scripting/debezium-scripting-languages/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-scripting-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/debezium-scripting/debezium-scripting/pom.xml b/debezium-scripting/debezium-scripting/pom.xml index 66af3e26dfb..d5563e6da80 100644 --- a/debezium-scripting/debezium-scripting/pom.xml +++ b/debezium-scripting/debezium-scripting/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-scripting-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/debezium-scripting/pom.xml b/debezium-scripting/pom.xml index 1f375d4d380..b61f43c6b08 100644 --- a/debezium-scripting/pom.xml +++ b/debezium-scripting/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-storage/debezium-storage-azure-blob/pom.xml b/debezium-storage/debezium-storage-azure-blob/pom.xml index a67ea8b5c0c..1ed9e55747a 100644 --- a/debezium-storage/debezium-storage-azure-blob/pom.xml +++ b/debezium-storage/debezium-storage-azure-blob/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-storage - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/debezium-storage/debezium-storage-file/pom.xml b/debezium-storage/debezium-storage-file/pom.xml index 8595a6d60f5..bae852dae56 100644 --- a/debezium-storage/debezium-storage-file/pom.xml +++ b/debezium-storage/debezium-storage-file/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-storage - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/debezium-storage/debezium-storage-jdbc/pom.xml b/debezium-storage/debezium-storage-jdbc/pom.xml index b7890abc484..b61574fb709 100644 --- a/debezium-storage/debezium-storage-jdbc/pom.xml +++ b/debezium-storage/debezium-storage-jdbc/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-storage - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/debezium-storage/debezium-storage-kafka/pom.xml b/debezium-storage/debezium-storage-kafka/pom.xml index cd1d91f95a9..6448d2ac00f 100644 --- a/debezium-storage/debezium-storage-kafka/pom.xml +++ b/debezium-storage/debezium-storage-kafka/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-storage - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/debezium-storage/debezium-storage-redis/pom.xml b/debezium-storage/debezium-storage-redis/pom.xml index dacac03bf8a..9ad8f14a357 100644 --- a/debezium-storage/debezium-storage-redis/pom.xml +++ b/debezium-storage/debezium-storage-redis/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-storage - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/debezium-storage/debezium-storage-rocketmq/pom.xml b/debezium-storage/debezium-storage-rocketmq/pom.xml index 3f047e6e8af..058919dc9e9 100644 --- a/debezium-storage/debezium-storage-rocketmq/pom.xml +++ b/debezium-storage/debezium-storage-rocketmq/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-storage - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml diff --git a/debezium-storage/debezium-storage-s3/pom.xml b/debezium-storage/debezium-storage-s3/pom.xml index 9990bb646bd..61a3d35b072 100644 --- a/debezium-storage/debezium-storage-s3/pom.xml +++ b/debezium-storage/debezium-storage-s3/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-storage - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/debezium-storage/debezium-storage-tests/pom.xml b/debezium-storage/debezium-storage-tests/pom.xml index d1fccf7f987..50976dba89d 100644 --- a/debezium-storage/debezium-storage-tests/pom.xml +++ b/debezium-storage/debezium-storage-tests/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-storage - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/debezium-storage/pom.xml b/debezium-storage/pom.xml index e6904d17d48..c7fcfc38bdf 100644 --- a/debezium-storage/pom.xml +++ b/debezium-storage/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-testing/debezium-testing-system/pom.xml b/debezium-testing/debezium-testing-system/pom.xml index 4505b7eccf4..fd70339d04b 100644 --- a/debezium-testing/debezium-testing-system/pom.xml +++ b/debezium-testing/debezium-testing-system/pom.xml @@ -4,7 +4,7 @@ io.debezium debezium-testing - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml @@ -126,7 +126,7 @@ ORCLPDB1 - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT http://debezium-artifact-server.${ocp.project.debezium}.svc.cluster.local:8080 diff --git a/debezium-testing/debezium-testing-testcontainers/pom.xml b/debezium-testing/debezium-testing-testcontainers/pom.xml index 44470d695bf..e2656dd0386 100644 --- a/debezium-testing/debezium-testing-testcontainers/pom.xml +++ b/debezium-testing/debezium-testing-testcontainers/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-testing - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/debezium-testing/pom.xml b/debezium-testing/pom.xml index 7528354d87b..f6570fb5004 100644 --- a/debezium-testing/pom.xml +++ b/debezium-testing/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/documentation/antora.yml b/documentation/antora.yml index df860db1bd7..6e1792ced49 100644 --- a/documentation/antora.yml +++ b/documentation/antora.yml @@ -8,7 +8,7 @@ nav: asciidoc: attributes: - debezium-version: '2.5.2.ybpg.20241-SNAPSHOT.1' + debezium-version: 'dz.2.5.2.yb.2024.1-SNAPSHOT' debezium-kafka-version: '3.6.1' debezium-docker-label: '2.4' DockerKafkaConnect: registry.redhat.io/amq7/amq-streams-kafka-28-rhel8:1.8.0 diff --git a/pom.xml b/pom.xml index b0218a92ea4..fe07e687bf3 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ io.debezium debezium-build-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT Debezium Build Aggregator Debezium is an open source change data capture platform pom diff --git a/support/checkstyle/pom.xml b/support/checkstyle/pom.xml index 861df66cdc5..ee8f15b33db 100644 --- a/support/checkstyle/pom.xml +++ b/support/checkstyle/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-build-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../../pom.xml diff --git a/support/ide-configs/pom.xml b/support/ide-configs/pom.xml index fab6413f6d2..e5bce3264fd 100644 --- a/support/ide-configs/pom.xml +++ b/support/ide-configs/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-build-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../../pom.xml diff --git a/support/revapi/pom.xml b/support/revapi/pom.xml index 7ea1802fbd6..1c0aa633621 100644 --- a/support/revapi/pom.xml +++ b/support/revapi/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-build-parent - 2.5.2.ybpg.20241-SNAPSHOT.1 + dz.2.5.2.yb.2024.1-SNAPSHOT ../../pom.xml From 230b56b595eaac685f35cb2857d5549c8a911929 Mon Sep 17 00:00:00 2001 From: Vaibhav Kushwaha Date: Mon, 8 Jul 2024 12:06:48 +0530 Subject: [PATCH 11/15] changed version to default --- debezium-api/pom.xml | 2 +- debezium-assembly-descriptors/pom.xml | 2 +- debezium-bom/pom.xml | 2 +- debezium-connect-rest-extension/pom.xml | 2 +- debezium-connector-mongodb/pom.xml | 2 +- debezium-connector-mysql/pom.xml | 2 +- debezium-connector-oracle/pom.xml | 2 +- debezium-connector-postgres/pom.xml | 2 +- debezium-connector-sqlserver/pom.xml | 2 +- debezium-core/pom.xml | 2 +- debezium-ddl-parser/pom.xml | 2 +- debezium-embedded/pom.xml | 2 +- debezium-interceptor/pom.xml | 2 +- debezium-microbenchmark-oracle/pom.xml | 2 +- debezium-microbenchmark/pom.xml | 2 +- debezium-parent/pom.xml | 2 +- debezium-quarkus-outbox-common/deployment/pom.xml | 2 +- debezium-quarkus-outbox-common/pom.xml | 2 +- debezium-quarkus-outbox-common/runtime/pom.xml | 2 +- debezium-quarkus-outbox-reactive/deployment/pom.xml | 2 +- debezium-quarkus-outbox-reactive/integration-tests/pom.xml | 2 +- debezium-quarkus-outbox-reactive/pom.xml | 2 +- debezium-quarkus-outbox-reactive/runtime/pom.xml | 2 +- debezium-quarkus-outbox/deployment/pom.xml | 2 +- debezium-quarkus-outbox/integration-tests/pom.xml | 2 +- debezium-quarkus-outbox/pom.xml | 2 +- debezium-quarkus-outbox/runtime/pom.xml | 2 +- debezium-schema-generator/pom.xml | 2 +- debezium-scripting/debezium-scripting-languages/pom.xml | 2 +- debezium-scripting/debezium-scripting/pom.xml | 2 +- debezium-scripting/pom.xml | 2 +- debezium-storage/debezium-storage-azure-blob/pom.xml | 2 +- debezium-storage/debezium-storage-file/pom.xml | 2 +- debezium-storage/debezium-storage-jdbc/pom.xml | 2 +- debezium-storage/debezium-storage-kafka/pom.xml | 2 +- debezium-storage/debezium-storage-redis/pom.xml | 2 +- debezium-storage/debezium-storage-rocketmq/pom.xml | 2 +- debezium-storage/debezium-storage-s3/pom.xml | 2 +- debezium-storage/debezium-storage-tests/pom.xml | 2 +- debezium-storage/pom.xml | 2 +- debezium-testing/debezium-testing-system/pom.xml | 4 ++-- debezium-testing/debezium-testing-testcontainers/pom.xml | 2 +- debezium-testing/pom.xml | 2 +- documentation/antora.yml | 2 +- pom.xml | 2 +- support/checkstyle/pom.xml | 2 +- support/ide-configs/pom.xml | 2 +- support/revapi/pom.xml | 2 +- 48 files changed, 49 insertions(+), 49 deletions(-) diff --git a/debezium-api/pom.xml b/debezium-api/pom.xml index 12c124b7224..0dfbb147699 100644 --- a/debezium-api/pom.xml +++ b/debezium-api/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-assembly-descriptors/pom.xml b/debezium-assembly-descriptors/pom.xml index a2a4690a354..011b7a063c6 100644 --- a/debezium-assembly-descriptors/pom.xml +++ b/debezium-assembly-descriptors/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-bom/pom.xml b/debezium-bom/pom.xml index 21511a3b44e..e5393abd214 100644 --- a/debezium-bom/pom.xml +++ b/debezium-bom/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-build-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../pom.xml 4.0.0 diff --git a/debezium-connect-rest-extension/pom.xml b/debezium-connect-rest-extension/pom.xml index 22865b90855..667103b6591 100644 --- a/debezium-connect-rest-extension/pom.xml +++ b/debezium-connect-rest-extension/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-connector-mongodb/pom.xml b/debezium-connector-mongodb/pom.xml index b91675f1a54..1e8e084b528 100644 --- a/debezium-connector-mongodb/pom.xml +++ b/debezium-connector-mongodb/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-connector-mysql/pom.xml b/debezium-connector-mysql/pom.xml index 699e1ccb800..410158f5bef 100644 --- a/debezium-connector-mysql/pom.xml +++ b/debezium-connector-mysql/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-connector-oracle/pom.xml b/debezium-connector-oracle/pom.xml index bfb3e8af0bc..9858141efb1 100644 --- a/debezium-connector-oracle/pom.xml +++ b/debezium-connector-oracle/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-connector-postgres/pom.xml b/debezium-connector-postgres/pom.xml index 3aac3e88add..c8b438038fc 100644 --- a/debezium-connector-postgres/pom.xml +++ b/debezium-connector-postgres/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-connector-sqlserver/pom.xml b/debezium-connector-sqlserver/pom.xml index 2086562e102..8900d06da06 100644 --- a/debezium-connector-sqlserver/pom.xml +++ b/debezium-connector-sqlserver/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-core/pom.xml b/debezium-core/pom.xml index aabff12fa9f..23b3d725dfb 100644 --- a/debezium-core/pom.xml +++ b/debezium-core/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-ddl-parser/pom.xml b/debezium-ddl-parser/pom.xml index 90b3139c008..5ce2ac19302 100644 --- a/debezium-ddl-parser/pom.xml +++ b/debezium-ddl-parser/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-embedded/pom.xml b/debezium-embedded/pom.xml index c137bea99ab..5fcc837b738 100644 --- a/debezium-embedded/pom.xml +++ b/debezium-embedded/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-interceptor/pom.xml b/debezium-interceptor/pom.xml index 1c8bde902de..30173dd313b 100644 --- a/debezium-interceptor/pom.xml +++ b/debezium-interceptor/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-microbenchmark-oracle/pom.xml b/debezium-microbenchmark-oracle/pom.xml index 2fee1d5ad9f..f8471352879 100644 --- a/debezium-microbenchmark-oracle/pom.xml +++ b/debezium-microbenchmark-oracle/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-microbenchmark/pom.xml b/debezium-microbenchmark/pom.xml index e42fd03a6a2..88af84a0eeb 100644 --- a/debezium-microbenchmark/pom.xml +++ b/debezium-microbenchmark/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-parent/pom.xml b/debezium-parent/pom.xml index 87eda03a49c..a184a750472 100644 --- a/debezium-parent/pom.xml +++ b/debezium-parent/pom.xml @@ -4,7 +4,7 @@ io.debezium debezium-build-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../pom.xml diff --git a/debezium-quarkus-outbox-common/deployment/pom.xml b/debezium-quarkus-outbox-common/deployment/pom.xml index 7666c570195..99abf9a0e34 100644 --- a/debezium-quarkus-outbox-common/deployment/pom.xml +++ b/debezium-quarkus-outbox-common/deployment/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-quarkus-outbox-common-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../pom.xml diff --git a/debezium-quarkus-outbox-common/pom.xml b/debezium-quarkus-outbox-common/pom.xml index 20a55ddda00..e56ac3f0ad4 100644 --- a/debezium-quarkus-outbox-common/pom.xml +++ b/debezium-quarkus-outbox-common/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../debezium-parent/pom.xml diff --git a/debezium-quarkus-outbox-common/runtime/pom.xml b/debezium-quarkus-outbox-common/runtime/pom.xml index 106474a8e8c..b1d03d9c8fd 100644 --- a/debezium-quarkus-outbox-common/runtime/pom.xml +++ b/debezium-quarkus-outbox-common/runtime/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-quarkus-outbox-common-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../pom.xml diff --git a/debezium-quarkus-outbox-reactive/deployment/pom.xml b/debezium-quarkus-outbox-reactive/deployment/pom.xml index babab0d005b..4087600c59f 100644 --- a/debezium-quarkus-outbox-reactive/deployment/pom.xml +++ b/debezium-quarkus-outbox-reactive/deployment/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-quarkus-outbox-reactive-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../pom.xml diff --git a/debezium-quarkus-outbox-reactive/integration-tests/pom.xml b/debezium-quarkus-outbox-reactive/integration-tests/pom.xml index e068ed8c08d..fb8fdc9b6f4 100644 --- a/debezium-quarkus-outbox-reactive/integration-tests/pom.xml +++ b/debezium-quarkus-outbox-reactive/integration-tests/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-quarkus-outbox-reactive-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../pom.xml diff --git a/debezium-quarkus-outbox-reactive/pom.xml b/debezium-quarkus-outbox-reactive/pom.xml index bc7926e7691..ce6ffd2a19d 100644 --- a/debezium-quarkus-outbox-reactive/pom.xml +++ b/debezium-quarkus-outbox-reactive/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../debezium-parent/pom.xml diff --git a/debezium-quarkus-outbox-reactive/runtime/pom.xml b/debezium-quarkus-outbox-reactive/runtime/pom.xml index 3d51fc460bc..7b70ec98523 100644 --- a/debezium-quarkus-outbox-reactive/runtime/pom.xml +++ b/debezium-quarkus-outbox-reactive/runtime/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-quarkus-outbox-reactive-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../pom.xml diff --git a/debezium-quarkus-outbox/deployment/pom.xml b/debezium-quarkus-outbox/deployment/pom.xml index aacec9ac9d9..edb9c3e38ee 100644 --- a/debezium-quarkus-outbox/deployment/pom.xml +++ b/debezium-quarkus-outbox/deployment/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-quarkus-outbox-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../pom.xml diff --git a/debezium-quarkus-outbox/integration-tests/pom.xml b/debezium-quarkus-outbox/integration-tests/pom.xml index 26acfb8181d..113efe5f92c 100644 --- a/debezium-quarkus-outbox/integration-tests/pom.xml +++ b/debezium-quarkus-outbox/integration-tests/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-quarkus-outbox-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../pom.xml diff --git a/debezium-quarkus-outbox/pom.xml b/debezium-quarkus-outbox/pom.xml index 36d61f946ae..a1349697248 100644 --- a/debezium-quarkus-outbox/pom.xml +++ b/debezium-quarkus-outbox/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../debezium-parent/pom.xml diff --git a/debezium-quarkus-outbox/runtime/pom.xml b/debezium-quarkus-outbox/runtime/pom.xml index 02ce93f00f1..ec9e6ad99d4 100644 --- a/debezium-quarkus-outbox/runtime/pom.xml +++ b/debezium-quarkus-outbox/runtime/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-quarkus-outbox-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../pom.xml diff --git a/debezium-schema-generator/pom.xml b/debezium-schema-generator/pom.xml index 7a9288a747f..f5b2fb940c9 100644 --- a/debezium-schema-generator/pom.xml +++ b/debezium-schema-generator/pom.xml @@ -5,7 +5,7 @@ io.debezium debezium-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../debezium-parent/pom.xml diff --git a/debezium-scripting/debezium-scripting-languages/pom.xml b/debezium-scripting/debezium-scripting-languages/pom.xml index c9983eb96c3..3584d867b83 100644 --- a/debezium-scripting/debezium-scripting-languages/pom.xml +++ b/debezium-scripting/debezium-scripting-languages/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-scripting-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../pom.xml 4.0.0 diff --git a/debezium-scripting/debezium-scripting/pom.xml b/debezium-scripting/debezium-scripting/pom.xml index d5563e6da80..59daacac8d2 100644 --- a/debezium-scripting/debezium-scripting/pom.xml +++ b/debezium-scripting/debezium-scripting/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-scripting-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../pom.xml 4.0.0 diff --git a/debezium-scripting/pom.xml b/debezium-scripting/pom.xml index b61f43c6b08..768ede7920d 100644 --- a/debezium-scripting/pom.xml +++ b/debezium-scripting/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-storage/debezium-storage-azure-blob/pom.xml b/debezium-storage/debezium-storage-azure-blob/pom.xml index 1ed9e55747a..0e35060723f 100644 --- a/debezium-storage/debezium-storage-azure-blob/pom.xml +++ b/debezium-storage/debezium-storage-azure-blob/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-storage - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../pom.xml 4.0.0 diff --git a/debezium-storage/debezium-storage-file/pom.xml b/debezium-storage/debezium-storage-file/pom.xml index bae852dae56..1a2b3406228 100644 --- a/debezium-storage/debezium-storage-file/pom.xml +++ b/debezium-storage/debezium-storage-file/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-storage - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../pom.xml 4.0.0 diff --git a/debezium-storage/debezium-storage-jdbc/pom.xml b/debezium-storage/debezium-storage-jdbc/pom.xml index b61574fb709..46e2726dfd7 100644 --- a/debezium-storage/debezium-storage-jdbc/pom.xml +++ b/debezium-storage/debezium-storage-jdbc/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-storage - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../pom.xml 4.0.0 diff --git a/debezium-storage/debezium-storage-kafka/pom.xml b/debezium-storage/debezium-storage-kafka/pom.xml index 6448d2ac00f..703eac10b1e 100644 --- a/debezium-storage/debezium-storage-kafka/pom.xml +++ b/debezium-storage/debezium-storage-kafka/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-storage - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../pom.xml 4.0.0 diff --git a/debezium-storage/debezium-storage-redis/pom.xml b/debezium-storage/debezium-storage-redis/pom.xml index 9ad8f14a357..ff2b565ade2 100644 --- a/debezium-storage/debezium-storage-redis/pom.xml +++ b/debezium-storage/debezium-storage-redis/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-storage - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../pom.xml 4.0.0 diff --git a/debezium-storage/debezium-storage-rocketmq/pom.xml b/debezium-storage/debezium-storage-rocketmq/pom.xml index 058919dc9e9..d52496580a6 100644 --- a/debezium-storage/debezium-storage-rocketmq/pom.xml +++ b/debezium-storage/debezium-storage-rocketmq/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-storage - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../pom.xml diff --git a/debezium-storage/debezium-storage-s3/pom.xml b/debezium-storage/debezium-storage-s3/pom.xml index 61a3d35b072..600816e0a40 100644 --- a/debezium-storage/debezium-storage-s3/pom.xml +++ b/debezium-storage/debezium-storage-s3/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-storage - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../pom.xml 4.0.0 diff --git a/debezium-storage/debezium-storage-tests/pom.xml b/debezium-storage/debezium-storage-tests/pom.xml index 50976dba89d..37e332d69c3 100644 --- a/debezium-storage/debezium-storage-tests/pom.xml +++ b/debezium-storage/debezium-storage-tests/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-storage - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../pom.xml 4.0.0 diff --git a/debezium-storage/pom.xml b/debezium-storage/pom.xml index c7fcfc38bdf..446db445f49 100644 --- a/debezium-storage/pom.xml +++ b/debezium-storage/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-testing/debezium-testing-system/pom.xml b/debezium-testing/debezium-testing-system/pom.xml index fd70339d04b..ce6cf947ab7 100644 --- a/debezium-testing/debezium-testing-system/pom.xml +++ b/debezium-testing/debezium-testing-system/pom.xml @@ -4,7 +4,7 @@ io.debezium debezium-testing - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../pom.xml @@ -126,7 +126,7 @@ ORCLPDB1 - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final http://debezium-artifact-server.${ocp.project.debezium}.svc.cluster.local:8080 diff --git a/debezium-testing/debezium-testing-testcontainers/pom.xml b/debezium-testing/debezium-testing-testcontainers/pom.xml index e2656dd0386..5b0452cb1c7 100644 --- a/debezium-testing/debezium-testing-testcontainers/pom.xml +++ b/debezium-testing/debezium-testing-testcontainers/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-testing - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../pom.xml 4.0.0 diff --git a/debezium-testing/pom.xml b/debezium-testing/pom.xml index f6570fb5004..649c1805431 100644 --- a/debezium-testing/pom.xml +++ b/debezium-testing/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../debezium-parent/pom.xml 4.0.0 diff --git a/documentation/antora.yml b/documentation/antora.yml index 6e1792ced49..cf2946b2388 100644 --- a/documentation/antora.yml +++ b/documentation/antora.yml @@ -8,7 +8,7 @@ nav: asciidoc: attributes: - debezium-version: 'dz.2.5.2.yb.2024.1-SNAPSHOT' + debezium-version: '2.5.2.Final' debezium-kafka-version: '3.6.1' debezium-docker-label: '2.4' DockerKafkaConnect: registry.redhat.io/amq7/amq-streams-kafka-28-rhel8:1.8.0 diff --git a/pom.xml b/pom.xml index fe07e687bf3..2d2b026cdae 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ io.debezium debezium-build-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final Debezium Build Aggregator Debezium is an open source change data capture platform pom diff --git a/support/checkstyle/pom.xml b/support/checkstyle/pom.xml index ee8f15b33db..0f9aeed67c3 100644 --- a/support/checkstyle/pom.xml +++ b/support/checkstyle/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-build-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../../pom.xml diff --git a/support/ide-configs/pom.xml b/support/ide-configs/pom.xml index e5bce3264fd..80f9a8d1911 100644 --- a/support/ide-configs/pom.xml +++ b/support/ide-configs/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-build-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../../pom.xml diff --git a/support/revapi/pom.xml b/support/revapi/pom.xml index 1c0aa633621..ab92a7947c6 100644 --- a/support/revapi/pom.xml +++ b/support/revapi/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-build-parent - dz.2.5.2.yb.2024.1-SNAPSHOT + 2.5.2.Final ../../pom.xml From fe55b135979ad7a88ed607c374f3722b4a64b5ad Mon Sep 17 00:00:00 2001 From: Vaibhav Kushwaha Date: Mon, 8 Jul 2024 12:18:00 +0530 Subject: [PATCH 12/15] Revert "changed version to default" This reverts commit 230b56b595eaac685f35cb2857d5549c8a911929. --- debezium-api/pom.xml | 2 +- debezium-assembly-descriptors/pom.xml | 2 +- debezium-bom/pom.xml | 2 +- debezium-connect-rest-extension/pom.xml | 2 +- debezium-connector-mongodb/pom.xml | 2 +- debezium-connector-mysql/pom.xml | 2 +- debezium-connector-oracle/pom.xml | 2 +- debezium-connector-postgres/pom.xml | 2 +- debezium-connector-sqlserver/pom.xml | 2 +- debezium-core/pom.xml | 2 +- debezium-ddl-parser/pom.xml | 2 +- debezium-embedded/pom.xml | 2 +- debezium-interceptor/pom.xml | 2 +- debezium-microbenchmark-oracle/pom.xml | 2 +- debezium-microbenchmark/pom.xml | 2 +- debezium-parent/pom.xml | 2 +- debezium-quarkus-outbox-common/deployment/pom.xml | 2 +- debezium-quarkus-outbox-common/pom.xml | 2 +- debezium-quarkus-outbox-common/runtime/pom.xml | 2 +- debezium-quarkus-outbox-reactive/deployment/pom.xml | 2 +- debezium-quarkus-outbox-reactive/integration-tests/pom.xml | 2 +- debezium-quarkus-outbox-reactive/pom.xml | 2 +- debezium-quarkus-outbox-reactive/runtime/pom.xml | 2 +- debezium-quarkus-outbox/deployment/pom.xml | 2 +- debezium-quarkus-outbox/integration-tests/pom.xml | 2 +- debezium-quarkus-outbox/pom.xml | 2 +- debezium-quarkus-outbox/runtime/pom.xml | 2 +- debezium-schema-generator/pom.xml | 2 +- debezium-scripting/debezium-scripting-languages/pom.xml | 2 +- debezium-scripting/debezium-scripting/pom.xml | 2 +- debezium-scripting/pom.xml | 2 +- debezium-storage/debezium-storage-azure-blob/pom.xml | 2 +- debezium-storage/debezium-storage-file/pom.xml | 2 +- debezium-storage/debezium-storage-jdbc/pom.xml | 2 +- debezium-storage/debezium-storage-kafka/pom.xml | 2 +- debezium-storage/debezium-storage-redis/pom.xml | 2 +- debezium-storage/debezium-storage-rocketmq/pom.xml | 2 +- debezium-storage/debezium-storage-s3/pom.xml | 2 +- debezium-storage/debezium-storage-tests/pom.xml | 2 +- debezium-storage/pom.xml | 2 +- debezium-testing/debezium-testing-system/pom.xml | 4 ++-- debezium-testing/debezium-testing-testcontainers/pom.xml | 2 +- debezium-testing/pom.xml | 2 +- documentation/antora.yml | 2 +- pom.xml | 2 +- support/checkstyle/pom.xml | 2 +- support/ide-configs/pom.xml | 2 +- support/revapi/pom.xml | 2 +- 48 files changed, 49 insertions(+), 49 deletions(-) diff --git a/debezium-api/pom.xml b/debezium-api/pom.xml index 0dfbb147699..12c124b7224 100644 --- a/debezium-api/pom.xml +++ b/debezium-api/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-assembly-descriptors/pom.xml b/debezium-assembly-descriptors/pom.xml index 011b7a063c6..a2a4690a354 100644 --- a/debezium-assembly-descriptors/pom.xml +++ b/debezium-assembly-descriptors/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-bom/pom.xml b/debezium-bom/pom.xml index e5393abd214..21511a3b44e 100644 --- a/debezium-bom/pom.xml +++ b/debezium-bom/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-build-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/debezium-connect-rest-extension/pom.xml b/debezium-connect-rest-extension/pom.xml index 667103b6591..22865b90855 100644 --- a/debezium-connect-rest-extension/pom.xml +++ b/debezium-connect-rest-extension/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-connector-mongodb/pom.xml b/debezium-connector-mongodb/pom.xml index 1e8e084b528..b91675f1a54 100644 --- a/debezium-connector-mongodb/pom.xml +++ b/debezium-connector-mongodb/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-connector-mysql/pom.xml b/debezium-connector-mysql/pom.xml index 410158f5bef..699e1ccb800 100644 --- a/debezium-connector-mysql/pom.xml +++ b/debezium-connector-mysql/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-connector-oracle/pom.xml b/debezium-connector-oracle/pom.xml index 9858141efb1..bfb3e8af0bc 100644 --- a/debezium-connector-oracle/pom.xml +++ b/debezium-connector-oracle/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-connector-postgres/pom.xml b/debezium-connector-postgres/pom.xml index c8b438038fc..3aac3e88add 100644 --- a/debezium-connector-postgres/pom.xml +++ b/debezium-connector-postgres/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-connector-sqlserver/pom.xml b/debezium-connector-sqlserver/pom.xml index 8900d06da06..2086562e102 100644 --- a/debezium-connector-sqlserver/pom.xml +++ b/debezium-connector-sqlserver/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-core/pom.xml b/debezium-core/pom.xml index 23b3d725dfb..aabff12fa9f 100644 --- a/debezium-core/pom.xml +++ b/debezium-core/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-ddl-parser/pom.xml b/debezium-ddl-parser/pom.xml index 5ce2ac19302..90b3139c008 100644 --- a/debezium-ddl-parser/pom.xml +++ b/debezium-ddl-parser/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-embedded/pom.xml b/debezium-embedded/pom.xml index 5fcc837b738..c137bea99ab 100644 --- a/debezium-embedded/pom.xml +++ b/debezium-embedded/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-interceptor/pom.xml b/debezium-interceptor/pom.xml index 30173dd313b..1c8bde902de 100644 --- a/debezium-interceptor/pom.xml +++ b/debezium-interceptor/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-microbenchmark-oracle/pom.xml b/debezium-microbenchmark-oracle/pom.xml index f8471352879..2fee1d5ad9f 100644 --- a/debezium-microbenchmark-oracle/pom.xml +++ b/debezium-microbenchmark-oracle/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-microbenchmark/pom.xml b/debezium-microbenchmark/pom.xml index 88af84a0eeb..e42fd03a6a2 100644 --- a/debezium-microbenchmark/pom.xml +++ b/debezium-microbenchmark/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-parent/pom.xml b/debezium-parent/pom.xml index a184a750472..87eda03a49c 100644 --- a/debezium-parent/pom.xml +++ b/debezium-parent/pom.xml @@ -4,7 +4,7 @@ io.debezium debezium-build-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml diff --git a/debezium-quarkus-outbox-common/deployment/pom.xml b/debezium-quarkus-outbox-common/deployment/pom.xml index 99abf9a0e34..7666c570195 100644 --- a/debezium-quarkus-outbox-common/deployment/pom.xml +++ b/debezium-quarkus-outbox-common/deployment/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-quarkus-outbox-common-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml diff --git a/debezium-quarkus-outbox-common/pom.xml b/debezium-quarkus-outbox-common/pom.xml index e56ac3f0ad4..20a55ddda00 100644 --- a/debezium-quarkus-outbox-common/pom.xml +++ b/debezium-quarkus-outbox-common/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml diff --git a/debezium-quarkus-outbox-common/runtime/pom.xml b/debezium-quarkus-outbox-common/runtime/pom.xml index b1d03d9c8fd..106474a8e8c 100644 --- a/debezium-quarkus-outbox-common/runtime/pom.xml +++ b/debezium-quarkus-outbox-common/runtime/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-quarkus-outbox-common-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml diff --git a/debezium-quarkus-outbox-reactive/deployment/pom.xml b/debezium-quarkus-outbox-reactive/deployment/pom.xml index 4087600c59f..babab0d005b 100644 --- a/debezium-quarkus-outbox-reactive/deployment/pom.xml +++ b/debezium-quarkus-outbox-reactive/deployment/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-quarkus-outbox-reactive-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml diff --git a/debezium-quarkus-outbox-reactive/integration-tests/pom.xml b/debezium-quarkus-outbox-reactive/integration-tests/pom.xml index fb8fdc9b6f4..e068ed8c08d 100644 --- a/debezium-quarkus-outbox-reactive/integration-tests/pom.xml +++ b/debezium-quarkus-outbox-reactive/integration-tests/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-quarkus-outbox-reactive-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml diff --git a/debezium-quarkus-outbox-reactive/pom.xml b/debezium-quarkus-outbox-reactive/pom.xml index ce6ffd2a19d..bc7926e7691 100644 --- a/debezium-quarkus-outbox-reactive/pom.xml +++ b/debezium-quarkus-outbox-reactive/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml diff --git a/debezium-quarkus-outbox-reactive/runtime/pom.xml b/debezium-quarkus-outbox-reactive/runtime/pom.xml index 7b70ec98523..3d51fc460bc 100644 --- a/debezium-quarkus-outbox-reactive/runtime/pom.xml +++ b/debezium-quarkus-outbox-reactive/runtime/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-quarkus-outbox-reactive-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml diff --git a/debezium-quarkus-outbox/deployment/pom.xml b/debezium-quarkus-outbox/deployment/pom.xml index edb9c3e38ee..aacec9ac9d9 100644 --- a/debezium-quarkus-outbox/deployment/pom.xml +++ b/debezium-quarkus-outbox/deployment/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-quarkus-outbox-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml diff --git a/debezium-quarkus-outbox/integration-tests/pom.xml b/debezium-quarkus-outbox/integration-tests/pom.xml index 113efe5f92c..26acfb8181d 100644 --- a/debezium-quarkus-outbox/integration-tests/pom.xml +++ b/debezium-quarkus-outbox/integration-tests/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-quarkus-outbox-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml diff --git a/debezium-quarkus-outbox/pom.xml b/debezium-quarkus-outbox/pom.xml index a1349697248..36d61f946ae 100644 --- a/debezium-quarkus-outbox/pom.xml +++ b/debezium-quarkus-outbox/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml diff --git a/debezium-quarkus-outbox/runtime/pom.xml b/debezium-quarkus-outbox/runtime/pom.xml index ec9e6ad99d4..02ce93f00f1 100644 --- a/debezium-quarkus-outbox/runtime/pom.xml +++ b/debezium-quarkus-outbox/runtime/pom.xml @@ -6,7 +6,7 @@ io.debezium debezium-quarkus-outbox-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml diff --git a/debezium-schema-generator/pom.xml b/debezium-schema-generator/pom.xml index f5b2fb940c9..7a9288a747f 100644 --- a/debezium-schema-generator/pom.xml +++ b/debezium-schema-generator/pom.xml @@ -5,7 +5,7 @@ io.debezium debezium-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml diff --git a/debezium-scripting/debezium-scripting-languages/pom.xml b/debezium-scripting/debezium-scripting-languages/pom.xml index 3584d867b83..c9983eb96c3 100644 --- a/debezium-scripting/debezium-scripting-languages/pom.xml +++ b/debezium-scripting/debezium-scripting-languages/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-scripting-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/debezium-scripting/debezium-scripting/pom.xml b/debezium-scripting/debezium-scripting/pom.xml index 59daacac8d2..d5563e6da80 100644 --- a/debezium-scripting/debezium-scripting/pom.xml +++ b/debezium-scripting/debezium-scripting/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-scripting-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/debezium-scripting/pom.xml b/debezium-scripting/pom.xml index 768ede7920d..b61f43c6b08 100644 --- a/debezium-scripting/pom.xml +++ b/debezium-scripting/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-storage/debezium-storage-azure-blob/pom.xml b/debezium-storage/debezium-storage-azure-blob/pom.xml index 0e35060723f..1ed9e55747a 100644 --- a/debezium-storage/debezium-storage-azure-blob/pom.xml +++ b/debezium-storage/debezium-storage-azure-blob/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-storage - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/debezium-storage/debezium-storage-file/pom.xml b/debezium-storage/debezium-storage-file/pom.xml index 1a2b3406228..bae852dae56 100644 --- a/debezium-storage/debezium-storage-file/pom.xml +++ b/debezium-storage/debezium-storage-file/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-storage - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/debezium-storage/debezium-storage-jdbc/pom.xml b/debezium-storage/debezium-storage-jdbc/pom.xml index 46e2726dfd7..b61574fb709 100644 --- a/debezium-storage/debezium-storage-jdbc/pom.xml +++ b/debezium-storage/debezium-storage-jdbc/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-storage - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/debezium-storage/debezium-storage-kafka/pom.xml b/debezium-storage/debezium-storage-kafka/pom.xml index 703eac10b1e..6448d2ac00f 100644 --- a/debezium-storage/debezium-storage-kafka/pom.xml +++ b/debezium-storage/debezium-storage-kafka/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-storage - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/debezium-storage/debezium-storage-redis/pom.xml b/debezium-storage/debezium-storage-redis/pom.xml index ff2b565ade2..9ad8f14a357 100644 --- a/debezium-storage/debezium-storage-redis/pom.xml +++ b/debezium-storage/debezium-storage-redis/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-storage - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/debezium-storage/debezium-storage-rocketmq/pom.xml b/debezium-storage/debezium-storage-rocketmq/pom.xml index d52496580a6..058919dc9e9 100644 --- a/debezium-storage/debezium-storage-rocketmq/pom.xml +++ b/debezium-storage/debezium-storage-rocketmq/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-storage - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml diff --git a/debezium-storage/debezium-storage-s3/pom.xml b/debezium-storage/debezium-storage-s3/pom.xml index 600816e0a40..61a3d35b072 100644 --- a/debezium-storage/debezium-storage-s3/pom.xml +++ b/debezium-storage/debezium-storage-s3/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-storage - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/debezium-storage/debezium-storage-tests/pom.xml b/debezium-storage/debezium-storage-tests/pom.xml index 37e332d69c3..50976dba89d 100644 --- a/debezium-storage/debezium-storage-tests/pom.xml +++ b/debezium-storage/debezium-storage-tests/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-storage - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/debezium-storage/pom.xml b/debezium-storage/pom.xml index 446db445f49..c7fcfc38bdf 100644 --- a/debezium-storage/pom.xml +++ b/debezium-storage/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/debezium-testing/debezium-testing-system/pom.xml b/debezium-testing/debezium-testing-system/pom.xml index ce6cf947ab7..fd70339d04b 100644 --- a/debezium-testing/debezium-testing-system/pom.xml +++ b/debezium-testing/debezium-testing-system/pom.xml @@ -4,7 +4,7 @@ io.debezium debezium-testing - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml @@ -126,7 +126,7 @@ ORCLPDB1 - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT http://debezium-artifact-server.${ocp.project.debezium}.svc.cluster.local:8080 diff --git a/debezium-testing/debezium-testing-testcontainers/pom.xml b/debezium-testing/debezium-testing-testcontainers/pom.xml index 5b0452cb1c7..e2656dd0386 100644 --- a/debezium-testing/debezium-testing-testcontainers/pom.xml +++ b/debezium-testing/debezium-testing-testcontainers/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-testing - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/debezium-testing/pom.xml b/debezium-testing/pom.xml index 649c1805431..f6570fb5004 100644 --- a/debezium-testing/pom.xml +++ b/debezium-testing/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../debezium-parent/pom.xml 4.0.0 diff --git a/documentation/antora.yml b/documentation/antora.yml index cf2946b2388..6e1792ced49 100644 --- a/documentation/antora.yml +++ b/documentation/antora.yml @@ -8,7 +8,7 @@ nav: asciidoc: attributes: - debezium-version: '2.5.2.Final' + debezium-version: 'dz.2.5.2.yb.2024.1-SNAPSHOT' debezium-kafka-version: '3.6.1' debezium-docker-label: '2.4' DockerKafkaConnect: registry.redhat.io/amq7/amq-streams-kafka-28-rhel8:1.8.0 diff --git a/pom.xml b/pom.xml index 2d2b026cdae..fe07e687bf3 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ io.debezium debezium-build-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT Debezium Build Aggregator Debezium is an open source change data capture platform pom diff --git a/support/checkstyle/pom.xml b/support/checkstyle/pom.xml index 0f9aeed67c3..ee8f15b33db 100644 --- a/support/checkstyle/pom.xml +++ b/support/checkstyle/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-build-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../../pom.xml diff --git a/support/ide-configs/pom.xml b/support/ide-configs/pom.xml index 80f9a8d1911..e5bce3264fd 100644 --- a/support/ide-configs/pom.xml +++ b/support/ide-configs/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-build-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../../pom.xml diff --git a/support/revapi/pom.xml b/support/revapi/pom.xml index ab92a7947c6..1c0aa633621 100644 --- a/support/revapi/pom.xml +++ b/support/revapi/pom.xml @@ -3,7 +3,7 @@ io.debezium debezium-build-parent - 2.5.2.Final + dz.2.5.2.yb.2024.1-SNAPSHOT ../../pom.xml From cb2c43305ad9a22bdfea7ad1ccb52c40204a3c63 Mon Sep 17 00:00:00 2001 From: Vaibhav Kushwaha Date: Fri, 12 Jul 2024 12:52:05 +0530 Subject: [PATCH 13/15] removed unrelated change --- .../debezium/connector/postgresql/CustomTestSnapshot.java | 2 +- ...ugabyteDBConnectorIT.java => PostgresConnectorIT.java} | 8 ++++---- ...BConnectorTaskIT.java => PostgresConnectorTaskIT.java} | 2 +- .../rest/DebeziumPostgresConnectorResourceIT.java | 4 ++-- .../DebeziumPostgresConnectorResourceNoDatabaseIT.java | 4 ++-- .../src/test/resources/logback-test.xml | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) rename debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/{YugabyteDBConnectorIT.java => PostgresConnectorIT.java} (99%) rename debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/{YugabyteDBConnectorTaskIT.java => PostgresConnectorTaskIT.java} (98%) diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomTestSnapshot.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomTestSnapshot.java index 3b2dd3be192..f5ea83d4a70 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomTestSnapshot.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/CustomTestSnapshot.java @@ -16,7 +16,7 @@ import io.debezium.relational.TableId; /** - * This is a small class used in YugabyteDBConnectorIT to test a custom snapshot + * This is a small class used in PostgresConnectorIT to test a custom snapshot * * It is tightly coupled to the test there, but needs to be placed here in order * to allow for class loading to work diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteDBConnectorIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorIT.java similarity index 99% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteDBConnectorIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorIT.java index a85f7f04f7d..2c200c52b85 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteDBConnectorIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorIT.java @@ -111,8 +111,8 @@ * * @author Horia Chiorean (hchiorea@redhat.com) */ -public class YugabyteDBConnectorIT extends AbstractConnectorTest { - private static final Logger LOGGER = LoggerFactory.getLogger(YugabyteDBConnectorIT.class); +public class PostgresConnectorIT extends AbstractConnectorTest { + private static final Logger LOGGER = LoggerFactory.getLogger(PostgresConnectorIT.class); /* * Specific tests that need to extend the initial DDL set should do it in a form of @@ -3288,7 +3288,7 @@ public void shouldProduceMessagesOnlyForConfiguredTables() throws Exception { @FixFor("DBZ-2885") @SkipWhenDecoderPluginNameIsNot(value = SkipWhenDecoderPluginNameIsNot.DecoderPluginName.PGOUTPUT, reason = "Publication configuration only valid for PGOUTPUT decoder") public void shouldThrowWhenTableFiltersIsEmpty() throws Exception { - final LogInterceptor logInterceptor = new LogInterceptor(YugabyteDBConnectorIT.class); + final LogInterceptor logInterceptor = new LogInterceptor(PostgresConnectorIT.class); TestHelper.dropAllSchemas(); TestHelper.dropPublication("cdc"); @@ -3709,7 +3709,7 @@ public void shouldSuppressLoggingOptionalOfExcludedColumns() throws Exception { @FixFor("DBZ-5739") @SkipWhenDatabaseVersion(check = LESS_THAN, major = 11, reason = "This needs pg_replication_slot_advance which is supported only on Postgres 11+") public void shouldStopConnectorOnSlotRecreation() throws InterruptedException { - final LogInterceptor logInterceptor = new LogInterceptor(YugabyteDBConnectorIT.class); + final LogInterceptor logInterceptor = new LogInterceptor(PostgresConnectorIT.class); TestHelper.execute(SETUP_TABLES_STMT); Configuration.Builder configBuilder = TestHelper.defaultConfig() diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteDBConnectorTaskIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorTaskIT.java similarity index 98% rename from debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteDBConnectorTaskIT.java rename to debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorTaskIT.java index 0d06df672f9..172fd53545b 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/YugabyteDBConnectorTaskIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorTaskIT.java @@ -22,7 +22,7 @@ /** * Integration test for {@link PostgresConnectorTask} class. */ -public class YugabyteDBConnectorTaskIT { +public class PostgresConnectorTaskIT { @Test @FixFor("DBZ-519") diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceIT.java index dec1182f22f..22d8b089216 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceIT.java @@ -14,7 +14,6 @@ import java.util.Locale; import java.util.Map; -import io.debezium.connector.postgresql.YugabyteDBConnector; import org.junit.After; import org.junit.Assume; import org.junit.Before; @@ -22,6 +21,7 @@ import org.junit.Test; import io.debezium.connector.postgresql.Module; +import io.debezium.connector.postgresql.YugabyteDBConnector; import io.debezium.connector.postgresql.PostgresConnectorConfig; import io.debezium.testing.testcontainers.Connector; import io.debezium.testing.testcontainers.ConnectorConfiguration; @@ -32,7 +32,7 @@ public class DebeziumPostgresConnectorResourceIT { @BeforeClass public static void checkCondition() { - Assume.assumeThat("Skipping DebeziumYugabyteDBConnectorResourceIT tests when assembly profile is not active!", + Assume.assumeThat("Skipping DebeziumPostgresConnectorResourceIT tests when assembly profile is not active!", System.getProperty("isAssemblyProfileActive", "false"), is("true")); } diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceNoDatabaseIT.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceNoDatabaseIT.java index 45ab33faf42..3f23e69b652 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceNoDatabaseIT.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/rest/DebeziumPostgresConnectorResourceNoDatabaseIT.java @@ -10,7 +10,6 @@ import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.Matchers.hasKey; -import io.debezium.connector.postgresql.YugabyteDBConnector; import org.junit.After; import org.junit.Assume; import org.junit.Before; @@ -18,13 +17,14 @@ import org.junit.Test; import io.debezium.connector.postgresql.Module; +import io.debezium.connector.postgresql.YugabyteDBConnector; import io.debezium.testing.testcontainers.testhelper.RestExtensionTestInfrastructure; public class DebeziumPostgresConnectorResourceNoDatabaseIT { @BeforeClass public static void checkCondition() { - Assume.assumeThat("Skipping DebeziumYugabyteDBConnectorResourceIT tests when assembly profile is not active!", + Assume.assumeThat("Skipping DebeziumPostgresConnectorResourceIT tests when assembly profile is not active!", System.getProperty("isAssemblyProfileActive", "false"), is("true")); } diff --git a/debezium-connector-postgres/src/test/resources/logback-test.xml b/debezium-connector-postgres/src/test/resources/logback-test.xml index 95faa1e192c..c2bf2d54754 100644 --- a/debezium-connector-postgres/src/test/resources/logback-test.xml +++ b/debezium-connector-postgres/src/test/resources/logback-test.xml @@ -33,7 +33,7 @@ additivity="false"> - + From 226a8806a4dc9ed2b8ea4a819b0e770ac2634021 Mon Sep 17 00:00:00 2001 From: Vaibhav Kushwaha Date: Fri, 12 Jul 2024 12:57:04 +0530 Subject: [PATCH 14/15] removed core changes --- .../PostgresChangeEventSourceCoordinator.java | 6 +++++- .../debezium/pipeline/spi/SnapshotResult.java | 4 ---- .../RelationalDatabaseConnectorConfig.java | 17 +++++++---------- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresChangeEventSourceCoordinator.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresChangeEventSourceCoordinator.java index 285dd8a1f6d..7d25a68fa42 100644 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresChangeEventSourceCoordinator.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresChangeEventSourceCoordinator.java @@ -81,7 +81,7 @@ protected void executeChangeEventSources(CdcSourceTaskContext taskContext, Snaps LOGGER.debug("Snapshot result {}", snapshotResult); if (context.isRunning() && snapshotResult.isCompletedOrSkipped()) { - if(YugabyteDBServer.isEnabled() && !snapshotResult.isSkipped()) { + if(YugabyteDBServer.isEnabled() && !isSnapshotSkipped(snapshotResult)) { LOGGER.info("Will wait for snapshot completion before transitioning to streaming"); waitForSnapshotCompletion = true; while (waitForSnapshotCompletion) { @@ -99,6 +99,10 @@ protected void executeChangeEventSources(CdcSourceTaskContext taskContext, Snaps } } + protected boolean isSnapshotSkipped(SnapshotResult snapshotResult) { + return snapshotResult.getStatus() == SnapshotResult.SnapshotResultStatus.SKIPPED; + } + @Override protected CatchUpStreamingResult executeCatchUpStreaming(ChangeEventSourceContext context, SnapshotChangeEventSource snapshotSource, diff --git a/debezium-core/src/main/java/io/debezium/pipeline/spi/SnapshotResult.java b/debezium-core/src/main/java/io/debezium/pipeline/spi/SnapshotResult.java index 6788e28c8c1..5b2b6617fa5 100644 --- a/debezium-core/src/main/java/io/debezium/pipeline/spi/SnapshotResult.java +++ b/debezium-core/src/main/java/io/debezium/pipeline/spi/SnapshotResult.java @@ -31,10 +31,6 @@ public boolean isCompletedOrSkipped() { return this.status == SnapshotResultStatus.SKIPPED || this.status == SnapshotResultStatus.COMPLETED; } - public boolean isSkipped() { - return this.status == SnapshotResultStatus.SKIPPED; - } - public SnapshotResultStatus getStatus() { return status; } diff --git a/debezium-core/src/main/java/io/debezium/relational/RelationalDatabaseConnectorConfig.java b/debezium-core/src/main/java/io/debezium/relational/RelationalDatabaseConnectorConfig.java index 80b76942c9e..43ee07fed9c 100644 --- a/debezium-core/src/main/java/io/debezium/relational/RelationalDatabaseConnectorConfig.java +++ b/debezium-core/src/main/java/io/debezium/relational/RelationalDatabaseConnectorConfig.java @@ -825,17 +825,14 @@ private static int validateMessageKeyColumnsField(Configuration config, Field fi } protected static int validateHostname(Configuration config, Field field, ValidationOutput problems) { - LOGGER.info("Bypassing hostname validation for YB"); + String hostName = config.getString(field); + if (!Strings.isNullOrBlank(hostName)) { + if (!HOSTNAME_PATTERN.asPredicate().test(hostName)) { + problems.accept(field, hostName, hostName + " has invalid format (only the underscore, hyphen, dot and alphanumeric characters are allowed)"); + return 1; + } + } return 0; - - // String hostName = config.getString(field); - // if (!Strings.isNullOrBlank(hostName)) { - // if (!HOSTNAME_PATTERN.asPredicate().test(hostName)) { - // problems.accept(field, hostName, hostName + " has invalid format (only the underscore, hyphen, dot and alphanumeric characters are allowed)"); - // return 1; - // } - // } - // return 0; } public FieldNamer getFieldNamer() { From 35235eff6ef3e93db039890ce4f2381483696925 Mon Sep 17 00:00:00 2001 From: Vaibhav Kushwaha Date: Fri, 12 Jul 2024 13:32:17 +0530 Subject: [PATCH 15/15] addressed review comments --- .../postgresql/PostgresConnectorConfig.java | 22 ++++++-- .../PostgresConnectorConfigDefTest.java | 53 +++++++++++++++++++ 2 files changed, 72 insertions(+), 3 deletions(-) diff --git a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorConfig.java b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorConfig.java index aad2d2c50ab..b5587fd7b43 100755 --- a/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorConfig.java +++ b/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/PostgresConnectorConfig.java @@ -11,6 +11,7 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import java.util.regex.Pattern; import io.debezium.data.Envelope; import io.debezium.heartbeat.Heartbeat; @@ -532,6 +533,7 @@ public static SchemaRefreshMode parse(String value) { protected static final int DEFAULT_PORT = 5_433; protected static final int DEFAULT_SNAPSHOT_FETCH_SIZE = 10_240; protected static final int DEFAULT_MAX_RETRIES = 6; + public static final Pattern YB_HOSTNAME_PATTERN = Pattern.compile("^[a-zA-Z0-9-_.,:]+$"); public static final Field PORT = RelationalDatabaseConnectorConfig.PORT .withDefault(DEFAULT_PORT); @@ -1300,9 +1302,23 @@ public Optional parseSignallingMessage(Struct value) { } protected static int validateYBHostname(Configuration config, Field field, Field.ValidationOutput problems) { - // YB Note: Not validating the hostname against any pattern. - LOGGER.info("Using YB custom validator to bypass hostname validation"); - return 0; + String hostName = config.getString(field); + int problemCount = 0; + + if (!Strings.isNullOrBlank(hostName)) { + if (hostName.contains(",") && !hostName.contains(":")) { + // Basic validation for cases when a user has only specified comma separated IPs which is not the correct format. + problems.accept(field, hostName, hostName + " has invalid format (specify mutiple hosts in the format ip1:port1,ip2:port2,ip3:port3)"); + ++problemCount; + } + + if (!YB_HOSTNAME_PATTERN.asPredicate().test(hostName)) { + problems.accept(field, hostName, hostName + " has invalid format (only the underscore, hyphen, dot, comma, colon and alphanumeric characters are allowed)"); + ++problemCount; + } + } + + return problemCount; } diff --git a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorConfigDefTest.java b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorConfigDefTest.java index 7b2baa58bf8..c4e9453fc19 100644 --- a/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorConfigDefTest.java +++ b/debezium-connector-postgres/src/test/java/io/debezium/connector/postgresql/PostgresConnectorConfigDefTest.java @@ -53,4 +53,57 @@ public void shouldSetReplicaAutoSetRegExValue() { assertThat((problemCount == 0)).isTrue(); } + + @Test + public void shouldValidateWithCorrectSingleHostnamePattern() { + validateCorrectHostname(false); + } + + @Test + public void shouldValidateWithCorrectMultiHostnamePattern() { + validateCorrectHostname(true); + } + + @Test + public void shouldFailWithInvalidCharacterInHostname() { + Configuration.Builder configBuilder = TestHelper.defaultConfig() + .with(PostgresConnectorConfig.HOSTNAME, "*invalidCharacter"); + + int problemCount = PostgresConnectorConfig.validateYBHostname( + configBuilder.build(), PostgresConnectorConfig.HOSTNAME, (field, value, problemMessage) -> System.out.println(problemMessage)); + + assertThat((problemCount == 1)).isTrue(); + } + + @Test + public void shouldFailIfInvalidMultiHostFormatSpecified() { + Configuration.Builder configBuilder = TestHelper.defaultConfig() + .with(PostgresConnectorConfig.HOSTNAME, "127.0.0.1,127.0.0.2,127.0.0.3"); + + int problemCount = PostgresConnectorConfig.validateYBHostname( + configBuilder.build(), PostgresConnectorConfig.HOSTNAME, (field, value, problemMessage) -> System.out.println(problemMessage)); + + assertThat((problemCount == 1)).isTrue(); + } + + @Test + public void shouldFailIfInvalidMultiHostFormatSpecifiedWithInvalidCharacter() { + Configuration.Builder configBuilder = TestHelper.defaultConfig() + .with(PostgresConnectorConfig.HOSTNAME, "127.0.0.1,127.0.0.2,127.0.0.3+"); + + int problemCount = PostgresConnectorConfig.validateYBHostname( + configBuilder.build(), PostgresConnectorConfig.HOSTNAME, (field, value, problemMessage) -> System.out.println(problemMessage)); + + assertThat((problemCount == 2)).isTrue(); + } + + public void validateCorrectHostname(boolean multiNode) { + Configuration.Builder configBuilder = TestHelper.defaultConfig() + .with(PostgresConnectorConfig.HOSTNAME, multiNode ? "127.0.0.1:5433,127.0.0.2:5433,127.0.0.3:5433" : "127.0.0.1"); + + int problemCount = PostgresConnectorConfig.validateYBHostname( + configBuilder.build(), PostgresConnectorConfig.HOSTNAME, (field, value, problemMessage) -> System.out.println(problemMessage)); + + assertThat((problemCount == 0)).isTrue(); + } }