[
https://issues.apache.org/jira/browse/FLUME-932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13191870#comment-13191870
]
Ralph Goers commented on FLUME-932:
-----------------------------------
Pardon me for also jumping in late but I also have a number of issues with
this. Mostly they revolve around the thread safety of the code.
1. All the methods in DefaultSourceFactory are synchronized. All the methods in
DefaultChannelFactory are not. DefaultChannelFactory isn't using a
ConcurrentHashMap so it doesn't appear to be thread safe. While
DefaultSourceFactory synchronizes all of its methods this could probably be
avoided if a ConcurrentHashMap was used.
2. Methods such as setName and getName on AbstractChannel are synchronized.
This is pointless since the operation they are performing is atomic.
3. It would be much better if setter methods were avoided entirely and the
values were required to be passed to the constructor instead. This would make
the objects largely immutable and much easier to deal with in a thread-safe
manner. For example, just because the setName method is synchronized doesn't
prevent the method from being called after the object has already been added to
the configuration. Preventing that in the set method itself requires all kinds
of weird checks to cause an IllegalStateException to be thrown.
4. Although it may not have been modified here, I'm also confused by
DefaultLogicalNodeManager's onNodeConfigurationChanged method. I see it calling
the LifecycleSupervisor for each of the Sinks and Sources in the new
configuration. What does it do with the Sinks and Sources from the previous
configuration?
> Making flume-ng components pluggage and name aware
> --------------------------------------------------
>
> Key: FLUME-932
> URL: https://issues.apache.org/jira/browse/FLUME-932
> Project: Flume
> Issue Type: Improvement
> Reporter: Arvind Prabhakar
> Assignee: Arvind Prabhakar
> Attachments: FLUME-932-1-svn.patch, FLUME-932-2-svn.patch
>
>
> Currently the components in flume-ng are hard wired to use the built in name.
> This implies that within one agent, there can be only one instance of a
> particular component. While the configuration supports having multiple
> components of the same time, the component interfaces themselves need to
> change.
> Also, need to support plugin components for user-provided implementations of
> source/sink/channels where necessary.
--
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