With the design in place, we can turn our attention to the implementation. The sequence diagram for the implementation is shown as follows:
The preceding diagram implements the state machine shown in the design. Once the real-time server is started, Druid polls the
StormFirehose object using the
hasMore() method. The contract with Druid specifies that the
Firehose object's implementation should block until data is available. While Druid is polling and the
Firehose object is blocking, Storm delivers tuples into the
's message buffer. When the batch is complete, Storm calls the
commit() method on the ...