mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2024-12-24 16:00:09 -06:00
fix NBIO early access bug in atfiles
This commit is contained in:
parent
0aaab3d0b2
commit
bca0caba13
@ -24,6 +24,9 @@ import org.apache.logging.log4j.Logger;
|
||||
import org.snakeyaml.engine.v2.api.Load;
|
||||
import org.snakeyaml.engine.v2.api.LoadSettings;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
@ -98,14 +101,15 @@ public class NBAtFile {
|
||||
" You specified " + parts[1]);
|
||||
}
|
||||
|
||||
NBPathsAPI.GetExtensions wantsExtension = NBIO.local().pathname(filepathSpec);
|
||||
String extension = (!filepathSpec.toLowerCase().endsWith(".yaml")) ? "yaml" : "";
|
||||
if (!extension.isEmpty()) {
|
||||
// logger.debug("adding extension 'yaml' to at-file path '" + filepathSpec + "'");
|
||||
wantsExtension.extensionSet("yaml");
|
||||
filepathSpec=(filepathSpec.endsWith(".yaml") ? filepathSpec : filepathSpec+".yaml");
|
||||
Path atPath = Path.of(filepathSpec);
|
||||
String argsdata = "";
|
||||
try {
|
||||
argsdata = Files.readString(atPath);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
Content<?> argsContent = wantsExtension.one();
|
||||
String argsdata = argsContent.asString();
|
||||
|
||||
NBAtFileFormats fmt = (formatSpec!=null) ? NBAtFileFormats.valueOfSymbol(formatSpec) : NBAtFileFormats.Default;
|
||||
|
||||
Object scopeOfInclude = null;
|
||||
|
Loading…
Reference in New Issue
Block a user