Class RandomPlacementFactory
java.lang.Object
org.apache.solr.cluster.placement.plugins.RandomPlacementFactory
- All Implemented Interfaces:
ConfigurablePlugin<PlacementPluginFactory.NoConfig>,PlacementPluginFactory<PlacementPluginFactory.NoConfig>
public class RandomPlacementFactory
extends Object
implements PlacementPluginFactory<PlacementPluginFactory.NoConfig>
Factory for creating
RandomPlacementFactory.RandomPlacementPlugin, a placement plugin implementing random
placement for new collection creation while preventing two replicas of same shard from being
placed on same node..
See RandomPlacementFactory.RandomNode for information on how this PlacementFactory weights nodes.
See AffinityPlacementFactory for a more realistic example and documentation.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.apache.solr.cluster.placement.PlacementPluginFactory
PlacementPluginFactory.NoConfig -
Field Summary
Fields inherited from interface org.apache.solr.cluster.placement.PlacementPluginFactory
PLUGIN_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns an instance of the plugin that will be repeatedly (and concurrently) called to compute placement.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.solr.cluster.placement.PlacementPluginFactory
configure, getConfig
-
Constructor Details
-
RandomPlacementFactory
public RandomPlacementFactory()
-
-
Method Details
-
createPluginInstance
Description copied from interface:PlacementPluginFactoryReturns an instance of the plugin that will be repeatedly (and concurrently) called to compute placement. Multiple instances of a plugin can be used in parallel (for example if configuration has to change, but plugin instances with the previous configuration are still being used).- Specified by:
createPluginInstancein interfacePlacementPluginFactory<PlacementPluginFactory.NoConfig>
-