Skip to content

Commit

Permalink
GitHub-issue#253 : Implemented GeoIP processor functionality. Address…
Browse files Browse the repository at this point in the history
…ed Code review comments

Signed-off-by: venkataraopasyavula <[email protected]>
  • Loading branch information
venkataraopasyavula committed Jul 10, 2023
1 parent 456560b commit 2599461
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public Map<String, Object> getGeoData(InetAddress inetAddress, List<String> attr
for (String attribute : attributes) {
switch (attribute) {
case IP:
enrichData(geoData, IP, inetAddress.toString());
enrichData(geoData, IP, inetAddress.getHostAddress());
break;
case COUNTRY_ISO_CODE:
enrichData(geoData, COUNTRY_ISO_CODE, country.getIsoCode());
Expand Down Expand Up @@ -156,7 +156,7 @@ public Map<String, Object> getGeoData(InetAddress inetAddress, List<String> attr
}
} else {

enrichData(geoData, IP, inetAddress.toString());
enrichData(geoData, IP, inetAddress.getHostAddress());
enrichData(geoData, COUNTRY_ISO_CODE, country.getIsoCode());
enrichData(geoData, COUNTRY_NAME, country.getName());
enrichData(geoData, CONTINENT_NAME, continent.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public Map<String, Object> getGeoData(InetAddress inetAddress, List<String> attr
for (String attribute : attributes) {
switch (attribute) {
case IP:
enrichData(geoData, IP, inetAddress.toString());
enrichData(geoData, IP, inetAddress.getHostAddress());
break;
case COUNTRY_ISO_CODE:
enrichData(geoData, COUNTRY_ISO_CODE, country.getIsoCode());
Expand Down Expand Up @@ -188,7 +188,7 @@ public Map<String, Object> getGeoData(InetAddress inetAddress, List<String> attr
}
} else {

enrichData(geoData, IP, inetAddress.toString());
enrichData(geoData, IP, inetAddress.getHostAddress());
enrichData(geoData, COUNTRY_ISO_CODE, country.getIsoCode());
enrichData(geoData, COUNTRY_NAME, country.getName());
enrichData(geoData, CONTINENT_NAME, continent.getName());
Expand Down

0 comments on commit 2599461

Please sign in to comment.