mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
unapply uniqueness constraints on template values
This commit is contained in:
parent
2048399577
commit
45bd31b77e
@ -18,7 +18,6 @@
|
|||||||
package io.nosqlbench.engine.api.templating;
|
package io.nosqlbench.engine.api.templating;
|
||||||
|
|
||||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||||
import io.nosqlbench.nb.api.errors.OpConfigError;
|
|
||||||
import org.apache.commons.text.StrLookup;
|
import org.apache.commons.text.StrLookup;
|
||||||
import org.apache.commons.text.StringSubstitutor;
|
import org.apache.commons.text.StringSubstitutor;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
@ -113,10 +112,10 @@ public class StrInterpolator implements Function<String, String> {
|
|||||||
|
|
||||||
value = (value != null) ? value : warnPrefix + ":" + key;
|
value = (value != null) ? value : warnPrefix + ":" + key;
|
||||||
|
|
||||||
if (accesses.containsKey(key) && !accesses.get(key).equals(value)) {
|
// if (accesses.containsKey(key) && !accesses.get(key).equals(value)) {
|
||||||
throw new OpConfigError("A templated variable '" + key + "' was found with multiple default values: '" + accesses.get(key) + ", and " + value +". This is not allowed." +
|
// throw new OpConfigError("A templated variable '" + key + "' was found with multiple default values: '" + accesses.get(key) + ", and " + value +". This is not allowed." +
|
||||||
" Template variables must resolve to a single value.");
|
// " Template variables must resolve to a single value.");
|
||||||
}
|
// }
|
||||||
|
|
||||||
accesses.put(key,value);
|
accesses.put(key,value);
|
||||||
logger.debug("Template parameter '" + key + "' applied as '" + value + "'");
|
logger.debug("Template parameter '" + key + "' applied as '" + value + "'");
|
||||||
|
Loading…
Reference in New Issue
Block a user