You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@amoro.apache.org by "sivakumar-mahalingam (via GitHub)" <gi...@apache.org> on 2026/09/11 16:52:23 UTC
[PR] [AMORO-4232][common] Improve AmsThriftUrl parsing and validation [amoro]
sivakumar-mahalingam opened a new pull request, #4372:
URL: https://github.com/apache/amoro/pull/4372
## Why are the changes needed?
`AmsThriftUrl` lowercased the complete input URL during parsing, which could modify case-sensitive components such as catalog paths and query parameter values. Thrift URL validation also did not clearly handle unsupported schemes, missing hosts, or missing/invalid ports.
Fix #4232.
## Brief change log
* Preserve the original case of hosts, catalog paths, query parameter values, and URLs.
* Compare thrift and ZooKeeper schemes case-insensitively.
* Add validation for thrift scheme, host, and port with clearer error messages.
* Consolidate duplicated `socketTimeout` query parsing.
* Keep existing public APIs unchanged.
* Add unit tests for valid and invalid thrift and ZooKeeper URL scenarios.
## How was this patch tested?
* [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible
* [ ] Add screenshots for manual tests if appropriate
* [x] Run test locally before making a pull request
The following tests were run locally:
```powershell
.\mvnw.cmd -pl amoro-common -Dtest=TestAmsThriftUrl test
```
Result:
```text
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
```
The tests cover:
* Mixed-case thrift schemes.
* Lowercase thrift URLs.
* Case preservation for URL components.
* `socketTimeout` parsing.
* Unsupported schemes.
* Missing hosts.
* Missing ports.
* Invalid ports.
* ZooKeeper URL and timeout handling.
## Documentation
* Does this pull request introduce a new feature? **no**
* If yes, how is the feature documented? **not applicable**
--
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: commits-unsubscribe@amoro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [AMORO-4232][common] Improve AmsThriftUrl parsing and validation [amoro]
Posted by "sivakumar-mahalingam (via GitHub)" <gi...@apache.org>.
sivakumar-mahalingam commented on PR #4372:
URL: https://github.com/apache/amoro/pull/4372#issuecomment-5771330857
Hi @zhoujinsong, could you please review this PR when you have a chance, I do not have access to add a reviewer?
The changes improve `AmsThriftUrl` parsing and validation as part of #4232.
I would appreciate your feedback. Thank you!
--
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: commits-unsubscribe@amoro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [AMORO-4232][common] Improve AmsThriftUrl parsing and validation [amoro]
Posted by "zhoujinsong (via GitHub)" <gi...@apache.org>.
zhoujinsong merged PR #4372:
URL: https://github.com/apache/amoro/pull/4372
--
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: commits-unsubscribe@amoro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org