Class SystemLogListener
- java.lang.Object
-
- org.apache.solr.cloud.autoscaling.TriggerListenerBase
-
- org.apache.solr.cloud.autoscaling.SystemLogListener
-
- All Implemented Interfaces:
Closeable,AutoCloseable,TriggerListener
public class SystemLogListener extends TriggerListenerBase
This listener saves events to theCollectionAdminParams.SYSTEM_COLLcollection.Configuration properties:
- collection - optional string, specifies what collection should be used for storing events. Default value
is
CollectionAdminParams.SYSTEM_COLL.
-
-
Field Summary
Fields Modifier and Type Field Description static StringACTION_FIELDstatic StringAFTER_ACTIONS_FIELDstatic StringBEFORE_ACTIONS_FIELDstatic StringCOLLECTIONS_FIELDstatic StringDOC_TYPEstatic StringEVENT_SOURCE_FIELDstatic StringEVENT_TYPE_FIELDstatic StringMESSAGE_FIELDstatic StringSOURCEstatic StringSOURCE_FIELDstatic StringSTAGE_FIELD-
Fields inherited from class org.apache.solr.cloud.autoscaling.TriggerListenerBase
cloudManager, config, enabled, loader, requiredProperties, validProperties, validPropertyPrefixes
-
-
Constructor Summary
Constructors Constructor Description SystemLogListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(SolrResourceLoader loader, SolrCloudManager cloudManager, AutoScalingConfig.TriggerListenerConfig config)Called when listener is created but before it's initialized and used.voidonEvent(TriggerEvent event, TriggerEventProcessorStage stage, String actionName, ActionContext context, Throwable error, String message)This method is called when either a particularstageoractionNameis reached during event processing.-
Methods inherited from class org.apache.solr.cloud.autoscaling.TriggerListenerBase
close, getConfig, init, isEnabled
-
-
-
-
Field Detail
-
SOURCE_FIELD
public static final String SOURCE_FIELD
- See Also:
- Constant Field Values
-
EVENT_SOURCE_FIELD
public static final String EVENT_SOURCE_FIELD
- See Also:
- Constant Field Values
-
EVENT_TYPE_FIELD
public static final String EVENT_TYPE_FIELD
- See Also:
- Constant Field Values
-
STAGE_FIELD
public static final String STAGE_FIELD
- See Also:
- Constant Field Values
-
ACTION_FIELD
public static final String ACTION_FIELD
- See Also:
- Constant Field Values
-
MESSAGE_FIELD
public static final String MESSAGE_FIELD
- See Also:
- Constant Field Values
-
BEFORE_ACTIONS_FIELD
public static final String BEFORE_ACTIONS_FIELD
- See Also:
- Constant Field Values
-
AFTER_ACTIONS_FIELD
public static final String AFTER_ACTIONS_FIELD
- See Also:
- Constant Field Values
-
COLLECTIONS_FIELD
public static final String COLLECTIONS_FIELD
- See Also:
- Constant Field Values
-
SOURCE
public static final String SOURCE
-
DOC_TYPE
public static final String DOC_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
configure
public void configure(SolrResourceLoader loader, SolrCloudManager cloudManager, AutoScalingConfig.TriggerListenerConfig config) throws TriggerValidationException
Description copied from interface:TriggerListenerCalled when listener 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:
configurein interfaceTriggerListener- Overrides:
configurein classTriggerListenerBase- Parameters:
loader- loader to use for instantiating sub-componentscloudManager- current instance of SolrCloudManagerconfig- coniguration- Throws:
TriggerValidationException- contains details of invalid configuration parameters.
-
onEvent
public void onEvent(TriggerEvent event, TriggerEventProcessorStage stage, String actionName, ActionContext context, Throwable error, String message) throws Exception
Description copied from interface:TriggerListenerThis method is called when either a particularstageoractionNameis reached during event processing.- Parameters:
event- current event being processedstage-TriggerEventProcessorStagethat this listener was registered for, or nullactionName-TriggerActionname that this listener was registered for, or nullcontext- optionalActionContextwhen the processing stage is related to an action, or nullerror- optionalThrowableerror, or nullmessage- optional message- Throws:
Exception
-
-