You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flume.apache.org by Jyotsna G <jy...@gmail.com> on 2018/04/20 06:43:48 UTC

Flume regex extractor interceptor

Hi All,

Will flume regex extractor interceptor be applied on flume even header
values also or only the body?

Can i use it to extract a substring out of the fileHeader value in the
event header?

Thanks,
Jyotsna

Re: Flume regex extractor interceptor

Posted by Jyotsna G <jy...@gmail.com>.
Thank you so much.

Implemented a custom interceptor as suggested.

Regards,
Jyotsna

On Fri, Apr 20, 2018 at 2:06 PM, Ferenc Szabo <sz...@apache.org> wrote:

> Hi Jyotsna,
>
> the Regex Extractor Interceptor reads only the event body and writes into
> the headers.
>
> However, you can write custom interceptor easily by implementing this
> interface:
>
>  https://github.com/apache/flume/blob/trunk/flume-ng-
> core/src/main/java/org/apache/flume/interceptor/Interceptor.java
>
> as you can see, you get the whole Event.
>
> Regards,
> Ferenc
>
> On Fri, Apr 20, 2018 at 8:43 AM, Jyotsna G <jy...@gmail.com> wrote:
>
>> Hi All,
>>
>> Will flume regex extractor interceptor be applied on flume even header
>> values also or only the body?
>>
>> Can i use it to extract a substring out of the fileHeader value in the
>> event header?
>>
>> Thanks,
>> Jyotsna
>>
>
>

Re: Flume regex extractor interceptor

Posted by Ferenc Szabo <sz...@apache.org>.
Hi Jyotsna,

the Regex Extractor Interceptor reads only the event body and writes into
the headers.

However, you can write custom interceptor easily by implementing this
interface:


https://github.com/apache/flume/blob/trunk/flume-ng-core/src/main/java/org/apache/flume/interceptor/Interceptor.java

as you can see, you get the whole Event.

Regards,
Ferenc

On Fri, Apr 20, 2018 at 8:43 AM, Jyotsna G <jy...@gmail.com> wrote:

> Hi All,
>
> Will flume regex extractor interceptor be applied on flume even header
> values also or only the body?
>
> Can i use it to extract a substring out of the fileHeader value in the
> event header?
>
> Thanks,
> Jyotsna
>