w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Apache Storm - composing a bolt with another bolt

I would suggest you take another approach (which coincidentally is the approach I use). Instead of treating the bolt as a reusable class, factor the bolt's business logic out into a pure-Java class. Then if you want to reuse that logic in another bolt, it's much easier to do so.

I'll also suggest that you factor all behavior related to a specific stream (knowledge of names, types and order of values in the tuple, etc.) out into another class. The implementation of your bolt classes should be fairly minimal.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.