use of in.zapr.druid.druidry.client.exception.ConnectionException in project druidry by zapr-oss.
the class DruidJerseyClient method connect.
@Override
public void connect() throws ConnectionException {
try {
if (jerseyConfig == null) {
HttpClientConnectionManager connectionManager = createConnectionManager();
this.jerseyConfig = new ClientConfig();
this.jerseyConfig.property(ApacheClientProperties.CONNECTION_MANAGER, connectionManager);
this.jerseyConfig.connectorProvider(new ApacheConnectorProvider());
}
this.client = ClientBuilder.newClient(this.jerseyConfig);
this.queryWebTarget = this.client.target(this.druidUrl);
} catch (Exception e) {
throw new ConnectionException(e);
}
}
Aggregations