You cannot start a processor until all of its relationships are connected to other processors, or are auto-terminated. So far, this example has not connected or auto-terminated the "failed" relationship for each of the processors. This section describes how to route "failed" FlowFiles to a processor that will write the documents to disk in IDX, XML, or JSON format.
To write failed documents to disk
Add a processor, by dragging the processor icon from the components toolbar to the canvas.
The Add Processor dialog box opens.
In the Source list, click idol.nifi.
The list of processors is filtered to those that are provided in the NiFi Ingest distribution.
Select the WriteDocument processor and click ADD.
The processor is added to the canvas.
Right-click the WriteDocument processor and click Configure.
The Configure Processor dialog box opens.
Set the following properties:
Format | The format in which to write the document (for example IDX or XML). |
File in which to write the document | The path of the file to write the documents to. This could be a path to a shared folder. |
Archive Directory | The path in which files are archived when they exceed the maximum size. |
Max file size in bytes before archiving | The maximum size a file can reach before being archived. |
Click Apply.
The pipeline should now look similar to the example described in the introduction.
|