I want to log the reason of a failure in some NiFi processor. but i saw that it could have multiple reasons.
Example for SplitAvroJson processor: "If a FlowFile fails processing for any reason (for example, the FlowFile is not valid Avro), it will be routed to this relationship"
Is there any possibility to get the exact reason of my failure in order to save it in for example in an put file?.
Thank you in advance.
The NiFi Documentation is up to date and explain nicely how clusters work. To answer your question in short, if a node fails, the data that was on that node when it failed will require manual intervention to recover. If you lose the storage on the failed node, you lose the data on that node.
Create the Nifi Flow. Launch Apache Nifi by running the bin/nifi.sh run command on your terminal. Note that your password must be the root directory of Nifi when you run this command. Open your browser and go to http://localhost:8080/nifi to access the Nifi UI where you can create the flow.
Description: This processor creates FlowFiles with random data or custom content. GenerateFlowFile is useful for load testing, configuration, and simulation. Also see DuplicateFlowFile for additional load testing.
Most processors will log the error to nifi-app.log. For the example of SplitAvro it does that here:
https://github.com/apache/nifi/blob/e4b7e47836edf47042973e604005058c28eed23b/nifi-nar-bundles/nifi-avro-bundle/nifi-avro-processors/src/main/java/org/apache/nifi/processors/avro/SplitAvro.java#L206
This error message would also be visible in the NiFi UI as a bulletin on the SplitAvro processor.
Does that achieve what you are looking for?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With