Skip to content

Commit 9f77495

Browse files
committed
Remove serverless related code and dependencies
This includes `ScyllaCloudConnectionConfig`, `CloudConfigYamlParsingTest` and methods in `Cluster` and `CCMTestsSupport`. BouncyCastle dependencies were removed since they are no longer needed. Fixes #670
1 parent a106060 commit 9f77495

File tree

6 files changed

+28
-401
lines changed

6 files changed

+28
-401
lines changed

clirr-ignores.xml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,34 @@
3737
<justification>Replacing Datastax Cloud with Scylla Cloud. Removing confusing code that won't be maintained.</justification>
3838
</difference>
3939

40+
<difference>
41+
<differenceType>7002</differenceType> <!-- method removed -->
42+
<className>com/datastax/driver/core/Cluster$Builder</className>
43+
<method>com.datastax.driver.core.Cluster$Builder withScyllaCloudConnectionConfig(java.io.File)</method>
44+
<justification>Serverless was dropped. This code has no use anymore.</justification>
45+
</difference>
46+
47+
<difference>
48+
<differenceType>7002</differenceType> <!-- method removed -->
49+
<className>com/datastax/driver/core/Cluster$Builder</className>
50+
<method>com.datastax.driver.core.Cluster$Builder withScyllaCloudConnectionConfig(java.net.URL)</method>
51+
<justification>Serverless was dropped. This code has no use anymore.</justification>
52+
</difference>
53+
54+
<difference>
55+
<differenceType>7002</differenceType> <!-- method removed -->
56+
<className>com/datastax/driver/core/Cluster$Builder</className>
57+
<method>com.datastax.driver.core.Cluster$Builder withScyllaCloudConnectionConfig(java.io.InputStream)</method>
58+
<justification>Serverless was dropped. This code has no use anymore.</justification>
59+
</difference>
60+
61+
<difference>
62+
<differenceType>7002</differenceType> <!-- method removed -->
63+
<className>com/datastax/driver/core/Cluster$Builder</className>
64+
<method>com.datastax.driver.core.Cluster$Builder withScyllaCloudConnectionConfig(com.datastax.driver.core.ScyllaCloudConnectionConfig)</method>
65+
<justification>Serverless was dropped. This code has no use anymore.</justification>
66+
</difference>
67+
4068
<difference>
4169
<differenceType>7004</differenceType> <!-- the number of arguments has changed -->
4270
<className>com/datastax/driver/core/Metadata</className>

driver-core/pom.xml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -176,24 +176,6 @@
176176
<groupId>com.fasterxml.jackson.dataformat</groupId>
177177
<artifactId>jackson-dataformat-yaml</artifactId>
178178
</dependency>
179-
<!-- https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk18on -->
180-
<dependency>
181-
<groupId>org.bouncycastle</groupId>
182-
<artifactId>bcprov-jdk18on</artifactId>
183-
<version>1.82</version>
184-
</dependency>
185-
<!-- https://mvnrepository.com/artifact/org.bouncycastle/bcpkix-jdk18on -->
186-
<dependency>
187-
<groupId>org.bouncycastle</groupId>
188-
<artifactId>bcpkix-jdk18on</artifactId>
189-
<version>1.82</version>
190-
</dependency>
191-
<!-- https://mvnrepository.com/artifact/org.bouncycastle/bcutil-jdk18on -->
192-
<dependency>
193-
<groupId>org.bouncycastle</groupId>
194-
<artifactId>bcutil-jdk18on</artifactId>
195-
<version>1.82</version>
196-
</dependency>
197179

198180
<!-- added for easier DNS hostname resolution mocking -->
199181
<dependency>

driver-core/src/main/java/com/datastax/driver/core/Cluster.java

Lines changed: 0 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,9 @@
6060
import com.google.common.util.concurrent.SettableFuture;
6161
import com.google.common.util.concurrent.Uninterruptibles;
6262
import java.io.Closeable;
63-
import java.io.File;
64-
import java.io.IOException;
65-
import java.io.InputStream;
6663
import java.net.InetAddress;
6764
import java.net.InetSocketAddress;
68-
import java.net.URL;
6965
import java.net.UnknownHostException;
70-
import java.security.GeneralSecurityException;
7166
import java.util.ArrayList;
7267
import java.util.Collection;
7368
import java.util.Collections;
@@ -1384,92 +1379,6 @@ public Builder withNoCompact() {
13841379
return this;
13851380
}
13861381

