def main():
    conf = Config()
    conf.setDebug(True)
    conf.setNumWorkers(2)

    cluster = LocalCluster()
    builder = get_topology_builder()
    cluster.submitTopology("exclamation", conf, builder.createTopology())
    time.sleep(100000)
    cluster.killTopology("exclamation")
    cluster.shutdown()
示例#2
0
def main():
    conf = Config()
    conf.setDebug(True)
    conf.setNumWorkers(2)
    builder = get_topology_builder()
    StormSubmitter.submitTopology("exclamation", conf, builder.createTopology())