mattyb149 commented on code in PR #6903:
URL: https://github.com/apache/nifi/pull/6903#discussion_r1099052170


##########
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/AbstractPutElasticsearch.java:
##########
@@ -67,13 +69,28 @@ public abstract class AbstractPutElasticsearch extends 
AbstractProcessor impleme
         .required(true)
         .build();
 
+    static final PropertyDescriptor OUTPUT_ERROR_RESPONSES = new 
PropertyDescriptor.Builder()
+            .name("put-es-output-error-responses")
+            .displayName("Output Error Responses")
+            .description("If this is enabled, errors will be output to the 
\"error_responses\" relationship.")
+            .allowableValues("true", "false")
+            .defaultValue("false")
+            .addValidator(StandardValidators.BOOLEAN_VALIDATOR)
+            .build();
+
     static final Relationship REL_SUCCESS = new Relationship.Builder()
             .name("success")
             .description("All flowfiles that succeed in being transferred into 
Elasticsearch go here. " +
                     "Documents received by the Elasticsearch _bulk API may 
still result in errors on the Elasticsearch side. " +
                     "The Elasticsearch response will need to be examined to 
determine whether any Document(s)/Record(s) resulted in errors.")
             .build();
 
+    static final Relationship REL_ERROR_RESPONSES = new Relationship.Builder()
+            .name("error_responses")
+            .description("Elasticsearch _bulk API responses marked as 
\"error\" (and optionally \"not_found\") go here.")

Review Comment:
   How are the`not_found` responses optional? I didn't see a property or config 
option.



##########
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/AbstractPutElasticsearch.java:
##########
@@ -67,13 +69,28 @@ public abstract class AbstractPutElasticsearch extends 
AbstractProcessor impleme
         .required(true)
         .build();
 
+    static final PropertyDescriptor OUTPUT_ERROR_RESPONSES = new 
PropertyDescriptor.Builder()
+            .name("put-es-output-error-responses")
+            .displayName("Output Error Responses")
+            .description("If this is enabled, errors will be output to the 
\"error_responses\" relationship.")

Review Comment:
   Are the other relationship(s) honored when this is enabled? I presume the 
original behavior is maintained and this is an extra feature that can be 
enabled for better error-handling. If so can you add documentation here that 
the other relationships' behaviors remain intact?



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