Skip to content

Instantly share code, notes, and snippets.

@nathanmarz
Created August 1, 2011 07:21
Show Gist options
  • Save nathanmarz/1117714 to your computer and use it in GitHub Desktop.
Save nathanmarz/1117714 to your computer and use it in GitHub Desktop.
TopologyBuilder builder = new TopologyBuilder();
builder.setSpout(1, new KestrelSpout("kestrel.backtype.com",
22133,
"sentence_queue",
new StringScheme()));
builder.setBolt(2, new SplitSentence(), 10)
.shuffleGrouping(1);
builder.setBolt(3, new WordCount(), 20)
.fieldsGrouping(2, new Fields("word"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment