@Test public void shouldDeclareOutputFields() { OutputFieldsDeclarer declarer = mock(OutputFieldsDeclarer.class); RollingCountBolt bolt = new RollingCountBolt(); bolt.declareOutputFields(declarer); verify(declarer, times(1)).declare(any(Fields.class)); }
@Override public void declareOutputFields(OutputFieldsDeclarer declarer) { declarer.declare(new Fields("obj", "count", "actualWindowLengthInSeconds")); }
RollingCountBolt extends BaseRichBolt { @Override public void declareOutputFields(OutputFieldsDeclarer declarer) { declarer.declare(new Fields("obj", "count", "actualWindowLengthInSeconds")); } }
RollingCountBolt extends BaseRichBolt { @Override public void declareOutputFields(OutputFieldsDeclarer declarer) { declarer.declare(new Fields("obj", "count", "actualWindowLengthInSeconds")); } RollingCountBolt();  RollingCountBolt(int windowLengthInSeconds, int emitFrequencyInSeconds); }
RollingCountBolt extends BaseRichBolt { @Override public void declareOutputFields(OutputFieldsDeclarer declarer) { declarer.declare(new Fields("obj", "count", "actualWindowLengthInSeconds")); } RollingCountBolt();  RollingCountBolt(int windowLengthInSeconds, int emitFrequencyInSeconds); @SuppressWarnings("rawtypes") @Override void prepare(Map stormConf, TopologyContext context, OutputCollector collector); @Override void execute(Tuple tuple); @Override void declareOutputFields(OutputFieldsDeclarer declarer); @Override Map<String, Object> getComponentConfiguration(); }
RollingCountBolt extends BaseRichBolt { @Override public void declareOutputFields(OutputFieldsDeclarer declarer) { declarer.declare(new Fields("obj", "count", "actualWindowLengthInSeconds")); } RollingCountBolt();  RollingCountBolt(int windowLengthInSeconds, int emitFrequencyInSeconds); @SuppressWarnings("rawtypes") @Override void prepare(Map stormConf, TopologyContext context, OutputCollector collector); @Override void execute(Tuple tuple); @Override void declareOutputFields(OutputFieldsDeclarer declarer); @Override Map<String, Object> getComponentConfiguration();  }