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_COLL
collection.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 String
ACTION_FIELD
static String
AFTER_ACTIONS_FIELD
static String
BEFORE_ACTIONS_FIELD
static String
COLLECTIONS_FIELD
static String
DOC_TYPE
static String
EVENT_SOURCE_FIELD
static String
EVENT_TYPE_FIELD
static String
MESSAGE_FIELD
static String
SOURCE
static String
SOURCE_FIELD
static String
STAGE_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 void
configure(SolrResourceLoader loader, SolrCloudManager cloudManager, AutoScalingConfig.TriggerListenerConfig config)
Called when listener is created but before it's initialized and used.void
onEvent(TriggerEvent event, TriggerEventProcessorStage stage, String actionName, ActionContext context, Throwable error, String message)
This method is called when either a particularstage
oractionName
is 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:TriggerListener
Called 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:
configure
in interfaceTriggerListener
- Overrides:
configure
in 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:TriggerListener
This method is called when either a particularstage
oractionName
is reached during event processing.- Parameters:
event
- current event being processedstage
-TriggerEventProcessorStage
that this listener was registered for, or nullactionName
-TriggerAction
name that this listener was registered for, or nullcontext
- optionalActionContext
when the processing stage is related to an action, or nullerror
- optionalThrowable
error, or nullmessage
- optional message- Throws:
Exception
-
-