Merge pull request #55 from nosqlbench/support-hosts

support hosts and host interchangeably
This commit is contained in:
Jonathan Shook 2020-03-09 12:17:51 -05:00 committed by GitHub
commit 1b12d98638
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,6 +79,11 @@ public class CQLSessionCache implements Shutdownable {
String[] contactPoints = activityDef.getParams().getOptionalString("host")
.map(h -> h.split(",")).orElse(null);
if (contactPoints == null) {
contactPoints = activityDef.getParams().getOptionalString("hosts")
.map(h -> h.split(",")).orElse(null);
}
if (contactPoints != null) {
builder.addContactPoints(contactPoints);
}else if (scb.isEmpty()){