unapply uniqueness constraints on template values

This commit is contained in:
Jonathan Shook 2022-02-28 10:57:17 -06:00
parent 2048399577
commit 45bd31b77e

View File

@ -18,7 +18,6 @@
package io.nosqlbench.engine.api.templating;
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.StringSubstitutor;
import org.apache.logging.log4j.LogManager;
@ -113,10 +112,10 @@ public class StrInterpolator implements Function<String, String> {
value = (value != null) ? value : warnPrefix + ":" + key;
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." +
" Template variables must resolve to a single 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." +
// " Template variables must resolve to a single value.");
// }
accesses.put(key,value);
logger.debug("Template parameter '" + key + "' applied as '" + value + "'");