Examples of shards()


Examples of org.elasticsearch.cluster.routing.IndexRoutingTable.shards()

        } else {
            // we use list here since we know we are not going to create duplicates
            int count = 0;
            for (String index : concreteIndices) {
                IndexRoutingTable indexRouting = indexRoutingTable(clusterState, index);
                count += indexRouting.shards().size();
            }
            return count;
        }
    }
View Full Code Here

Examples of org.elasticsearch.cluster.routing.RoutingNode.shards()

                if (lastNode == nodes.size()) {
                    lastNode = 0;
                }

                if (nodeAllocations.canAllocate(shard, node, allocation).allocate()) {
                    int numberOfShardsToAllocate = routingNodes.requiredAverageNumberOfShardsPerNode() - node.shards().size();
                    if (numberOfShardsToAllocate <= 0) {
                        continue;
                    }

                    changed = true;
View Full Code Here

Examples of org.elasticsearch.cluster.routing.RoutingNodes.shards()

                client().prepareGet(INDEX, "doc", resp.getId()).get().isExists(), equalTo(true));

        state = getNodeClusterState(randomFrom(nodes.toArray(Strings.EMPTY_ARRAY)));
        RoutingNodes rn = state.routingNodes();
        logger.info("--> counts: total: {}, unassigned: {}, initializing: {}, relocating: {}, started: {}",
                rn.shards(new Predicate<MutableShardRouting>() {
                    @Override
                    public boolean apply(org.elasticsearch.cluster.routing.MutableShardRouting input) {
                        return true;
                    }
                }).size(),
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.