@Override
    public void onApplicationActivate(ApplicationInstanceReference reference, Set<HostName> hostnames) {
        withLockForAdminOp(reference, " was activated", () -> {
            HostInfos hostInfos = hostInfosCache.getCachedHostInfos(reference);
            Set<HostName> toRemove = new HashSet<>(hostInfos.getZkHostnames());
            toRemove.removeAll(hostnames);
            if (toRemove.size() > 0) {
                hostInfosCache.removeHosts(reference, toRemove);
            }
        });
    }
Remove all host-related data in ZooKeeper for all hostnames outside the given set.
orchestrator/src/main/java/com/yahoo/vespa/orchestrator/status/ZkStatusService.java