You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flume.apache.org by "Stern, Mark" <ms...@iskoot.com> on 2012/08/09 12:21:04 UTC

custom interceptor

I want to write a custom interceptor to modify the text of an event (not
just headers). Can this be done? Is there any documentation on how to go
about doing it?

Thanks,

Mark Stern

Re: custom interceptor

Posted by Mike Percy <mp...@apache.org>.
The Javadoc should help a bit, also just look at the stock implementations:
http://flume.apache.org/releases/content/1.2.0/apidocs/org/apache/flume/interceptor/Interceptor.html

The user guide tells you how to put them in your config file:
http://flume.apache.org/FlumeUserGuide.html#flume-interceptors

Regards,
Mike


On Fri, Aug 10, 2012 at 5:19 PM, Patrick Wendell <pw...@gmail.com> wrote:

> Hey Mark,
>
> Writing a custom interceptor means writing a Java class that
> implements the org.apache.flume.interceptor.Interceptor interface.
> Then you include your class in the classpath when launching a flume
> agent.
>
> If you look at that interface, you'll see that an interceptor can
> modify all of the details of event, including headers and body.
>
> - Patrick
>
> On Thu, Aug 9, 2012 at 3:21 AM, Stern, Mark <ms...@iskoot.com> wrote:
> > I want to write a custom interceptor to modify the text of an event (not
> > just headers). Can this be done? Is there any documentation on how to go
> > about doing it?
> >
> > Thanks,
> >
> > Mark Stern
>

Re: custom interceptor

Posted by Patrick Wendell <pw...@gmail.com>.
Hey Mark,

Writing a custom interceptor means writing a Java class that
implements the org.apache.flume.interceptor.Interceptor interface.
Then you include your class in the classpath when launching a flume
agent.

If you look at that interface, you'll see that an interceptor can
modify all of the details of event, including headers and body.

- Patrick

On Thu, Aug 9, 2012 at 3:21 AM, Stern, Mark <ms...@iskoot.com> wrote:
> I want to write a custom interceptor to modify the text of an event (not
> just headers). Can this be done? Is there any documentation on how to go
> about doing it?
>
> Thanks,
>
> Mark Stern