Skip to content

Instantly share code, notes, and snippets.

@UsamaAshraf
Created May 14, 2018 11:57
Show Gist options
  • Save UsamaAshraf/cb2081b51121815b4ed58bb6a218677a to your computer and use it in GitHub Desktop.
Save UsamaAshraf/cb2081b51121815b4ed58bb6a218677a to your computer and use it in GitHub Desktop.
public static void main(String[] args) throws Exception
{
TopologyBuilder builder = new TopologyBuilder();
builder.setSpout("word", new TestWordSpout(), 10);
builder.setBolt("exclaim1", new ExclamationBolt(), 3).shuffleGrouping("word");
builder.setBolt("exclaim2", new ExclamationBolt(), 2).shuffleGrouping("exclaim1");
Config conf = new Config();
// Turn on debugging mode
conf.setDebug(true);
conf.setNumWorkers(3);
StormSubmitter.submitTopology("exclamation-topology", conf, builder.createTopology());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment