logging-flume icon indicating copy to clipboard operation
logging-flume copied to clipboard

Fix issues reported by SpotBugs in ElasticSearch sink

Open AndreLouisCaron opened this issue 5 years ago • 5 comments

I'm working on some minor contributions to the ElasticSearch sink and I noticed that mvn install -pl flume-ng-sinks/flume-ng-elasticsearch-sink fails out of the box due to issues reported by SpotBugs.

In this pull request, I am fixing said issues to keep future diffs clean when contributing changes.

AndreLouisCaron avatar Mar 27 '20 01:03 AndreLouisCaron

Hi @AndreLouisCaron ,

Thank you for the PRs! I've managed to skim through them and they look like valuable changes! Unfortunately, the build is broken and I don't think I have enough time to fix it nowadays. Would you be interested in looking into that? If you'd need any support, please don't hesitate to let me know.

bessbd avatar Apr 06 '20 16:04 bessbd

@bessbd I took a quick look. I'm not familiar with Java and the ecosystem in this project, but it looks to me like some kind of static code analysis tool is reporting too many errors in code generated by the Thrift compiler.

I tried manually fixing the code in #324. The solution is clearly less than optimal, but I'm not sure how to do it properly. Let's continue that discussion over there.

AndreLouisCaron avatar Apr 06 '20 18:04 AndreLouisCaron

@bessbd Now that the build is fixed, I rebased this onto the latest trunk to get a clean build :-)

AndreLouisCaron avatar Apr 07 '20 19:04 AndreLouisCaron

Before merging, I will also set the spotbugs.maxAllowedViolations property to 0.

AndreLouisCaron avatar Apr 08 '20 03:04 AndreLouisCaron

@bessbd @mpercy I rebased this and set spotbugs.maxAllowedViolations=0.

I have some more changes to fix PMD violations as well. Do you want those in a new commit on the same PR or should I open a new one for those changes?

AndreLouisCaron avatar Apr 08 '20 14:04 AndreLouisCaron

Support for Elasticsearch has been removed from the main Flume build since it is so out of date and its new license is problematic. Please work against the flume-search repo.

rgoers avatar Oct 08 '22 04:10 rgoers