Search in sources :

Example 1 with TestIndexBolt

use of com.alibaba.jstorm.elasticsearch.userdefine.TestIndexBolt 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());
}
Also used : TestIndexSpout(com.alibaba.jstorm.elasticsearch.index.TestIndexSpout) TopologyBuilder(backtype.storm.topology.TopologyBuilder) TestIndexBolt(com.alibaba.jstorm.elasticsearch.userdefine.TestIndexBolt) Test(org.junit.Test)

Aggregations

TopologyBuilder (backtype.storm.topology.TopologyBuilder)1 TestIndexSpout (com.alibaba.jstorm.elasticsearch.index.TestIndexSpout)1 TestIndexBolt (com.alibaba.jstorm.elasticsearch.userdefine.TestIndexBolt)1 Test (org.junit.Test)1