diff --git a/adapter-venice/src/main/java/io/nosqlbench/adapter/venice/dispensers/ReadSingleKeyOpDispenser.java b/adapter-venice/src/main/java/io/nosqlbench/adapter/venice/dispensers/ReadSingleKeyOpDispenser.java index 77daf0429..7c4727711 100644 --- a/adapter-venice/src/main/java/io/nosqlbench/adapter/venice/dispensers/ReadSingleKeyOpDispenser.java +++ b/adapter-venice/src/main/java/io/nosqlbench/adapter/venice/dispensers/ReadSingleKeyOpDispenser.java @@ -33,7 +33,7 @@ import java.util.Map; import java.util.function.LongFunction; public class ReadSingleKeyOpDispenser extends VeniceBaseOpDispenser { - private final static Logger logger = LogManager.getLogger("MessageProducerOpDispenser"); + private final static Logger logger = LogManager.getLogger("ReadSingleKeyOpDispenser"); private final LongFunction keyStrFunc; private static final String KEY_OP_PARAM = "key"; diff --git a/adapter-venice/src/main/java/io/nosqlbench/adapter/venice/dispensers/VeniceBaseOpDispenser.java b/adapter-venice/src/main/java/io/nosqlbench/adapter/venice/dispensers/VeniceBaseOpDispenser.java index fa04e9861..05c600c48 100644 --- a/adapter-venice/src/main/java/io/nosqlbench/adapter/venice/dispensers/VeniceBaseOpDispenser.java +++ b/adapter-venice/src/main/java/io/nosqlbench/adapter/venice/dispensers/VeniceBaseOpDispenser.java @@ -56,63 +56,6 @@ public abstract class VeniceBaseOpDispenser extends BaseOpDispenser lookupStaticBoolConfigValueFunc(String paramName, boolean defaultValue) { - LongFunction booleanLongFunction; - booleanLongFunction = l -> parsedOp.getOptionalStaticConfig(paramName, String.class) - .filter(Predicate.not(String::isEmpty)) - .map(value -> BooleanUtils.toBoolean(value)) - .orElse(defaultValue); - logger.info("{}: {}", paramName, booleanLongFunction.apply(0)); - return booleanLongFunction; - } - - protected LongFunction> lookupStaticStrSetOpValueFunc(String paramName) { - LongFunction> setStringLongFunction; - setStringLongFunction = l -> parsedOp.getOptionalStaticValue(paramName, String.class) - .filter(Predicate.not(String::isEmpty)) - .map(value -> { - Set set = new HashSet<>(); - - if (StringUtils.contains(value,',')) { - set = Arrays.stream(value.split(",")) - .map(String::trim) - .filter(Predicate.not(String::isEmpty)) - .collect(Collectors.toCollection(LinkedHashSet::new)); - } - - return set; - }).orElse(Collections.emptySet()); - logger.info("{}: {}", paramName, setStringLongFunction.apply(0)); - return setStringLongFunction; - } - - // If the corresponding Op parameter is not provided, use the specified default value - protected LongFunction lookupStaticIntOpValueFunc(String paramName, int defaultValue) { - LongFunction integerLongFunction; - integerLongFunction = l -> parsedOp.getOptionalStaticValue(paramName, String.class) - .filter(Predicate.not(String::isEmpty)) - .map(value -> NumberUtils.toInt(value)) - .map(value -> { - if (0 > value) return 0; - return value; - }).orElse(defaultValue); - logger.info("{}: {}", paramName, integerLongFunction.apply(0)); - return integerLongFunction; - } - - // If the corresponding Op parameter is not provided, use the specified default value - protected LongFunction lookupOptionalStrOpValueFunc(String paramName, String defaultValue) { - LongFunction stringLongFunction; - stringLongFunction = parsedOp.getAsOptionalFunction(paramName, String.class) - .orElse(l -> defaultValue); - logger.info("{}: {}", paramName, stringLongFunction.apply(0)); - - return stringLongFunction; - } - protected LongFunction lookupOptionalStrOpValueFunc(String paramName) { - return lookupOptionalStrOpValueFunc(paramName, ""); - } - // Mandatory Op parameter. Throw an error if not specified or having empty value protected LongFunction lookupMandtoryStrOpValueFunc(String paramName) { LongFunction stringLongFunction;