From 5367edb8b37a6dac76ac7cd608ac3c005b7b225e Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Sun, 10 Oct 2021 11:13:47 -0600 Subject: Work in progress --- wordcount/topologies/wordcount.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 wordcount/topologies/wordcount.py (limited to 'wordcount/topologies') diff --git a/wordcount/topologies/wordcount.py b/wordcount/topologies/wordcount.py new file mode 100644 index 0000000..d66e1b3 --- /dev/null +++ b/wordcount/topologies/wordcount.py @@ -0,0 +1,13 @@ +""" +Word count topology +""" + +from streamparse import Grouping, Topology + +from bolts.wordcount import WordCountBolt +from spouts.words import WordSpout + + +class WordCount(Topology): + word_spout = WordSpout.spec() + count_bolt = WordCountBolt.spec(inputs={word_spout: Grouping.fields("word")}, par=2) -- cgit v1.2.3