Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get failure reason in Apache NiFi

Tags:

apache-nifi

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.

like image 502
Amine CHERIFI Avatar asked Apr 26 '16 15:04

Amine CHERIFI


People also ask

What happens to be data if NiFi goes down?

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.

How do I get NiFi API data?

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.

What is GenerateFlowFile in NiFi?

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.


1 Answers

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?

like image 85
Bryan Bende Avatar answered Sep 27 '22 23:09

Bryan Bende