Skip to content

Commit eb7ef88

Browse files
lithinwxdtdcmeehan
authored andcommitted
SSL enablement for Cassandra connector
1 parent 7b14c7a commit eb7ef88

File tree

5 files changed

+33
-17
lines changed

5 files changed

+33
-17
lines changed

pom.xml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2126,18 +2126,6 @@
21262126
</exclusions>
21272127
</dependency>
21282128

2129-
<dependency>
2130-
<groupId>com.facebook.presto.cassandra</groupId>
2131-
<artifactId>cassandra-driver</artifactId>
2132-
<version>3.6.0-1</version>
2133-
<exclusions>
2134-
<exclusion>
2135-
<groupId>io.netty</groupId>
2136-
<artifactId>*</artifactId>
2137-
</exclusion>
2138-
</exclusions>
2139-
</dependency>
2140-
21412129
<dependency>
21422130
<groupId>com.facebook.presto</groupId>
21432131
<artifactId>presto-delta</artifactId>
@@ -2277,6 +2265,12 @@
22772265
<artifactId>commons-compress</artifactId>
22782266
<version>${dep.commons.compress.version}</version>
22792267
</dependency>
2268+
2269+
<dependency>
2270+
<groupId>com.datastax.cassandra</groupId>
2271+
<artifactId>cassandra-driver-core</artifactId>
2272+
<version>3.11.5</version>
2273+
</dependency>
22802274
</dependencies>
22812275
</dependencyManagement>
22822276

presto-cassandra/pom.xml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
<dependencies>
1919
<dependency>
20-
<groupId>com.facebook.presto.cassandra</groupId>
21-
<artifactId>cassandra-driver</artifactId>
20+
<groupId>com.datastax.cassandra</groupId>
21+
<artifactId>cassandra-driver-core</artifactId>
2222
</dependency>
2323

2424
<dependency>
@@ -185,6 +185,17 @@
185185
</dependency>
186186
</dependencies>
187187

188+
<dependencyManagement>
189+
<!-- This is to fix the upper bound issues arising out of different components-->
190+
<dependencies>
191+
<dependency>
192+
<groupId>io.netty</groupId>
193+
<artifactId>netty-handler</artifactId>
194+
<version>4.1.107.Final</version>
195+
</dependency>
196+
</dependencies>
197+
</dependencyManagement>
198+
188199
<build>
189200
<plugins>
190201
<plugin>

presto-cassandra/src/test/java/com/datastax/driver/core/TestHost.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ public class TestHost
2020
{
2121
public TestHost(InetSocketAddress address)
2222
{
23-
super(address, new ConvictionPolicy.DefaultConvictionPolicy.Factory(), Cluster.builder().addContactPoints("localhost").build().manager);
23+
super(new TranslatedAddressEndPoint(address), new ConvictionPolicy.DefaultConvictionPolicy.Factory(), Cluster.builder().addContactPoints("localhost").build().manager);
2424
}
2525
}

presto-cassandra/src/test/java/com/facebook/presto/cassandra/TestCassandraIntegrationSmokeTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ public void testKeyspaceNameAmbiguity()
344344

345345
@Test
346346
public void testTableNameAmbiguity()
347+
throws Exception
347348
{
348349
session.execute("CREATE KEYSPACE keyspace_4 WITH REPLICATION = {'class':'SimpleStrategy', 'replication_factor': 1}");
349350
assertContainsEventually(() -> execute("SHOW SCHEMAS FROM cassandra"), resultBuilder(getSession(), createUnboundedVarcharType())
@@ -355,6 +356,9 @@ public void testTableNameAmbiguity()
355356
session.execute("CREATE TABLE keyspace_4.\"TaBlE_4\" (column_4 bigint PRIMARY KEY)");
356357
session.execute("CREATE TABLE keyspace_4.\"tAbLe_4\" (column_4 bigint PRIMARY KEY)");
357358

359+
// This is added for Cassandra to refresh its metadata so that we don't encounter a race condition in the forthcoming steps and achieve eventual consistency.
360+
Thread.sleep(1000);
361+
358362
// Although in Presto all the schema and table names are always displayed as lowercase
359363
assertContainsEventually(() -> execute("SHOW TABLES FROM cassandra.keyspace_4"), resultBuilder(getSession(), createUnboundedVarcharType())
360364
.row("table_4")

presto-product-tests/pom.xml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,15 @@
133133
<scope>runtime</scope>
134134
</dependency>
135135
<dependency>
136-
<groupId>com.facebook.presto.cassandra</groupId>
137-
<artifactId>cassandra-driver</artifactId>
136+
<groupId>com.datastax.cassandra</groupId>
137+
<artifactId>cassandra-driver-core</artifactId>
138+
<version>3.11.5</version>
139+
<exclusions>
140+
<exclusion>
141+
<groupId>io.netty</groupId>
142+
<artifactId>*</artifactId>
143+
</exclusion>
144+
</exclusions>
138145
</dependency>
139146
<dependency>
140147
<groupId>org.scala-lang</groupId>

0 commit comments

Comments
 (0)