[
https://issues.apache.org/jira/browse/NIFI-13860?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tamas Palfy updated NIFI-13860:
-------------------------------
Description:
The
{code:java}
Optional<Record> lookup
{code}
in {{IPLookupService}} calls into {{com.maxmind.geoip2.DatabaseReader}} methods
that throw {{AddressNotFoundException}} when an IP lookup fails.
When used in the {{LookupRecord}} processor this causes an error and the entire
flowfile is routed to the _failure_ relationship instead of routing the unfound
records to _unmatched_ and keep routing the found ones to _matched_.
The {{DatabaseReader}} has {{tryX}} methods that return an {{Optional}} instead
of throwing an exception when the IP is not found in the DB. All lookups should
use this variant.
was:
The
{code:java}
Optional<Record> lookup
{code}
in {{IPLookupService}} calls into {{com.maxmind.geoip2.DatabaseReader}} methods
that throw {{AddressNotFoundException}} when an IP lookup fails.
When used in the LookupRecord processor this causes an error and the entire
flowfile is routed to the _failure_ relationship instead of routing the unfound
records to _unmatched_ and keep routing the found ones to _matched_.
The {{DatabaseReader}} has {{tryX}} methods that return an {{Optional}} instead
of throwing an exception when the IP is not found in the DB. All lookups should
use this variant.
> IPLookupService throws exception when lookup fails
> --------------------------------------------------
>
> Key: NIFI-13860
> URL: https://issues.apache.org/jira/browse/NIFI-13860
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Reporter: Tamas Palfy
> Priority: Major
>
> The
> {code:java}
> Optional<Record> lookup
> {code}
> in {{IPLookupService}} calls into {{com.maxmind.geoip2.DatabaseReader}}
> methods that throw {{AddressNotFoundException}} when an IP lookup fails.
> When used in the {{LookupRecord}} processor this causes an error and the
> entire flowfile is routed to the _failure_ relationship instead of routing
> the unfound records to _unmatched_ and keep routing the found ones to
> _matched_.
> The {{DatabaseReader}} has {{tryX}} methods that return an {{Optional}}
> instead of throwing an exception when the IP is not found in the DB. All
> lookups should use this variant.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)