/**
* @param riakLocatons
* @return a cluster client of HTTP clients
*/
private static IRiakClient httpClusterClient(RiakLocation[] riakLocatons) throws RiakException {
HTTPClusterConfig conf = new HTTPClusterConfig(500); // TODO make this config
for (RiakLocation loc : riakLocatons) {
if(!RiakTransport.HTTP.equals(loc.getTransport())) {
throw new IllegalArgumentException("Cluster clients must be homogenous");
}
RiakHTTPLocation httpLoc = (RiakHTTPLocation)loc;
conf.addClient(new HTTPClientConfig.Builder()
.withHost(httpLoc.getHost())
.withPort(httpLoc.getPort())
.withRiakPath(httpLoc.getRiakPath())
.build());
}