@VisibleForTesting public static Set<String> topoIdsToClean(IStormClusterState state, BlobStore store, Map<String, Object> conf) { Set<String> ret = new HashSet<>(); ret.addAll(Utils.OR(state.heartbeatStorms(), EMPTY_STRING_LIST)); ret.addAll(Utils.OR(state.errorTopologies(), EMPTY_STRING_LIST)); ret.addAll(Utils.OR(store.storedTopoIds(), EMPTY_STRING_SET)); ret.addAll(Utils.OR(state.backpressureTopologies(), EMPTY_STRING_LIST)); ret.addAll(Utils.OR(state.idsOfTopologiesWithPrivateWorkerKeys(), EMPTY_STRING_SET)); ret = getExpiredTopologyIds(ret, conf); ret.removeAll(Utils.OR(state.activeStorms(), EMPTY_STRING_LIST)); return ret; }