public RawClient newClient(Configuration conf) {
if (conf == null) {
throw new IllegalArgumentException("conf cannot be null");
}
HTTPClientConfig config = (HTTPClientConfig) conf;
RiakConfig riakConfig = new RiakConfig();
riakConfig.setUrl(config.getUrl());
riakConfig.setHttpClient(config.getHttpClient());
riakConfig.setMapReducePath(config.getMapreducePath());
riakConfig.setMaxConnections(config.getMaxConnections());
riakConfig.setTimeout(config.getTimeout());
riakConfig.setRetryHandler(config.getRetryHandler());
return new HTTPClientAdapter(new RiakClient(riakConfig));
}