Search in sources :

Example 1 with UnavailableShardsException

use of io.crate.exceptions.UnavailableShardsException in project crate by crate.

the class RoutingProvider method fillLocationsFromShardIterator.

private static void fillLocationsFromShardIterator(boolean ignoreMissingShards, Map<String, Map<String, IntIndexedContainer>> locations, ShardIterator shardIterator) {
    ShardRouting shardRouting = shardIterator.nextOrNull();
    if (shardRouting == null) {
        if (ignoreMissingShards) {
            return;
        }
        throw new UnavailableShardsException(shardIterator.shardId());
    }
    processShardRouting(locations, shardRouting);
}
Also used : UnavailableShardsException(io.crate.exceptions.UnavailableShardsException) ShardRouting(org.elasticsearch.cluster.routing.ShardRouting)

Aggregations

UnavailableShardsException (io.crate.exceptions.UnavailableShardsException)1 ShardRouting (org.elasticsearch.cluster.routing.ShardRouting)1