protected boolean cleanState(String topologyName,SchedulerStateManagerAdaptor statemgr){
  LOG.fine("Cleaning up topology state");
  Boolean result;
  result=statemgr.deleteTMasterLocation(topologyName);
  if (result == null || !result) {
    LOG.warning("Failed to clear TMaster location. Check whether TMaster set it correctly.");
  }
  result=statemgr.deletePackingPlan(topologyName);
  if (result == null || !result) {
    LOG.warning("Failed to clear packing plan. Check whether Launcher set it correctly.");
  }
  result=statemgr.deletePhysicalPlan(topologyName);
  if (result == null || !result) {
    LOG.warning("Failed to clear physical plan. Check whether TMaster set it correctly.");
  }
  result=statemgr.deleteSchedulerLocation(topologyName);
  if (result == null || !result) {
    LOG.warning("Failed to clear scheduler location. Check whether Scheduler set it correctly.");
  }
  result=statemgr.deleteExecutionState(topologyName);
  if (result == null || !result) {
    LOG.severe("Failed to clear execution state");
    return false;
  }
  result=statemgr.deleteTopology(topologyName);
  if (result == null || !result) {
    LOG.severe("Failed to clear topology definition");
    return false;
  }
  LOG.fine("Cleaned up topology state");
  return true;
}

protected boolean cleanState ( String topologyName , SchedulerStateManagerAdaptor statemgr ) { LOG . fine ( "Cleaning up topology state" ) ; Boolean result ; result = statemgr . deleteTMasterLocation ( topologyName ) ; if ( result == null || ! result ) { LOG . warning ( "Failed to clear TMaster location. Check whether TMaster set it correctly." ) ; } result = statemgr . deletePackingPlan ( topologyName ) ; if ( result == null || ! result ) { LOG . warning ( "Failed to clear packing plan. Check whether Launcher set it correctly." ) ; } result = statemgr . deletePhysicalPlan ( topologyName ) ; if ( result == null || ! result ) { LOG . warning ( "Failed to clear physical plan. Check whether TMaster set it correctly." ) ; } result = statemgr . deleteSchedulerLocation ( topologyName ) ; if ( result == null || ! result ) { LOG . warning ( "Failed to clear scheduler location. Check whether Scheduler set it correctly." ) ; } result = statemgr . deleteExecutionState ( topologyName ) ; if ( result == null || ! result ) { LOG . severe ( "Failed to clear execution state" ) ; return false ; } result = statemgr . deleteTopology ( topologyName ) ; if ( result == null || ! result ) { LOG . severe ( "Failed to clear topology definition" ) ; return false ; } LOG . fine ( "Cleaned up topology state" ) ; return true ; }
clean all states of a heron topology 1 . topology def and executionstate are required to exist to delete 2 . tmasterlocation , schedulerlocation and physicalplan may not exist to delete
