ElasticSearchJsonBolt extends BaseBasicBolt implements Configurable { @Override public void configure(Configuration conf) { configureBolt(conf); configureTimeSeriesIndex(conf.subset("timeSeriesIndex")); configureFieldTypeMapping(conf.subset("fieldTypeMapping")); }  @Override void configure(Configuration conf); @Override void prepare(Map stormConf, TopologyContext context); @Override final void declareOutputFields(OutputFieldsDeclarer declarer); @Override final void execute(Tuple input, BasicOutputCollector collector); static final String ES_JSON; }
@Test public void testConfigure() throws Exception { URL resource = getResource("config.xml"); XMLConfiguration conf = new XMLConfiguration(resource); bolt.configure(conf); assertNotNull(bolt.timeSeriesIndexFieldName); assertThat(bolt.fieldTypeMappings.size(), is(5)); }