abhishekrb19 opened a new pull request #11634:
URL: https://github.com/apache/druid/pull/11634


   This change-set does the following:
   - Include a new [IPAddress](https://github.com/seancfoley/IPAddress) java 
library dependency to handle IP addresses.
   - Migrate the IPv4 address functions -- `IPV4_MATCH()`, `IPV4_PARSE()`, 
`IPV4_STRINGIFY()` to use the above package `inet.ipaddr` instead of the 
`org.apache.commons.net`, `com.google.common.net` and `java.net` packages.
   
   **Rationale:**
   - The `org.apache.commons.net.util.SubnetUtils` class doesn't support IPv6 
addresses yet. Please see the open JIRA 
https://issues.apache.org/jira/browse/NET-405.  In order to support IPV6 
address functions, going down the path of writing custom regexes, parser and 
longest string matching functions can be tricky given the various IPv6 address 
formats. The `inet.ipaddr` package supports these right out of the box, so we 
could leverage that.
   - In the future, if there is a desire to expose the IP address parsing 
options as run time context parameters or similar, it can be plumbed in 
relatively easily since the java library provides flexibility there.
   
   
   **Next steps**:
   If this looks good, I will go ahead and make an attempt at adding the IPv6 
address functions. Open to suggestions. Thanks!
   
   This PR has:
   - [ X] been self-reviewed.
      - [ ] using the [concurrency 
checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md)
 (Remove this item if the PR doesn't have any relation to concurrency.)
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] added Javadocs for most classes and all non-trivial methods. Linked 
related entities via Javadoc links.
   - [X ] added or updated version, license, or notice information in 
[licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
   - [ ] added comments explaining the "why" and the intent of the code 
wherever would not be obvious for an unfamiliar reader.
   - [X] added unit tests or modified existing tests to cover new code paths, 
ensuring the threshold for [code 
coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md)
 is met.
   - [ ] added integration tests.
   - [X] been tested in a test Druid cluster.
   


-- 
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to