Search in sources :

Example 1 with EsDefaultIndexMapper

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

Aggregations

TopologyBuilder (backtype.storm.topology.TopologyBuilder)1 EsIndexBolt (com.alibaba.jstorm.elasticsearch.bolt.EsIndexBolt)1 TestIndexSpout (com.alibaba.jstorm.elasticsearch.index.TestIndexSpout)1 EsDefaultIndexMapper (com.alibaba.jstorm.elasticsearch.mapper.EsDefaultIndexMapper)1 Test (org.junit.Test)1