Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      FLUME-1157 added support for interceptors (source-side decorators) which enables a number of the use cases that decorators were used for in Flume 0.xx.

      It would be nice to have a sink-side equivalent so that the same source can feed multiple channels/sinks with some getting decorated event, and others getting the original.

        Issue Links

          Activity

          Hide
          Joey Echeverria added a comment -

          Yup, they're the same issue.

          Show
          Joey Echeverria added a comment - Yup, they're the same issue.
          Hide
          li xiang added a comment -

          Hi Joey, this JIRA is talking about the same request as FLUME-2580 ?

          Show
          li xiang added a comment - Hi Joey, this JIRA is talking about the same request as FLUME-2580 ?
          Hide
          Joey Echeverria added a comment -

          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. 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.

          Show
          Joey Echeverria added a comment - 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. 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.

            People

            • Assignee:
              Unassigned
              Reporter:
              Joey Echeverria
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development