[
https://issues.apache.org/jira/browse/NIFI-2661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15983237#comment-15983237
]
ASF GitHub Bot commented on NIFI-2661:
--------------------------------------
Github user mattyb149 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1650#discussion_r113245854
--- Diff:
nifi-nar-bundles/nifi-enrich-bundle/nifi-enrich-processors/src/main/java/org/apache/nifi/processors/GeoEnrichIP.java
---
@@ -208,6 +120,8 @@ public void onTrigger(final ProcessContext context,
final ProcessSession session
attrs.put(new
StringBuilder(ipAttributeName).append(".geo.longitude").toString(),
longitude.toString());
}
+ attrs.put(new
StringBuilder(ipAttributeName).append(".accuracy").toString(),
response.getLocation().getAccuracyRadius().toString() );
--- End diff --
The javadoc for getAccuracyRadius() says "This attribute is only available
from the Insights end point." Are we guaranteed for that to be the case?
Perhaps add some defensive code here to only add the attribute if we can
successfully get the radius (to avoid NPEs, e.g.)
> Create enrichment processor supporting GeoLite ASN
> --------------------------------------------------
>
> Key: NIFI-2661
> URL: https://issues.apache.org/jira/browse/NIFI-2661
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Andre F de Miranda
> Assignee: Andre F de Miranda
>
> Current EnrichGeoIP does not support MaxMind's GeoLite ASN API and database.
> It would be great to have a processor capable of doing so.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)