mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
allow workload scanner to skip over invalid files
This commit is contained in:
@@ -320,9 +320,15 @@ public class NBCLIScenarioParser {
|
|||||||
.name(referenced).extension(RawStmtsLoader.YAML_EXTENSIONS)
|
.name(referenced).extension(RawStmtsLoader.YAML_EXTENSIONS)
|
||||||
.one();
|
.one();
|
||||||
|
|
||||||
StmtsDocList stmts = StatementsLoader.loadContent(logger, content, Map.of());
|
StmtsDocList stmts = null;
|
||||||
if (stmts.getStmtDocs().size() == 0) {
|
try {
|
||||||
logger.warn("Encountered yaml with no docs in '" + referenced + "'");
|
stmts = StatementsLoader.loadContent(logger, content, Map.of());
|
||||||
|
if (stmts.getStmtDocs().size() == 0) {
|
||||||
|
logger.warn("Encountered yaml with no docs in '" + referenced + "'");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.warn("Error while loading scenario at '" + referenced + "': " + e);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -335,8 +341,6 @@ public class NBCLIScenarioParser {
|
|||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Scenarios scenarios = stmts.getDocScenarios();
|
Scenarios scenarios = stmts.getDocScenarios();
|
||||||
|
|
||||||
List<String> scenarioNames = scenarios.getScenarioNames();
|
List<String> scenarioNames = scenarios.getScenarioNames();
|
||||||
|
|||||||
Reference in New Issue
Block a user