[
https://issues.apache.org/jira/browse/FLUME-1780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13531374#comment-13531374
]
Hari Shreedharan edited comment on FLUME-1780 at 12/13/12 7:48 PM:
-------------------------------------------------------------------
Unfortunately the interface cannot be changed since we already made the
Interceptor interface non-configurable, and the builder interface to be
configurable. Really the builders don't add any real value for Interceptor or
EventSerializer interfaces, since they are configured the same way the
interceptor/serializer would be configured - using the Context object. What I
am saying is our builders don't really use the Builder pattern (hiding
properties so that we don't need multiple constructors etc when we add new ones
- we already achieve this using Configurable interface), nor do we actually
invoke it that way (chained set methods followed by build).
That said, since we cannot change the interface itself, we should at least make
the configuration easier by not forcing the user to pass the builder class in
the configuration (we could easily check that in our code itself).
was (Author: hshreedharan):
Unfortunately the interface cannot be changed since we already made the
Interceptor interface non-configurable, and the builder interface to be
configurable. Really the builders don't add any real value for Interceptor or
EventSerializer interfaces, since they are configured the same way the
interceptor/serializer would be configured - using the Context object. What I
am saying is our builders don't really use the Builder pattern, nor do we
actually invoke it that way (chained set methods followed by build).
That said, since we cannot change the interface itself, we should at least make
the configuration easier by not forcing the user to pass the builder class in
the configuration (we could easily check that in our code itself).
> Interceptors and serializers should not expect users to supply builders or
> specify the builders in configuration
> ----------------------------------------------------------------------------------------------------------------
>
> Key: FLUME-1780
> URL: https://issues.apache.org/jira/browse/FLUME-1780
> Project: Flume
> Issue Type: Bug
> Reporter: Hari Shreedharan
>
> Forcing a programming model on users is not a good thing to do. We have
> already specified the interfaces, that should be enough
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira