Use entrySet() instead of keySet()+get() in WARCSpout and Solr IndexerBolt
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Inspect external/warc/.../WARCSpout.java in open() and external/solr/.../bolt/IndexerBolt.java in execute(). Find the loops that iterate keySet() and call get() for each key, then check how each loop uses the map values. Done when both loops use entrySet() and the existing behavior is unchanged.
Written by the indexing model from the issue text.
Description
SpotBugs reports WMI_WRONG_MAP_ITERATOR in two places, where the code
iterates keySet() and then calls get() for each key:
external/warc/.../WARCSpout.java(open(), reading the HDFS config map)external/solr/.../bolt/IndexerBolt.java(execute(), iterating metadata)
Iterating entrySet() avoids the extra lookup per entry. The change has no
behavior impact. Would you accept a small PR for this? Happy to do it.
- Dominant language
- Java
- Stars
- 1k
- Forks
- 295
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 62
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/stormcrawler
-
Remove dependency on httpcomponents.core5Possibly taken @rzo1 claimed this today. OpenBREAKING CHANGE core
Difficulty 5/5 Over a week Newbie friendliness 15/100
apache/stormcrawler#2266 ·
Maintainers usually reply within 1 day
-
URLNormalizer The query is split on `;` as well as `&`, which rewrites URLsPossibly taken @jnioche claimed this 26 days ago. Openbug
apache/stormcrawler#2199 · 1 assignee ·
Maintainers usually reply within 1 day
-
[Bug report] BasicURLNormalizer unmangleQueryString inserts a second `?` when a query value contains a `/`Possibly taken @jnioche claimed this 26 days ago. Openbug core
apache/stormcrawler#2198 · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 70/100
apache/stormcrawler#2131 ·
Maintainers usually reply within 1 day
-
[Improvement] Work towards Maven 4 CompatibilityPossibly taken @mvolikas claimed this 351 days ago. Opengood first issue help wanted
apache/stormcrawler#1662 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
All issues in apache/stormcrawler
Similar issues
-
staticAssetsPath follows symlinks outside the directory on WindowsPossibly taken @ybelMekk claimed this today. Openbug security findings
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
navikt/mock-oauth2-server#1132 ·
Maintainers usually reply within 1 day
-
agent:working follow-up
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Sanne/incus-spawn#1683 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
checkstyle/checkstyle#22210 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
google/error-prone#6239 · 1 comment ·
Maintainers usually reply within 1 day
-
[Failing Test]: BigqueryClient.queryUnflattened fails BigQuery ITs on a transient 503Possibly taken @mxtymoshyk claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day