Allocator has been removed in 2.0 using instead – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 2.3-2.3

Briefly, this error occurs when you’re trying to use the Elasticsearch allocator, which has been removed since version 2.0. The allocator was used to allocate shards to nodes. To resolve this issue, you should use the shard allocation filtering feature instead. This feature allows you to control the allocation of shards by including or excluding specific nodes. You can also use the cluster reroute API to manually move shards to specific nodes.

This guide will help you check for common problems that cause the log ” {} allocator has been removed in 2.0 using {} instead ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: cluster.

Log Context

Log “{} allocator has been removed in 2.0 using {} instead” classname is ClusterModule.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

// bind ShardsAllocator
        String shardsAllocatorType = shardsAllocators.bindType(binder(); settings; ClusterModule.SHARDS_ALLOCATOR_TYPE_KEY; ClusterModule.BALANCED_ALLOCATOR);
        if (shardsAllocatorType.equals(ClusterModule.EVEN_SHARD_COUNT_ALLOCATOR)) {
            final ESLogger logger = Loggers.getLogger(getClass(); settings);
            logger.warn("{} allocator has been removed in 2.0 using {} instead"; ClusterModule.EVEN_SHARD_COUNT_ALLOCATOR; ClusterModule.BALANCED_ALLOCATOR);
        }
        allocationDeciders.bind(binder());
        indexTemplateFilters.bind(binder());

        bind(ClusterInfoService.class).to(clusterInfoServiceImpl).asEagerSingleton();

 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?