Class PipelineInterpreter
java.lang.Object
org.graylog.plugins.pipelineprocessor.processors.PipelineInterpreter
- All Implemented Interfaces:
MessageProcessor
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Constructor Summary
ConstructorDescriptionPipelineInterpreter
(MessageQueueAcknowledger messageQueueAcknowledger, com.codahale.metrics.MetricRegistry metricRegistry, ConfigurationStateUpdater stateUpdater) -
Method Summary
Modifier and TypeMethodDescriptionvoid
evaluateStage
(Stage stage, Message message, String msgId, List<Message> result, Set<Pipeline> pipelinesToSkip, InterpreterListener interpreterListener) static com.swrve.ratelimitedlogger.RateLimitedLog
getRateLimitedLog
(Class clazz) void
potentiallyDropFilteredMessage
(Message message) process
(Messages messages, InterpreterListener interpreterListener, PipelineInterpreter.State state) Evaluates all pipelines that apply to the given messages, based on the current stream routing of the messages.processForPipelines
(Message message, Set<String> pipelineIds, InterpreterListener interpreterListener, PipelineInterpreter.State state) Given a set of pipeline ids, process the given message according to the passed state.processForResolvedPipelines
(Message message, String msgId, Set<Pipeline> pipelines, InterpreterListener interpreterListener, PipelineInterpreter.State state)
-
Constructor Details
-
Method Details
-
process
- Specified by:
process
in interfaceMessageProcessor
- Parameters:
messages
- messages to process- Returns:
- messages to pass on to the next stage
-
process
public Messages process(Messages messages, InterpreterListener interpreterListener, PipelineInterpreter.State state) Evaluates all pipelines that apply to the given messages, based on the current stream routing of the messages. The processing loops on each single message (passed in or created by pipelines) until the set of streams does not change anymore. No cycle detection is performed.- Parameters:
messages
- the messages to process through the pipelinesinterpreterListener
- a listener which gets called for each processing stage (e.g. to trace execution)state
- the pipeline/stage/rule/stream connection state to use during processing- Returns:
- the processed messages
-
potentiallyDropFilteredMessage
-
processForPipelines
public List<Message> processForPipelines(Message message, Set<String> pipelineIds, InterpreterListener interpreterListener, PipelineInterpreter.State state) Given a set of pipeline ids, process the given message according to the passed state. This method returns the list of messages produced by the configuration in state, it does not look at the database or any other external resource besides what is being passed as parameters. This can be used to simulate pipelines without having to store them in the database.- Parameters:
message
- the message to processpipelineIds
- the ids of the pipelines to resolve and run the message throughinterpreterListener
- the listener tracing the executionstate
- the pipeline/stage/rule state to interpret- Returns:
- the list of messages created during the interpreter run
-
processForResolvedPipelines
public List<Message> processForResolvedPipelines(Message message, String msgId, Set<Pipeline> pipelines, InterpreterListener interpreterListener, PipelineInterpreter.State state) -
evaluateStage
-
getRateLimitedLog
-