Package org.elasticsearch.cluster.routing.allocation.allocator

Examples of org.elasticsearch.cluster.routing.allocation.allocator.ShardsAllocator


    @Test
    public void testNoRebalanceOnPrimaryOverload() {
        ImmutableSettings.Builder settings = settingsBuilder();
        AllocationService strategy = new AllocationService(settings.build(), randomAllocationDeciders(settings.build(),
                new NodeSettingsService(ImmutableSettings.Builder.EMPTY_SETTINGS), getRandom()), new ShardsAllocators(settings.build(),
                new NoneGatewayAllocator(), new ShardsAllocator() {

            @Override
            public boolean rebalance(RoutingAllocation allocation) {
                return false;
            }
View Full Code Here


    private void assertAllocatorInstance(Settings settings, Class<? extends ShardsAllocator> clazz) throws IOException {
        while (cluster().size() != 0) {
            internalCluster().stopRandomDataNode();
        }
        internalCluster().startNode(settings);
        ShardsAllocator instance = internalCluster().getInstance(ShardsAllocator.class);
        assertThat(instance, instanceOf(clazz));
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.cluster.routing.allocation.allocator.ShardsAllocator

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.