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