/** * Unassign everything for the given topology id. * * @param topoId the is of the topology to unassign */ public void unassign(String topoId) { assertValidTopologyForModification(topoId); freeSlots(getUsedSlotsByTopologyId(topoId)); }
SchedulerAssignment evictAssignemnt = workingState.getAssignmentById(topologyEvict.getId()); if (evictAssignemnt != null && !evictAssignemnt.getSlots().isEmpty()) { Collection<WorkerSlot> workersToEvict = workingState.getUsedSlotsByTopologyId(topologyEvict.getId());
private void evictTopology(TopologyDetails topologyEvict) { Collection<WorkerSlot> workersToEvict = this.cluster.getUsedSlotsByTopologyId(topologyEvict.getId()); User submitter = this.userMap.get(topologyEvict.getTopologySubmitter()); LOG.info("Evicting Topology {} with workers: {} from user {}", topologyEvict.getName(), workersToEvict, topologyEvict.getTopologySubmitter()); this.nodes.freeSlots(workersToEvict); submitter.moveTopoFromRunningToPending(topologyEvict, this.cluster); }