nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [nifi] tpalfy commented on a change in pull request #3977: NIFI-7007 Add update functionality to the PutCassandraRecord processor.
Date Thu, 06 Feb 2020 11:10:26 GMT
tpalfy commented on a change in pull request #3977: NIFI-7007 Add update functionality to the
PutCassandraRecord processor.
URL: https://github.com/apache/nifi/pull/3977#discussion_r375773901
 
 

 ##########
 File path: nifi-nar-bundles/nifi-cassandra-bundle/nifi-cassandra-processors/src/main/java/org/apache/nifi/processors/cassandra/PutCassandraRecord.java
 ##########
 @@ -255,14 +257,9 @@ public void onTrigger(ProcessContext context, ProcessSession session)
throws Pro
                 throw new IllegalArgumentException(format("Statement Type is not specified,
FlowFile %s", inputFlowFile));
             }
 
-            // throw an exception if the statement type is set to update and updateMethod
or updateKeys is empty
-            if (UPDATE_TYPE.getValue().equalsIgnoreCase(statementType)) {
-                if (StringUtils.isEmpty(updateMethod)) {
-                    throw new IllegalArgumentException(format("Update Method is not specified,
FlowFile %s", inputFlowFile));
-                }
-                if (StringUtils.isEmpty(updateKeys)) {
+            // throw an exception if the statement type is set to update and updateKeys is
empty
+            if (UPDATE_TYPE.getValue().equalsIgnoreCase(statementType) && StringUtils.isEmpty(updateKeys))
{
 
 Review comment:
   Checking `updateMethod` _here_ actually makes sense because it can come from a flowfile
attribute and can be null/empty.
   I'd leave this check as it was.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message