use of com.alibaba.jstorm.elasticsearch.bolt.EsQueryBolt in project jstorm by alibaba.
the class TestSuite method testQuery.
@Test
public void testQuery() {
TopologyBuilder builder = new TopologyBuilder();
builder.setSpout("query-spout", new TestQuerySpout());
EsOutputDeclarer esOutputDeclarer = new EsOutputDeclarer().addField("date");
EsQueryBolt esIndexBolt = new EsQueryBolt(esConfig, new TestQueryMapper(), esOutputDeclarer);
builder.setBolt("query-bolt", esIndexBolt).shuffleGrouping("query-spout");
builder.setBolt("end-bolt", new TestQueryBolt()).shuffleGrouping("query-bolt");
cluster.submitTopology("Query-Test", conf, builder.createTopology());
}
Aggregations