#315 Adaptative URL filter to normalize URLs based on canonical tag - #2052
#315 Adaptative URL filter to normalize URLs based on canonical tag #2052akash-manna-sky wants to merge 2 commits into
Conversation
|
Hi @jnioche , please review the changes. |
|
thanks @akash-manna-sky a quick AI assisted review Thanks for tackling #315 — the PR hygiene here is good (formatting, unit tests, docs, issue linkage all present). Most of my comments are about how the filter interacts with the topol Blocker: the filter can't learn anything in a standard topology
The feature only does anything if the user adds This needs a design decision rather than a patch: either learn from somewhere that runs after the parse filters, or explicitly require Also structuralThread safety.
Non-deterministic normalisation. The learned evidence is per-instance, and Content-bearing parameters can be learnt. Self-referencing canonicals are a common misconfiguration: plenty of sites serve Smaller things
Things that do look correct: null handling, |
- Introduced AdaptiveURLNormalizer and CanonicalParamLearner classes to learn and remove irrelevant query parameters based on canonical tags. - Updated documentation to include configuration options for adaptive URL normalization. - Implemented CanonicalRules to manage evidence gathered from canonical tags regarding query parameters. - Added tests for CanonicalParamLearner to ensure correct functionality and integration with AdaptiveURLNormalizer.
|
Hi @jnioche, I addressed your concerns, please have a look. |
|
Thanks @akash-manna-sky Summary Two blockers, a few design points worth settling before merge. Blockers
mvn git-code-format:validate-code-format fails. Running the formatter touches all four Java files (line-width and javadoc reflow, plus DEFAULT_PROTECTED_PARAMS gets exploded one-per-line). The checklist item claims this was done; it wasn't:
Design points
I'd either drop store entirely, or put the config in the learner's params and have the URL filter name the learner. As it stands the store knob only buys a hazard. While it's there: "default" is hard-coded in CanonicalParamLearner.java:60 but lives as package-private DEFAULT_STORE in AdaptiveURLNormalizer.java:47 — two literals that must agree. Move it to CanonicalRules as a public constant.
|
Adaptative URL filter to normalize URLs based on canonical tag
Fixes #315
Thank you for contributing to Apache StormCrawler.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes
Is there a issue associated with this PR? Is it referenced in the commit message?
Does your PR title start with
#XXXXwhereXXXXis the issue number you are trying to resolve?Has your PR been rebased against the latest commit within the target branch (typically main)?
Is your initial contribution a single, squashed commit?
Is the code properly formatted with
mvn git-code-format:format-code -Dgcf.globPattern="**/*" -Dskip.format.code=false?For code changes
mvn clean verify?Note
Please ensure that once the PR is submitted, you check GitHub Actions for build issues and submit an update to your PR as soon as possible.