@Test public void testPrepare() { BoltOutputBatcher bolt = new BoltOutputBatcher(this.boltMock, this.noBatching); @SuppressWarnings("rawtypes") Map conf = new HashMap(); TopologyContext context = mock(TopologyContext.class); bolt.prepare(conf, context, null); verify(this.boltMock).prepare(same(conf), same(context), any(BatchOutputCollector.class)); }
@Override public void prepare(@SuppressWarnings("rawtypes") Map stormConf, TopologyContext context, OutputCollector collector) { if(this.batchSizes != null) { this.batchCollector = new BatchOutputCollector(context, collector, this.batchSizes); } else { this.batchCollector = new BatchOutputCollector(context, collector, this.batchSize); } this.wrappedBolt.prepare(stormConf, context, this.batchCollector); }
BoltOutputBatcher implements IRichBolt { @Override public void prepare(@SuppressWarnings("rawtypes") Map stormConf, TopologyContext context, OutputCollector collector) { if(this.batchSizes != null) { this.batchCollector = new BatchOutputCollector(context, collector, this.batchSizes); } else { this.batchCollector = new BatchOutputCollector(context, collector, this.batchSize); } this.wrappedBolt.prepare(stormConf, context, this.batchCollector); } }
BoltOutputBatcher implements IRichBolt { @Override public void prepare(@SuppressWarnings("rawtypes") Map stormConf, TopologyContext context, OutputCollector collector) { if(this.batchSizes != null) { this.batchCollector = new BatchOutputCollector(context, collector, this.batchSizes); } else { this.batchCollector = new BatchOutputCollector(context, collector, this.batchSize); } this.wrappedBolt.prepare(stormConf, context, this.batchCollector); } BoltOutputBatcher(IRichBolt bolt, int batchSize);  BoltOutputBatcher(IRichBolt bolt, Map<String, Integer> batchSizes); }
BoltOutputBatcher implements IRichBolt { @Override public void prepare(@SuppressWarnings("rawtypes") Map stormConf, TopologyContext context, OutputCollector collector) { if(this.batchSizes != null) { this.batchCollector = new BatchOutputCollector(context, collector, this.batchSizes); } else { this.batchCollector = new BatchOutputCollector(context, collector, this.batchSize); } this.wrappedBolt.prepare(stormConf, context, this.batchCollector); } BoltOutputBatcher(IRichBolt bolt, int batchSize);  BoltOutputBatcher(IRichBolt bolt, Map<String, Integer> batchSizes); @Override void prepare(@SuppressWarnings("rawtypes") Map stormConf, TopologyContext context, OutputCollector collector); @Override void execute(Tuple input); @Override void cleanup(); @Override void declareOutputFields(OutputFieldsDeclarer declarer); @Override Map<String, Object> getComponentConfiguration(); static void registerKryoClasses(Config stormConfig); }
BoltOutputBatcher implements IRichBolt { @Override public void prepare(@SuppressWarnings("rawtypes") Map stormConf, TopologyContext context, OutputCollector collector) { if(this.batchSizes != null) { this.batchCollector = new BatchOutputCollector(context, collector, this.batchSizes); } else { this.batchCollector = new BatchOutputCollector(context, collector, this.batchSize); } this.wrappedBolt.prepare(stormConf, context, this.batchCollector); } BoltOutputBatcher(IRichBolt bolt, int batchSize);  BoltOutputBatcher(IRichBolt bolt, Map<String, Integer> batchSizes); @Override void prepare(@SuppressWarnings("rawtypes") Map stormConf, TopologyContext context, OutputCollector collector); @Override void execute(Tuple input); @Override void cleanup(); @Override void declareOutputFields(OutputFieldsDeclarer declarer); @Override Map<String, Object> getComponentConfiguration(); static void registerKryoClasses(Config stormConfig);  }