Merge branch 'main' of github.com:nosqlbench/nosqlbench

This commit is contained in:
Jonathan Shook 2024-01-11 16:48:54 -06:00
commit 1ac5a6b568

View File

@ -37,6 +37,7 @@ import org.apache.logging.log4j.Logger;
import javax.net.ssl.SSLContext;
import java.io.IOException;
import java.io.InputStream;
import java.net.InetSocketAddress;
import java.nio.file.Files;
import java.nio.file.Path;
@ -97,8 +98,18 @@ public class Cqld4Space implements AutoCloseable {
// int port = cfg.getOptional(int.class, "port").orElse(9042);
Optional<String> scb = cfg.getOptional(String.class, "secureconnectbundle", "scb");
scb.flatMap(s -> NBIO.all().pathname(s).first().map(Content::getInputStream))
.map(builder::withCloudSecureConnectBundle);
if (scb.isPresent()) {
Optional<InputStream> stream =
scb.flatMap(s -> NBIO.all().pathname(s).first().map(Content::getInputStream));
if (stream.isPresent()) {
stream.map(builder::withCloudSecureConnectBundle);
} else {
String error = String.format("Unable to load Secure Connect Bundle from path %s", scb.get());
logger.error(error);
throw new RuntimeException(error);
}
}
Optional<List<InetSocketAddress>> contactPointsOption = cfg
.getOptional("host", "hosts")