add support to CQL 1.9 driver for lbp=RRP

This commit is contained in:
Jonathan Shook 2021-04-29 17:46:12 -05:00
parent 5f66cedd46
commit d49222e123
2 changed files with 14 additions and 1 deletions

View File

@ -4,8 +4,8 @@ import com.datastax.driver.core.*;
import com.datastax.driver.core.policies.*;
import io.netty.util.HashedWheelTimer;
import io.nosqlbench.nb.api.errors.BasicError;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.net.InetSocketAddress;
import java.util.*;
@ -216,6 +216,13 @@ public class CQLOptions {
String[] args= argslist.isBlank() ? new String[0] : argslist.split(",");
switch (policyname) {
case "RRP":
case "RoundRobinPolicy":
if (policy!=null) {
throw new BasicError("You can't wrap another policy with RRP");
}
policy = new RoundRobinPolicy();
break;
case "WLP":
case "whitelist":
List<InetSocketAddress> sockAddrs = Arrays.stream(args)

View File

@ -28,6 +28,12 @@ line:
Each supported policy is described in detail below, with the options supported.
### RRP: Round Robin Policy
Format: `RRP()`
**note** You can't wrap another policy with RRP.
### WLP: White List Policy
Format: `WLP(addr,...)`