Github user hmcl commented on the pull request:
https://github.com/apache/storm/pull/1131#issuecomment-213468155
@jianbzhou Thanks for the catch and for suggesting a fix. I was taking a
look and the best way to fix this is to replace the `TreeMap` with a `HashMap`,
i.e. do `final Set tps = new HashSet<>();`.
`TopicPartition` implements `equals()` and `hashCode()` so if you change
the line as suggested nothing else needs to be done. Ordering is not important
here, so `HashMap` is indeed the most appropriate data structure here, and the
one I meant to use to begin with.
The appropriate way to do code contributions is to create a Pull Request
and push it for review by the community. Please find the documentation on how
to do so in here:
* http://storm.apache.org/contribute/Contributing-to-Storm.html
* https://github.com/apache/storm/blob/master/DEVELOPER.md#contribute-code
* https://github.com/apache/storm/blob/master/DEVELOPER.md#pull-requests
I am in the process of submitting a patch with an updated README and a few
more things. Since this is such a small fix, I can include this fix there, and
mention that the credit should go to you. However, if you with to create the
pull request yourself to receive the deserved credit, please go ahead and I
will review it right away.
Please let me know and thanks once again.
---
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.
---