Package org.elasticsearch.index

Examples of org.elasticsearch.index.IndexShardMissingException


    }

    @Override public IndexShard shardSafe(int shardId) throws IndexShardMissingException {
        IndexShard indexShard = shard(shardId);
        if (indexShard == null) {
            throw new IndexShardMissingException(new ShardId(index, shardId));
        }
        return indexShard;
    }
View Full Code Here


    }

    @Override public Injector shardInjectorSafe(int shardId) throws IndexShardMissingException {
        Injector shardInjector = shardInjector(shardId);
        if (shardInjector == null) {
            throw new IndexShardMissingException(new ShardId(index, shardId));
        }
        return shardInjector;
    }
View Full Code Here

            shardInjector = tmpShardInjectors.remove(shardId);
            if (shardInjector == null) {
                if (!delete) {
                    return;
                }
                throw new IndexShardMissingException(new ShardId(index, shardId));
            }
            shardsInjectors = ImmutableMap.copyOf(tmpShardInjectors);
            if (delete) {
                logger.debug("deleting shard_id [{}]", shardId);
            }
View Full Code Here

        IndexRoutingTable indexRouting = indexRoutingTable(clusterState, index);
        for (String r : routing) {
            int shardId = shardId(clusterState, index, null, null, r);
            IndexShardRoutingTable indexShard = indexRouting.shard(shardId);
            if (indexShard == null) {
                throw new IndexShardMissingException(new ShardId(index, shardId));
            }
            set.add(indexShard.shardsRandomIt());
        }
        return new GroupShardsIterator(set);
    }
View Full Code Here

                if (effectiveRouting != null) {
                    for (String r : effectiveRouting) {
                        int shardId = shardId(clusterState, index, null, null, r);
                        IndexShardRoutingTable indexShard = indexRouting.shard(shardId);
                        if (indexShard == null) {
                            throw new IndexShardMissingException(new ShardId(index, shardId));
                        }
                        // we might get duplicates, but that's ok, its an estimated count? (we just want to know if its 1 or not)
                        set.add(indexShard.shardId());
                    }
                }
View Full Code Here

                if (effectiveRouting != null) {
                    for (String r : effectiveRouting) {
                        int shardId = shardId(clusterState, index, null, null, r);
                        IndexShardRoutingTable indexShard = indexRouting.shard(shardId);
                        if (indexShard == null) {
                            throw new IndexShardMissingException(new ShardId(index, shardId));
                        }
                        // we might get duplicates, but that's ok, they will override one another
                        set.add(preferenceActiveShardIterator(indexShard, clusterState.nodes().localNodeId(), preference));
                    }
                }
View Full Code Here

    }

    protected IndexShardRoutingTable shards(ClusterState clusterState, String index, int shardId) {
        IndexShardRoutingTable indexShard = indexRoutingTable(clusterState, index).shard(shardId);
        if (indexShard == null) {
            throw new IndexShardMissingException(new ShardId(index, shardId));
        }
        return indexShard;
    }
View Full Code Here

        IndexRoutingTable indexRouting = indexRoutingTable(clusterState, index);
        for (String r : routing) {
            int shardId = shardId(clusterState, index, null, null, r);
            IndexShardRoutingTable indexShard = indexRouting.shard(shardId);
            if (indexShard == null) {
                throw new IndexShardMissingException(new ShardId(index, shardId));
            }
            set.add(indexShard.shardsRandomIt());
        }
        return new GroupShardsIterator(Lists.newArrayList(set));
    }
View Full Code Here

            if (effectiveRouting != null) {
                for (String r : effectiveRouting) {
                    int shardId = shardId(clusterState, index, null, null, r);
                    IndexShardRoutingTable indexShard = indexRouting.shard(shardId);
                    if (indexShard == null) {
                        throw new IndexShardMissingException(new ShardId(index, shardId));
                    }
                    // we might get duplicates, but that's ok, they will override one another
                    set.add(indexShard);
                }
            } else {
View Full Code Here

    }

    protected IndexShardRoutingTable shards(ClusterState clusterState, String index, int shardId) {
        IndexShardRoutingTable indexShard = indexRoutingTable(clusterState, index).shard(shardId);
        if (indexShard == null) {
            throw new IndexShardMissingException(new ShardId(index, shardId));
        }
        return indexShard;
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.index.IndexShardMissingException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.