Created
May 14, 2018 11:46
-
-
Save UsamaAshraf/fda4deed9b82f6c9fd2ea80802c20a68 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class MultiplyByTenBolt extends BaseRichBolt | |
| { | |
| OutputCollector collector; | |
| public void execute(Tuple tuple) | |
| { | |
| // Get 'even-digit' from the tuple. | |
| int evenDigit = tuple.getInt(0); | |
| collector.emit(new Values(evenDigit * 10)); | |
| } | |
| public void declareOutputFields(OutputFieldsDeclarer declarer) | |
| { | |
| declarer.declare(new Fields("even-digit-multiplied-by-ten")); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment