Class InactiveShardPlanAction
- java.lang.Object
-
- org.apache.solr.cloud.autoscaling.TriggerActionBase
-
- org.apache.solr.cloud.autoscaling.InactiveShardPlanAction
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,TriggerAction
public class InactiveShardPlanAction extends TriggerActionBase
This class checks whether there are shards that have been inactive for a long time (which usually means they are left-overs from shard splitting) and requests their removal after their cleanup TTL period elapsed.Shard delete requests are put into the
ActionContext
's properties with the key name "operations". The value is a List of SolrRequest objects.
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_TTL_SECONDS
static String
TTL_PROP
-
Fields inherited from class org.apache.solr.cloud.autoscaling.TriggerActionBase
cloudManager, loader, properties, requiredProperties, validProperties
-
-
Constructor Summary
Constructors Constructor Description InactiveShardPlanAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(SolrResourceLoader loader, SolrCloudManager cloudManager, Map<String,Object> properties)
Called when action is created but before it's initialized and used.void
process(TriggerEvent event, ActionContext context)
-
Methods inherited from class org.apache.solr.cloud.autoscaling.TriggerActionBase
close, getName, init
-
-
-
-
Field Detail
-
TTL_PROP
public static final String TTL_PROP
- See Also:
- Constant Field Values
-
DEFAULT_TTL_SECONDS
public static final int DEFAULT_TTL_SECONDS
- See Also:
- Constant Field Values
-
-
Method Detail
-
configure
public void configure(SolrResourceLoader loader, SolrCloudManager cloudManager, Map<String,Object> properties) throws TriggerValidationException
Description copied from interface:TriggerAction
Called when action is created but before it's initialized and used. This method should also verify that the configuration parameters are correct. It may be called multiple times.- Specified by:
configure
in interfaceTriggerAction
- Overrides:
configure
in classTriggerActionBase
- Parameters:
loader
- loader to use for instantiating sub-componentscloudManager
- current instance of SolrCloudManagerproperties
- configuration properties- Throws:
TriggerValidationException
- contains details of invalid configuration parameters.
-
process
public void process(TriggerEvent event, ActionContext context) throws Exception
- Throws:
Exception
-
-