mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
bugfix for extension checking
This commit is contained in:
@@ -72,7 +72,7 @@ public class QdrantSpace implements AutoCloseable {
|
|||||||
boolean useTls = cfg.getOptional("use_tls").map(Boolean::parseBoolean).orElse(true);
|
boolean useTls = cfg.getOptional("use_tls").map(Boolean::parseBoolean).orElse(true);
|
||||||
|
|
||||||
var builder = QdrantGrpcClient.newBuilder(uri, grpcPort, useTls);
|
var builder = QdrantGrpcClient.newBuilder(uri, grpcPort, useTls);
|
||||||
var Optional<requiredToken> = cfg.getOptional("token_file")
|
String requiredToken = cfg.getOptional("token_file")
|
||||||
.map(Paths::get)
|
.map(Paths::get)
|
||||||
.map(
|
.map(
|
||||||
tokenFilePath -> {
|
tokenFilePath -> {
|
||||||
|
|||||||
@@ -119,12 +119,11 @@ public class NBAtFile {
|
|||||||
String formatSpec = matcher.group("formatter");
|
String formatSpec = matcher.group("formatter");
|
||||||
String[] datapath = (dataPathSpec!=null && !dataPathSpec.isBlank()) ? dataPathSpec.split("(/|\\.)") : new String[] {};
|
String[] datapath = (dataPathSpec!=null && !dataPathSpec.isBlank()) ? dataPathSpec.split("(/|\\.)") : new String[] {};
|
||||||
|
|
||||||
String[] parts = filepathSpec.split("\\.",2);
|
String filename = Path.of(filepathSpec).getFileName().toString();
|
||||||
if (parts.length==2 && !parts[1].toLowerCase().matches("yaml")) {
|
if (filename.contains(".") && !(filename.toLowerCase().endsWith("yaml"))) {
|
||||||
throw new RuntimeException("Only the yaml format and extension is supported for at-files." +
|
throw new RuntimeException("Only the yaml format and extension is supported for at-files." +
|
||||||
" You specified " + parts[1]);
|
" You specified " + filepathSpec);
|
||||||
}
|
}
|
||||||
|
|
||||||
filepathSpec=(filepathSpec.endsWith(".yaml") ? filepathSpec : filepathSpec+".yaml");
|
filepathSpec=(filepathSpec.endsWith(".yaml") ? filepathSpec : filepathSpec+".yaml");
|
||||||
Path atPath = Path.of(filepathSpec);
|
Path atPath = Path.of(filepathSpec);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user