MikeThomsen commented on code in PR #6460:
URL: https://github.com/apache/nifi/pull/6460#discussion_r1002030801


##########
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/gridfs/PutGridFS.java:
##########
@@ -196,6 +239,18 @@ public void onTrigger(ProcessContext context, 
ProcessSession session) throws Pro
         }
     }
 
+    private boolean hasRequiredHashAttribute(ProcessContext context, FlowFile 
input) {
+        String uniquenessOption = 
context.getProperty(ENFORCE_UNIQUENESS).getValue();
+        if (uniquenessOption.equals(NO_UNIQUE.getValue()) || 
uniquenessOption.equals(UNIQUE_NAME.getValue())) {
+            return true;
+        } else {
+            String attributeName = 
context.getProperty(HASH_ATTRIBUTE).evaluateAttributeExpressions().getValue();
+
+            return input.getAttributes().containsKey(attributeName)
+                && !StringUtils.isEmpty(input.getAttribute(attributeName));

Review Comment:
   Done



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

Reply via email to