1387-
/**
1388-
* Configure for Scylla Cloud Serverless cluster using configuration bundle.
1389-
*
1390-
* @param configurationFile configuration bundle file.
1391-
* @return this builder.
1392-
* @throws IOException
1393-
* @see Builder#withScyllaCloudConnectionConfig(ScyllaCloudConnectionConfig)
1394-
*/
1395-
public Builder withScyllaCloudConnectionConfig(File configurationFile) throws IOException {
1396-
return withScyllaCloudConnectionConfig(configurationFile.toURI().toURL());
1397-
}
1398-
1399-
/**
1400-
* Configure for Scylla Cloud Serverless cluster using URL to configuration bundle.
1401-
*
1402-
* @param configurationUrl URL from which configuration bundle can be read.
1403-
* @return this builder.
1404-
* @throws IOException
1405-
* @see Builder#withScyllaCloudConnectionConfig(ScyllaCloudConnectionConfig)
1406-
*/
1407-
public Builder withScyllaCloudConnectionConfig(URL configurationUrl) throws IOException {
1408-
return withScyllaCloudConnectionConfig(configurationUrl.openStream());
1409-
}
1410-
1411-
/**
1412-
* Configure for Scylla Cloud Serverless cluster using InputStream of configuration bundle.
1413-
*
1414-
* @param inputStream input stream containing configuration bundle format data.
1415-
* @return this builder.
1416-
* @throws IOException
1417-
* @see Builder#withScyllaCloudConnectionConfig(ScyllaCloudConnectionConfig)
1418-
*/
1419-
public Builder withScyllaCloudConnectionConfig(InputStream inputStream) throws IOException {
1420-
return withScyllaCloudConnectionConfig(
1421-
ScyllaCloudConnectionConfig.fromInputStream(inputStream));
1422-
}
1423-
1424-
/**
1425-
* Sets a collection of options for connecting to Scylla Cloud Serverless cluster.
1426-
*
1427-
* <p>Sets several options according to provided {@link ScyllaCloudConnectionConfig}. This
1428-
* includes calling {@link Builder#withEndPointFactory(EndPointFactory)}, {@link
1429-
* Builder#withSSL(SSLOptions)}, {@link Builder#withAuthProvider(AuthProvider)}, {@link
1430-
* Builder#withoutAdvancedShardAwareness()} with parameters derived from the config.
1431-
*
1432-
* <p>Cannot be combined with {@link Builder#addContactPoint}. All contact points should already
1433-
* be provided in {@link ScyllaCloudConnectionConfig}.
1434-
*
1435-
* @param config instantiated ScyllaCloudConnectionConfig.
1436-
* @return this builder.
1437-
*/
1438-
protected Builder withScyllaCloudConnectionConfig(ScyllaCloudConnectionConfig config) {
1439-
try {
1440-
ScyllaCloudDatacenter currentDatacenter = config.getCurrentDatacenter();
1441-
InetSocketAddress proxyAddress = currentDatacenter.getServer();
1442-
1443-
Builder builder =
1444-
withEndPointFactory(
1445-
new ScyllaCloudSniEndPointFactory(
1446-
proxyAddress, currentDatacenter.getNodeDomain()))
1447-
.withSSL(
1448-
(config.getCurrentDatacenter().isInsecureSkipTlsVerify()
1449-
? config.createBundle().getInsecureSSLOptions()
1450-
: config.createBundle().getSSLOptions()))
1451-
.withAuthProvider(
1452-
new PlainTextAuthProvider(
1453-
config.getCurrentAuthInfo().getUsername(),
1454-
config.getCurrentAuthInfo().getPassword()))
1455-
.withoutAdvancedShardAwareness();
1456-
1457-
if (builder.rawHostContactPoints.size() > 0
1458-
|| builder.rawHostAndPortContactPoints.size() > 0
1459-
|| builder.contactPoints.size() > 0) {
1460-
throw new IllegalStateException(
1461-
"Can't use withCloudSecureConnectBundle if you've already called addContactPoint(s)");
1462-
}
1463-
builder.addContactPoint(new SniEndPoint(proxyAddress, currentDatacenter.getNodeDomain()));
1464-
1465-
return builder;
1466-
} catch (IOException e) {
1467-
throw new IllegalStateException("Cannot construct cloud config", e);
1468-
} catch (GeneralSecurityException e) {
1469-
throw new IllegalStateException("Cannot construct cloud config", e);
1470-
}
1471-
}
1472-
14731382
/**
14741383
* Disables advanced shard awareness. By default, this driver chooses local port while making a
14751384
* connection to node, to signal which shard it wants to connect to. This allows driver to

0 commit comments

Comments
 (0)