Skip to content

Commit c2c19f0

Browse files
Vincent Royereolivellinicoloboschi
authored
Provide support for C* collection types (#48)
* Provide support for C* collection types * Update docs * Add recursive collection types support * Re-enable all tests * Fix license header * Fix deps * Use Pulsar client with shaded Netty for testcontainer * Adapt tests * Upgrade Pulsar to Luna Streaming 2.8.3 and remove LS272 from CI * Fix some deps - use 2.8.3 * Fix build * * Disable CI for Luna * Show tests log for debug * Fix agent dependencies * testcontainers: use client-all to avoid netty conflicts * Revert "testcontainers: use client-all to avoid netty conflicts" This reverts commit fb7d6c7. * revert pulsar client to Apache one * 2.8.1 ? * agents have to use pulsar-client * re-add luna CI Co-authored-by: Enrico Olivelli <[email protected]> Co-authored-by: Nicolò Boschi <[email protected]>
1 parent edf2b93 commit c2c19f0

File tree

19 files changed

+762
-287
lines changed

19 files changed

+762
-287
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ Cassandra supported CQL3 data types (with the associated AVRO type or logical-ty
7474
* timestamp (timestamp-millis), time (time-micros), date (date)
7575
* uuid, timeuuid (uuid)
7676
* User Defined Types (record)
77+
* Collection types:
78+
** list (array)
79+
** set (array)
80+
** map (map)
7781

7882
## Build from the sources
7983

agent-c3-luna/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ dependencies {
5757
}
5858

5959
test {
60+
exclude '**/*'
61+
6062
// Add dependency on jar task, since it will be main target for testing
6163
dependsOn shadowJar
6264

agent-c3-pulsar/build.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ dependencies {
5555

5656
testImplementation "org.testcontainers:testcontainers:${testContainersVersion}"
5757
testImplementation project(':testcontainers')
58-
testImplementation project(':testcontainers-pulsar')
58+
testImplementation (project(':testcontainers-pulsar')) {
59+
exclude group: 'com.datastax.oss', module: 'pulsar-client-original'
60+
}
5961

6062
testRuntimeOnly "org.slf4j:slf4j-api:${slf4jVersion}"
6163
testRuntimeOnly "org.slf4j:slf4j-simple:${slf4jVersion}"
@@ -70,7 +72,7 @@ test {
7072

7173
useJUnitPlatform()
7274

73-
environment 'PULSAR_IMAGE', 'apachepulsar/pulsar:' + pulsarVersion
75+
environment 'PULSAR_IMAGE', 'apachepulsar/pulsar:' + pulsarTag
7476
environment 'CASSANDRA_IMAGE', 'cassandra:' + cassandra3Version
7577

7678
systemProperty "buildDir", buildDir
@@ -93,7 +95,7 @@ dockerCompose {
9395
environment.put 'STREAM_PLATFORM', 'pulsar'
9496
environment.put 'PROJECT_VERSION', project.version
9597
environment.put 'CASSANDRA_IMAGE', "${dockerRepo}cassandra:${cassandra3Version}-cdc-pulsar"
96-
environment.put 'PULSAR_IMAGE', "${dockerRepo}pulsar:${pulsarVersion}-csc"
98+
environment.put 'PULSAR_IMAGE', "${dockerRepo}pulsar:${pulsarTag}-csc"
9799
waitForTcpPorts = false
98100
startedServices = ['cassandra','pulsar']
99101

agent-c4-luna/build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,17 @@ dependencies {
5252

5353
testImplementation "org.testcontainers:testcontainers:${testContainersVersion}"
5454
testImplementation project(':testcontainers')
55-
testImplementation project(':testcontainers-luna')
55+
testImplementation (project(':testcontainers-luna')) {
56+
exclude group: 'com.datastax.oss', module: 'pulsar-client-original'
57+
}
5658

5759
testRuntimeOnly "org.slf4j:slf4j-api:${slf4jVersion}"
5860
testRuntimeOnly "org.slf4j:slf4j-simple:${slf4jVersion}"
5961
}
6062

6163
test {
64+
exclude '**/*'
65+
6266
// Add dependency on jar task, since it will be main target for testing
6367
dependsOn shadowJar
6468

agent-c4-pulsar/build.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ dependencies {
5858

5959
testImplementation "org.testcontainers:testcontainers:${testContainersVersion}"
6060
testImplementation project(':testcontainers')
61-
testImplementation project(':testcontainers-pulsar')
61+
testImplementation (project(':testcontainers-pulsar')) {
62+
exclude group: 'com.datastax.oss', module: 'pulsar-client-original'
63+
}
6264

6365
testRuntimeOnly "org.slf4j:slf4j-api:${slf4jVersion}"
6466
testRuntimeOnly "org.slf4j:slf4j-simple:${slf4jVersion}"
@@ -73,7 +75,7 @@ test {
7375

7476
useJUnitPlatform()
7577

76-
environment 'PULSAR_IMAGE', 'apachepulsar/pulsar:' + pulsarVersion
78+
environment 'PULSAR_IMAGE', 'apachepulsar/pulsar:' + pulsarTag
7779
environment 'CASSANDRA_IMAGE', 'cassandra:' + cassandra4Version
7880

7981
systemProperty "buildDir", buildDir
@@ -99,7 +101,7 @@ dockerCompose {
99101
environment.put 'STREAM_PLATFORM', 'pulsar'
100102
environment.put 'PROJECT_VERSION', project.version
101103
environment.put 'CASSANDRA_IMAGE', "${dockerRepo}cassandra:${cassandra4Version}-cdc-pulsar"
102-
environment.put 'PULSAR_IMAGE', "${dockerRepo}pulsar:${pulsarVersion}-csc"
104+
environment.put 'PULSAR_IMAGE', "${dockerRepo}pulsar:${pulsarTag}-csc"
103105
waitForTcpPorts = false
104106
startedServices = ['cassandra']
105107

agent-dse4-luna/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ dependencies {
5353

5454
testImplementation "org.testcontainers:testcontainers:${testContainersVersion}"
5555
testImplementation project(':testcontainers')
56-
testImplementation project(':testcontainers-luna')
56+
testImplementation (project(':testcontainers-luna')) {
57+
exclude group: 'com.datastax.oss', module: 'pulsar-client-original'
58+
}
5759

5860
testRuntimeOnly "org.slf4j:slf4j-api:${slf4jVersion}"
5961
testRuntimeOnly "org.slf4j:slf4j-simple:${slf4jVersion}"

agent-dse4-pulsar/build.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ dependencies {
5959

6060
testImplementation "org.testcontainers:testcontainers:${testContainersVersion}"
6161
testImplementation project(':testcontainers')
62-
testImplementation project(':testcontainers-pulsar')
62+
testImplementation (project(':testcontainers-pulsar')) {
63+
exclude group: 'com.datastax.oss', module: 'pulsar-client-original'
64+
}
6365

6466
testRuntimeOnly "org.slf4j:slf4j-api:${slf4jVersion}"
6567
testRuntimeOnly "org.slf4j:slf4j-simple:${slf4jVersion}"
@@ -74,7 +76,7 @@ test {
7476

7577
useJUnitPlatform()
7678

77-
environment 'PULSAR_IMAGE', 'apachepulsar/pulsar:' + pulsarVersion
79+
environment 'PULSAR_IMAGE', 'apachepulsar/pulsar:' + pulsarTag
7880
environment 'CASSANDRA_IMAGE', 'datastax/dse-server:' + dse4Version
7981

8082
systemProperty "buildDir", buildDir
@@ -116,7 +118,7 @@ dockerCompose {
116118
environment.put 'STREAM_PLATFORM', 'pulsar'
117119
environment.put 'PROJECT_VERSION', project.version
118120
environment.put 'CASSANDRA_IMAGE', "${dockerRepo}dse4-server:${dse4Version}-cdc-pulsar"
119-
environment.put 'PULSAR_IMAGE', "${dockerRepo}pulsar:${pulsarVersion}-csc"
121+
environment.put 'PULSAR_IMAGE', "${dockerRepo}pulsar:${pulsarTag}-csc"
120122
waitForTcpPorts = false
121123
startedServices = ['cassandra','pulsar']
122124

agent-luna/build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,8 @@ dependencies {
1414
implementation("com.datastax.oss:pulsar-client:${lunaVersion}")
1515
compileOnly("org.slf4j:slf4j-api:${slf4jVersion}")
1616
}
17+
18+
19+
test {
20+
exclude '**/*'
21+
}

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ subprojects {
123123
}
124124
testLogging {
125125
showStandardStreams = true
126-
events = ["failed"]
126+
// events = ["failed"]
127127
}
128128
finalizedBy jacocoTestReport // report is always generated after tests run
129129
}

connector-luna/build.gradle

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,19 @@ sourceSets {
1717

1818
dependencies {
1919
implementation project(':commons')
20-
implementation project(':commons-luna')
20+
implementation (project(':commons-luna')) {
21+
exclude group: 'com.datastax.oss', module: 'pulsar-client'
22+
}
2123
implementation project(':connector')
2224

2325
implementation("com.github.ben-manes.caffeine:caffeine:${caffeineVersion}")
2426
implementation("io.vavr:vavr:${vavrVersion}")
25-
implementation "com.datastax.oss:java-driver-core:${ossDriverVersion}"
27+
implementation "com.datastax.oss:java-driver-core-shaded:${ossDriverVersion}"
2628
implementation "com.datastax.oss:java-driver-query-builder:${ossDriverVersion}"
2729

2830
implementation("org.apache.avro:avro:${avroVersion}")
2931

30-
compileOnly("com.datastax.oss:pulsar-client:${lunaVersion}")
32+
testImplementation("com.datastax.oss:pulsar-client:${lunaVersion}")
3133
compileOnly("com.datastax.oss:pulsar-io-common:${lunaVersion}")
3234
compileOnly("com.datastax.oss:pulsar-io-core:${lunaVersion}")
3335

@@ -50,6 +52,7 @@ dependencies {
5052

5153
testImplementation "org.testcontainers:testcontainers:${testContainersVersion}"
5254
testImplementation project(':testcontainers')
55+
testImplementation project(':testcontainers-luna')
5356

5457
nar "com.datastax.oss:pulsar-io:${lunaVersion}"
5558
}
@@ -71,6 +74,8 @@ nar {
7174
assemble.dependsOn(nar)
7275

7376
test {
77+
exclude '**/*'
78+
7479
// Add dependency on jar task, since it will be main target for testing
7580
dependsOn project(':agent-c4-luna').shadowJar
7681
dependsOn nar

0 commit comments

Comments
 (0)