[
https://issues.apache.org/jira/browse/FLUME-1157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13276696#comment-13276696
]
Joey Echeverria commented on FLUME-1157:
----------------------------------------
So excited to see this feature get implemented!
Regarding sink-side decorators, I implemented a hack to put the equivalent
functionality in. What I ended up doing was subclassing the sink I needed
decorated and overriding the getChannel() method. I had it return a channel
that largely delegates to the original channel, but intercepts calls to take
events. In order to maintain the correctness, I couldn't modify events in place
in case the transaction got copied, so I ended up creating a new event on every
call. You're correct that this could have performance implications. The other
idea I had was to add a header along the lines of "decorators.complete" that
could have a coma delimited list of decorators that have processed the event.
That way, I could avoid re-processing events that were processed and then
returned to the channel.
I opened FLUME-1207 to continue the conversation.
> Implement Interceptors (previously known as Decorators) for Flume 1.x
> ---------------------------------------------------------------------
>
> Key: FLUME-1157
> URL: https://issues.apache.org/jira/browse/FLUME-1157
> Project: Flume
> Issue Type: New Feature
> Reporter: Arvind Prabhakar
> Assignee: Mike Percy
> Fix For: v1.2.0
>
> Attachments: FLUME-1157-1.patch, FLUME-1157-3.patch
>
>
> Some nice to have built in decorators could be:
> * checksum decorator
> * checksum validation decorator
> * timestamp decorator
> * GUID decorator
> The implementation should support the following:
> * support multiple decorators in predefined order via configuration
> * support custom decorators.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira