diff --git a/README.md b/README.md index 8f4c4bbb..6ae2c7db 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,13 @@ It is thus recommended to execute integration tests per-module and set-up necess Note: running these tests against external infrastructure may incur cost with your cloud provider. We're not going to pay your AWS/GCP/Azure bill. +## Table of Contents + +* [Amazon Kinesis](#amazon-kinesis) +* [Google Cloud Pub/Sub](#google-cloud-pubsub) +* [Azure Event Hubs](#azure-event-hubs) +* [Pravega](#pravega) + ## Amazon Kinesis * Execute `aws configure` as described in AWS CLI [getting started](https://github.com/aws/aws-cli#getting-started) guide and setup the account. @@ -93,3 +100,28 @@ Delete the Event Hubs namespace and log out, e.g. on the CLI: az group delete -n eventhubstest az logout ``` + +## Pravega + +[Pravega](https://pravega.io/) is a cloud-native storage system for event streams and data streams. This sink offers two modes: non-transactional and transactional. The non-transactional mode individually writes each event in a Debezium batch to Pravega. The transactional mode writes the Debezium batch to a Pravega transaction that commits when the batch is completed. + +The Pravega sink expects destination scope and streams to already be created. + +The Pravega sink uses Pravega 0.13.0 Client API and supports Pravega versions 0.11.0 and above. + +### `conf/application.properties` Configuration + +|Property|Default|Description| +|--------|-------|-----------| +|`debezium.sink.type`||Must be set to `pravega`.| +|`debezium.sink.pravega.controller.uri`|`tcp://localhost:9090`|The connection string to a Controller in the Pravega cluster.| +|`debezium.sink.pravega.scope`||The name of the scope in which to find the destination streams.| +|`debezium.sink.pravega.transaction`|`false`|Set to `true` to have the sink use Pravega transactions for each Debezium batch.| + +### CDI Injection Points + +Pravega sink behavior can be modified by custom logic providing alternative implementations for specific functionalities. When the alternative implementations are not available then the default ones are used. + +|Interface|Description| +|---------|-----------| +|`io.debezium.server.StreamNameMapper`|A custom implementation maps the planned destination stream name into a physical Pravega stream name. By default the same name is used.| diff --git a/debezium-server-bom/pom.xml b/debezium-server-bom/pom.xml index 74c7f2b6..d1520854 100644 --- a/debezium-server-bom/pom.xml +++ b/debezium-server-bom/pom.xml @@ -16,7 +16,7 @@ 25.0.0 2.10.1 5.12.1 - 0.9.1 + 0.13.0 2.16.3 2.2.3 1.2 diff --git a/debezium-server-pravega/pom.xml b/debezium-server-pravega/pom.xml index d63de28b..6667b46a 100644 --- a/debezium-server-pravega/pom.xml +++ b/debezium-server-pravega/pom.xml @@ -11,6 +11,8 @@ 4.1.86.Final + 3.21.7 + 1.47.0 @@ -21,6 +23,20 @@ pom import + + com.google.protobuf + protobuf-bom + ${protobuf.version} + pom + import + + + io.grpc + grpc-bom + ${grpc.version} + pom + import + @@ -34,51 +50,6 @@ io.pravega pravega-client - - io.netty - netty-common - ${netty.version} - - - io.netty - netty-transport - ${netty.version} - - - io.netty - netty-handler - ${netty.version} - - - io.netty - netty-codec - ${netty.version} - - - io.netty - netty-codec-http - ${netty.version} - - - io.netty - netty-codec-http2 - ${netty.version} - - - io.netty - netty-codec-socks - ${netty.version} - - - io.netty - netty-handler-proxy - ${netty.version} - - - io.netty - netty-transport-native-epoll - ${netty.version} - @@ -92,12 +63,6 @@ test-jar test - - io.jsonwebtoken - jjwt - 0.9.1 - test - @@ -131,7 +96,67 @@ maven-failsafe-plugin - integration-test-pravega + integration-test-pravega-0.11 + + integration-test + + + + pravega + testc.inventory.customers + false + 0.11.0 + + ${runOrder} + + + + integration-test-pravega-0.11-txn + + integration-test + + + + pravega + testc.inventory.customers + true + 0.11.0 + + ${runOrder} + + + + integration-test-pravega-0.12 + + integration-test + + + + pravega + testc.inventory.customers + false + 0.12.0 + + ${runOrder} + + + + integration-test-pravega-0.12-txn + + integration-test + + + + pravega + testc.inventory.customers + true + 0.12.0 + + ${runOrder} + + + + integration-test-pravega-0.13 integration-test @@ -140,12 +165,13 @@ pravega testc.inventory.customers false + 0.13.0-rc0 ${runOrder} - integration-test-pravega-txn + integration-test-pravega-0.13-txn integration-test @@ -154,6 +180,7 @@ pravega testc.inventory.customers true + 0.13.0-rc0 ${runOrder} diff --git a/debezium-server-pravega/src/test/java/io/debezium/server/pravega/PravegaTestResource.java b/debezium-server-pravega/src/test/java/io/debezium/server/pravega/PravegaTestResource.java index d9e7363c..e4aad45c 100644 --- a/debezium-server-pravega/src/test/java/io/debezium/server/pravega/PravegaTestResource.java +++ b/debezium-server-pravega/src/test/java/io/debezium/server/pravega/PravegaTestResource.java @@ -28,7 +28,7 @@ */ public class PravegaTestResource implements QuarkusTestResourceLifecycleManager { - private static final String PRAVEGA_VERSION = "0.9.0"; + private static final String PRAVEGA_VERSION = ConfigProvider.getConfig().getValue("pravega.docker.version", String.class); public static final int CONTROLLER_PORT = 9090; public static final int SEGMENT_STORE_PORT = 12345; public static final String PRAVEGA_IMAGE = "pravega/pravega:" + PRAVEGA_VERSION; @@ -38,7 +38,7 @@ public class PravegaTestResource implements QuarkusTestResourceLifecycleManager .withFixedExposedPort(CONTROLLER_PORT, CONTROLLER_PORT) .withFixedExposedPort(SEGMENT_STORE_PORT, SEGMENT_STORE_PORT) .withStartupTimeout(Duration.ofSeconds(90)) - .waitingFor(Wait.forLogMessage(".*Starting gRPC server listening on port: 9090.*", 1)) + .waitingFor(Wait.forLogMessage(".*Pravega Sandbox is running locally now.*", 1)) .withCommand("standalone"); @Override diff --git a/pom.xml b/pom.xml index af2efef5..6fd89f2f 100644 --- a/pom.xml +++ b/pom.xml @@ -26,6 +26,10 @@ + + v0.13.0-rc0 + https://oss.sonatype.org/content/repositories/iopravega-1206 + oss OSS Sonatype Nexus