system_events.add(StatusType.startup.getStatus());
system_events.add(StatusType.monitor.getStatus());
}
//��ȡָ��topology��Ӧ��״̬����
StormBase stormbase = data.getStormClusterState().storm_base(topologyid, null);
StormStatus topologyStatus=null;
if (stormbase != null){
topologyStatus = stormbase.getStatus();
}
if (topologyStatus != null) {
//if(rtn==null){
//����ÿ�λ�ȡ����״̬ת������
rtn=stateTransitions(data,topologyid, topologyStatus);
//}
//��ȡ��ǰtopology״̬��ת����״̬����
Map<StatusType, Callback> transition_map=rtn.get(topologyStatus.getStatusType());
if(transition_map.containsKey(transition_status)){
//��ȡת���¶���ִ�з�����ִ�С�
Callback callback=transition_map.get(transition_status);
//�����µ�״̬����StormStatus
if(callback!=null){
Object obj=callback.execute(args);
if (obj != null && obj instanceof StormStatus) {
StormStatus newStatus=(StormStatus)obj;
//����״̬
data.getStormClusterState().update_storm(topologyid, newStatus);
LOG.info("Updated " + topologyid + " with status " + newStatus);
}
}