use of com.alibaba.jstorm.elasticsearch.index.TestIndexSpout in project jstorm by alibaba.
the class TestSuite method testIndex.
@Test
public void testIndex() {
TopologyBuilder builder = new TopologyBuilder();
builder.setSpout("index-spout", new TestIndexSpout());
EsIndexBolt esIndexBolt = new EsIndexBolt(esConfig, new EsDefaultIndexMapper());
builder.setBolt("index-bolt", esIndexBolt).shuffleGrouping("index-spout");
cluster.submitTopology("Index-Test", conf, builder.createTopology());
}
use of com.alibaba.jstorm.elasticsearch.index.TestIndexSpout in project jstorm by alibaba.
the class TestSuite method testUserDefine.
@Test
public void testUserDefine() {
TopologyBuilder builder = new TopologyBuilder();
builder.setSpout("user-define-spout", new TestIndexSpout());
TestIndexBolt esIndexBolt = new TestIndexBolt(esConfig);
builder.setBolt("user-define-bolt", esIndexBolt).shuffleGrouping("user-define-spout");
cluster.submitTopology("UserDefine-Test", conf, builder.createTopology());
}
Aggregations