Github user HeartSaVioR commented on the issue:
https://github.com/apache/storm/pull/1942
@pasalkarsachin1
> For point 2, I have various implementations in mind to add to open source
one of them is implemented by megha10 for ZipTextFileReader another can be
anySepratorReader like (pipe,comma). If we add enum for every implementation
contributor has to do other extra work to enable it rather just adding reader.
> Also if user adds his class where he can add it? He has to provide FCQN
which comes back to same implementation which I did.
For point 2 I suggest **adding** shortcut, not removing previous one.
Providing FQDN is not easiest way to do so we can make some implementation
taking precedence and support it via easiest way.
IMHO providing shortcut method is easiest (or similar to providing enum),
and providing enum is good enough, and receiving only FQDN is not convenient,
but just has to use. First two things make IDE providing various hints, and the
last thing doesn't.
Adding it to enum or even providing shortcut method will be done in 10
lines. I don't think it gives contributors more extra works, but we might need
to guide it properly.
> The current FileReader implementation is expected to have constructor
with a specific signature, which cannot be enforced at compile time. IMO, this
should also be fixed along with this patch by introducing some init method in
the FileReader interface.`
> I am thinking to work on this after this patch we can have init() api
which verifies things before it proceeds.
> Once we provide init method we are providing user a way to initialize the
non Serializable member.
There're various ways to do it.
First of all, your suggestion is valid and I've been using that approach.
One other approach is adding method which receives **builder instance** and
build the instance in open() method. Yes builder instance must be serializable,
but if it only has configurations it is not that hard.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---