def _get_hosts_from_state(state):
    """
    Given a SOLR state json blob, extract the active hosts

    :param state dict: SOLR state blob
    :returns: list[str]
    """
    active_nodes = set()
    for shard, shard_data in state.get('shards', {}).items():
        replicas = shard_data['replicas']
        for replica, replica_data in replicas.items():
            if replica_data['state'] == 'active':
                active_nodes.add(replica_data['base_url'])

    return active_nodes