jnioche opened a new pull request, #1867:
URL: https://github.com/apache/stormcrawler/pull/1867

   ## Summary
   - Add `cleanup()` lifecycle method to `URLFilter`, mirroring the existing 
`ParseFilter.cleanup()` pattern
   - Wire cleanup through `URLFilters`, `StatusEmitterBolt`, `URLFilterBolt`, 
and all bolt subclasses via `super.cleanup()` calls
   - Fix `JSONURLFilterWrapper`: the `Timer` and `RestHighLevelClient` were 
created inside an anonymous `TimerTask` with no way to cancel or close them — 
the timer thread runs forever and the client's connection pool is never shut 
down
   - Store both as instance fields and override `cleanup()` to cancel the timer 
and close the client
   
   ## Changes
   - **`URLFilter`**: add `cleanup()` no-op method (matches `ParseFilter`)
   - **`URLFilters`**: override `cleanup()` to iterate and call it on each 
filter
   - **`StatusEmitterBolt`**: add `cleanup()` that calls `urlFilters.cleanup()`
   - **`URLFilterBolt`**: add `cleanup()` that calls `urlFilters.cleanup()`
   - **5 bolt subclasses**: add `super.cleanup()` call so `URLFilters` cleanup 
is reached
   - **`JSONURLFilterWrapper`**: store timer/client as fields, override 
`cleanup()`
   
   ## Test plan
   - [x] Verify compilation with `mvn compile -pl external/opensearch -am`
   - [x] All core unit tests pass (`mvn test -pl core`)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to