use of org.apache.storm.trident.state.StateFactory in project storm by apache.
the class SolrJsonTridentTopology method getTopology.
protected StormTopology getTopology() throws IOException {
final TridentTopology topology = new TridentTopology();
final SolrJsonSpout spout = new SolrJsonSpout();
final Stream stream = topology.newStream("SolrJsonSpout", spout);
final StateFactory solrStateFactory = new SolrStateFactory(getSolrConfig(), getSolrMapper());
stream.partitionPersist(solrStateFactory, spout.getOutputFields(), new SolrUpdater(), new Fields());
return topology.build();
}
use of org.apache.storm.trident.state.StateFactory in project storm by apache.
the class SolrFieldsTridentTopology method getTopology.
protected StormTopology getTopology() throws IOException {
final TridentTopology tridentTopology = new TridentTopology();
final SolrFieldsSpout spout = new SolrFieldsSpout();
final Stream stream = tridentTopology.newStream("SolrFieldsSpout", spout);
final StateFactory solrStateFactory = new SolrStateFactory(getSolrConfig(), getSolrMapper());
stream.partitionPersist(solrStateFactory, spout.getOutputFields(), new SolrUpdater(), new Fields());
return tridentTopology.build();
}
Aggregations