Github user mattyb149 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1650#discussion_r113442128
--- Diff:
nifi-nar-bundles/nifi-enrich-bundle/nifi-enrich-processors/src/main/java/org/apache/nifi/processors/GeoEnrichIP.java
---
@@ -76,26 +76,36 @@ public void onTrigger(final ProcessContext context,
final ProcessSession session
final DatabaseReader dbReader = databaseReaderRef.get();
final String ipAttributeName =
context.getProperty(IP_ADDRESS_ATTRIBUTE).evaluateAttributeExpressions(flowFile).getValue();
final String ipAttributeValue =
flowFile.getAttribute(ipAttributeName);
- if (StringUtils.isEmpty(ipAttributeName)) { //TODO need to add
additional validation - should look like an IPv4 or IPv6 addr for instance
+
+ if (StringUtils.isEmpty(ipAttributeName)) {
session.transfer(flowFile, REL_NOT_FOUND);
- getLogger().warn("Unable to find ip address for {}", new
Object[]{flowFile});
+ getLogger().warn("FlowFile '{}' aatribute '{}' was empty.
Routing to failure",
--- End diff --
minor typo here, will fix while merging
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---