Set<Integer> allTaskIds = StormUtils.listToSet(this.zkCluster.task_ids(this.topologyId));
HashSet<String> componnames=new HashSet<String>();
HashMap<String,ArrayList<Integer>> componname2Ids=new HashMap<String,ArrayList<Integer>>();
for (Integer tid : allTaskIds) {
TaskInfo info = this.zkCluster.task_info(this.topologyId, tid);
if (info == null) {
LOG.info("can`t find TaskInfo "+this.topologyId+","+ tid);
continue;
}
taskId2TaskInfo.put(tid, info);
String componentId=info.getComponentId();
componnames.add(componentId);
ArrayList<Integer> tasks=componname2Ids.get(componentId);
if(tasks==null)
{
tasks=new ArrayList<Integer>();