Counting and persisting log statistics

There are many statistics that can be gathered for log streams; for the purposes of this recipe and to illustrate the concept, only a single-time series will be dealt with (log volume per minute); however, this should fully illustrate the design and approach for implementing other analyses.

How to do it…

  1. Download and install the storm-cassandra contrib project into your Maven repository:
    git clone https://github.com/quintona/storm-cassandra
    cd storm-cassandra
    mvn clean install
    
  2. Create a new BaseRichBolt class called VolumeCountingBolt in the storm.cookbook.log package. The bolt must declare three output fields:
    public void declareOutputFields(OutputFieldsDeclarer declarer) { declarer.declare(new Fields(FIELD_ROW_KEY, ...

Get Storm Real-time Processing Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.