Map<String, SpoutSpec> spout_ids = topology.get_spouts();
Map<GlobalStreamId, Grouping> spout_inputs = new HashMap<GlobalStreamId, Grouping>();
for (Entry<String, SpoutSpec> spout : spout_ids.entrySet()) {
String id = spout.getKey();
GlobalStreamId stream = new GlobalStreamId(id, ACKER_INIT_STREAM_ID);
Grouping group = Thrift.mkFieldsGrouping(StormUtils.mk_list("id"));
spout_inputs.put(stream, group);
}
Map<GlobalStreamId, Grouping> bolt_inputs = new HashMap<GlobalStreamId, Grouping>();
for (Entry<String, Bolt> bolt : bolt_ids.entrySet()) {
String id = bolt.getKey();
GlobalStreamId streamAck = new GlobalStreamId(id,
ACKER_ACK_STREAM_ID);
Grouping groupAck = Thrift.mkFieldsGrouping(StormUtils
.mk_list("id"));
GlobalStreamId streamFail = new GlobalStreamId(id,
ACKER_FAIL_STREAM_ID);
Grouping groupFail = Thrift.mkFieldsGrouping(StormUtils
.mk_list("id"));
bolt_inputs.put(streamAck, groupAck);