O'Reilly logo

Storm Blueprints: Patterns for Distributed Real-time Computation by Brian O'Neill, P. Taylor Goetz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Examining the analytics

The Druid integration is the same that was used in the previous chapter. As a brief recap, this integration comprises the StateFactory, StateUpdater, and State implementations. The State implementation then communicates with a StormFirehoseFactory implementation and a StormFirehose implementation for Druid. At the heart of this implementation is the StormFirehose implementation, which maps the tuples into input rows for Druid. The listing for this method is shown as follows:

@Override public InputRow nextRow() { final Map<String, Object> theMap = Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER); try { TridentTuple tuple = null; tuple = BLOCKING_QUEUE.poll(); if (tuple != null) { String phrase = (String) tuple.getValue(0); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required