|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.flume.interceptor.SearchAndReplaceInterceptor
public class SearchAndReplaceInterceptor
Interceptor that allows search-and-replace of event body strings using regular expressions. This only works with event bodies that are valid strings. The charset is configurable.
Usage:
agent.source-1.interceptors.search-replace.searchPattern = ^INFO: agent.source-1.interceptors.search-replace.replaceString = Log msg:
Any regular expression search pattern and replacement pattern that can be
used with Matcher.replaceAll(String)
may be used,
including backtracking and grouping.
Nested Class Summary | |
---|---|
static class |
SearchAndReplaceInterceptor.Builder
|
Method Summary | |
---|---|
void |
close()
Perform any closing / shutdown needed by the Interceptor. |
void |
initialize()
Any initialization / startup needed by the Interceptor. |
Event |
intercept(Event event)
Interception of a single Event . |
List<Event> |
intercept(List<Event> events)
Interception of a batch of events. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void initialize()
Interceptor
initialize
in interface Interceptor
public void close()
Interceptor
close
in interface Interceptor
public Event intercept(Event event)
Interceptor
Event
.
intercept
in interface Interceptor
event
- Event to be intercepted
null
if the Event
is to be dropped (i.e. filtered out).public List<Event> intercept(List<Event> events)
Interceptor
intercept
in interface Interceptor
events
- Input list of events
null
. If all events are dropped,
then an empty List is returned.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |