ChrisSamo632 commented on code in PR #7940:
URL: https://github.com/apache/nifi/pull/7940#discussion_r1457066410
##########
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/AbstractPutElasticsearch.java:
##########
@@ -55,10 +55,41 @@
import java.util.stream.Collectors;
public abstract class AbstractPutElasticsearch extends AbstractProcessor
implements ElasticsearchRestProcessor {
+ static final Relationship REL_ORIGINAL = new Relationship.Builder()
+ .name("original")
+ .description("All flowfiles that are sent to Elasticsearch without
request failures go to this relationship.")
+ .build();
+
+ static final Relationship REL_SUCCESSFUL = new Relationship.Builder()
+ .name("successful")
Review Comment:
My thinking (from memory) is that `success` in nifi is usually the output of
the incoming FlowFile once it has passed through the processor without error
Here, the semantics are different in that this relationship will contain the
(potentially reformatted) record(s)/json that has been processed within
elasticsearch without error. That is, sent to the ES _bulk endpoint and ES has
reported the operation as successful without error.
ES docs that fail on the ES side are sent to the errors output in nifi (so
the original incoming FlowFile may end up being split between two outputs, even
though the "send" to ES was a success).
So separating the two seemed reasonable. That said, I'm not against using
success for consistency in banking, provided the difference in semantics won't
lead to greater confusion.
--
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]