use of org.apache.storm.cassandra.client.CassandraConf in project storm by apache.
the class BaseCassandraBolt method prepare.
/**
* {@inheritDoc}
*/
@Override
public void prepare(Map stormConfig, TopologyContext topologyContext, OutputCollector outputCollector) {
this.outputCollector = outputCollector;
this.stormConfig = stormConfig;
Map<String, Object> cassandraClientConfig = cassandraConfig != null ? cassandraConfig : stormConfig;
this.cassandraConf = new CassandraConf(cassandraClientConfig);
this.client = clientProvider.getClient(cassandraClientConfig);
try {
session = client.connect();
} catch (NoHostAvailableException e) {
outputCollector.reportError(e);
}
}
Aggregations