public interface ClusterPlugin
An extension point for
Plugin implementations to customer behavior of cluster management.-
Method Summary
Modifier and TypeMethodDescriptiondefault Collection<AllocationDecider> createAllocationDeciders(Settings settings, ClusterSettings clusterSettings) Return deciders used to customize where shards are allocated.default Collection<WriteLoadForecaster> createWriteLoadForecasters(ThreadPool threadPool, Settings settings, ClusterSettings clusterSettings) default BalancingWeightsFactorygetBalancingWeightsFactory(BalancerSettings balancerSettings, ClusterSettings clusterSettings) default Map<String, ExistingShardsAllocator> ReturnExistingShardsAllocatorimplementations added by this plugin; the index settingExistingShardsAllocator.EXISTING_SHARDS_ALLOCATOR_SETTINGsets the key of the allocator to use to allocate its shards.default ShardRoutingRoleStrategydefault Map<String, Supplier<ShardsAllocator>> getShardsAllocators(Settings settings, ClusterSettings clusterSettings) Deprecated, for removal: This API element is subject to removal in a future version.default voidCalled when the node is started
-
Method Details
-
createAllocationDeciders
default Collection<AllocationDecider> createAllocationDeciders(Settings settings, ClusterSettings clusterSettings) Return deciders used to customize where shards are allocated.- Parameters:
settings- Settings for the nodeclusterSettings- Settings for the cluster- Returns:
- Custom
AllocationDeciderinstances
-
getShardsAllocators
@Deprecated(forRemoval=true) default Map<String,Supplier<ShardsAllocator>> getShardsAllocators(Settings settings, ClusterSettings clusterSettings) Deprecated, for removal: This API element is subject to removal in a future version.ReturnShardsAllocatorimplementations added by this plugin. The key of the returnedMapis the name of the allocator, and the value is a function to construct the allocator.- Parameters:
settings- Settings for the nodeclusterSettings- Settings for the cluster- Returns:
- A map of allocator implementations
-
getExistingShardsAllocators
ReturnExistingShardsAllocatorimplementations added by this plugin; the index settingExistingShardsAllocator.EXISTING_SHARDS_ALLOCATOR_SETTINGsets the key of the allocator to use to allocate its shards. The default allocator isGatewayAllocator. -
createWriteLoadForecasters
default Collection<WriteLoadForecaster> createWriteLoadForecasters(ThreadPool threadPool, Settings settings, ClusterSettings clusterSettings) -
getShardRoutingRoleStrategy
-
getBalancingWeightsFactory
default BalancingWeightsFactory getBalancingWeightsFactory(BalancerSettings balancerSettings, ClusterSettings clusterSettings) -
onNodeStarted
default void onNodeStarted()Called when the node is started
-