use of org.apache.storm.solr.spout.SolrFieldsSpout in project storm by apache.
the class SolrFieldsTopology method getTopology.
protected StormTopology getTopology() throws IOException {
TopologyBuilder builder = new TopologyBuilder();
builder.setSpout("SolrFieldsSpout", new SolrFieldsSpout());
builder.setBolt("SolrUpdateBolt", new SolrUpdateBolt(getSolrConfig(), getSolrMapper(), getSolrCommitStgy())).shuffleGrouping("SolrFieldsSpout");
return builder.createTopology();
}
use of org.apache.storm.solr.spout.SolrFieldsSpout 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