Skip to main content
maykiwogno
Silver ⭐️⭐️⭐️
Oct 21, 2016 8:08 PM UTC
Solved

Understanding the Role of Auto-Terminate Relationships in NiFi FlowFile Lifecycles

Hi all,

Someone can explain me about "auto Terminate Relationships" in the processor ?

thanks

MattWho
MattWhoAnswer
Titanium ⭐️⭐️
Oct 21, 2016 8:22 PM UTC
@mayki wogno

Every Processor has a well defined job to do. When that job is executed, there are 1 to many possible outcomes. Those outcomes are represented in the form of relationships. As a FlowFile traverses through your dataflow it will be routed to these various relationships. Eventually you will reach the end of you dataflow and the auto-terminate relationship capability gives the user the ability to tell NiFi I am not done with the FlowFile you may get rid of it.

A processor is never coded to ever delete FlowFiles by default. For example, lets assume the last processor in my dataflow is a putSFTP. What this processor actually does when it receives a FlowFile is send a copy of that FlowFiles content to the SFTP destination. Upon confirmed delivery it routes the FlowFile to the "success" relationship. You may choose to send that FlowFile via that "success" relationship on for further processing in additional processors or "auto-terminate" it within the putSFTP thus ending its life as FlowFile. In NiFi it is the dataflow designers job to determine when a FlowFile has reached the end of the dataflow and that is exactly what "auto-terminate relationships" is used for.

Thanks,

Matt

3 replies

pvillard
Gold ⭐️
Gold ⭐️
Oct 21, 2016 8:16 PM UTC

Hi,

If you auto-terminate relationships, it means that flow files that are routed to this relationship will be purely deleted. This is often used on endpoint processors of your workflow.

Hope this helps.

Translate
MattWho
Titanium ⭐️⭐️
MattWhoAnswer
Titanium ⭐️⭐️
Oct 21, 2016 8:22 PM UTC
@mayki wogno

Every Processor has a well defined job to do. When that job is executed, there are 1 to many possible outcomes. Those outcomes are represented in the form of relationships. As a FlowFile traverses through your dataflow it will be routed to these various relationships. Eventually you will reach the end of you dataflow and the auto-terminate relationship capability gives the user the ability to tell NiFi I am not done with the FlowFile you may get rid of it.

A processor is never coded to ever delete FlowFiles by default. For example, lets assume the last processor in my dataflow is a putSFTP. What this processor actually does when it receives a FlowFile is send a copy of that FlowFiles content to the SFTP destination. Upon confirmed delivery it routes the FlowFile to the "success" relationship. You may choose to send that FlowFile via that "success" relationship on for further processing in additional processors or "auto-terminate" it within the putSFTP thus ending its life as FlowFile. In NiFi it is the dataflow designers job to determine when a FlowFile has reached the end of the dataflow and that is exactly what "auto-terminate relationships" is used for.

Thanks,

Matt

Translate
maykiwogno
Silver ⭐️⭐️⭐️
Oct 24, 2016 4:23 PM UTC

@mclark Thanks !

Translate