<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Fileflow penalized for certain time before allowing to progress further in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Fileflow-penalized-for-certain-time-before-allowing-to/m-p/398450#M250194</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/121540"&gt;@bgumis&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;One way you can accomplish what you want to do is using an &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-update-attribute-nar/1.28.0/org.apache.nifi.processors.attributes.UpdateAttribute/index.html" target="_blank"&gt;UpdateAttribute&lt;/A&gt; processor and &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.28.0/org.apache.nifi.processors.standard.RouteOnAttribute/index.html" target="_blank"&gt;RouteOnAttribute&lt;/A&gt; processor between your PutEmail and InvokeHTTP processors.&lt;BR /&gt;&lt;BR /&gt;The UpdateAttribute would be used to add an attribute to the FlowFile with the current time in milliseconds using NiFi Expression Language (NEL) statement:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;${now():toNumber()}&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MattWho_2-1733409278608.png" style="width: 709px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/42941iDF318CA1DB9259A8/image-dimensions/709x295?v=v2" width="709" height="295" role="button" title="MattWho_2-1733409278608.png" alt="MattWho_2-1733409278608.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The success relationship of the update Attribute processor would be routed to the RouteOnAttribute processor.&amp;nbsp; &amp;nbsp;In the RouteOnAttribute processor you setup a new property that compares the records timestamp added to FlowFile by UpdateAttribute against the current time in milliseconds to see if 24 hours has passed yet. If true, the FlowFile will route to the expression property name relationship. If false, the FlowFile will route to the "unmatched" relationship which can be looped back on RouteOnAttribute.&amp;nbsp; &amp;nbsp; The "unmatched" relationship should be configured to use "&lt;A href="https://nifi.apache.org/docs/nifi-docs/html/user-guide.html#automatically-retry" target="_blank"&gt;retry&lt;/A&gt;" to trigger penalization of FlowFiles.&amp;nbsp; This helps limit cpu usage by slowing how often the FlowFile is re-processed by penalizing the FlowFile on each retry.&amp;nbsp; The "Retry Max Back Off Period" would translate into the max time beyond 24 hours a FlowFile may get routed to the invokeHTTP.&amp;nbsp; I assume 24 hours is a min wait period and not a hard limit.&lt;BR /&gt;&lt;BR /&gt;The NEL statement used in RouteOnAttribute would look like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;${now():toNumber():minus(${emailTime}):ge('86400000')}&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MattWho_1-1733409245714.png" style="width: 716px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/42940i94F2666E91BF2558/image-dimensions/716x237?v=v2" width="716" height="237" role="button" title="MattWho_1-1733409245714.png" alt="MattWho_1-1733409245714.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MattWho_0-1733409188073.png" style="width: 713px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/42939iF4551AD5641CD211/image-dimensions/713x668?v=v2" width="713" height="668" role="button" title="MattWho_0-1733409188073.png" alt="MattWho_0-1733409188073.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The other option would require a custom script to set penalization of 24 hours on each FlowFile after the putEmail processor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help our community thrive. If you found&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;any&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "&lt;SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Accept as Solution&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;" on&amp;nbsp;&lt;STRONG&gt;one or more&lt;/STRONG&gt;&amp;nbsp;of them that helped.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you,&lt;BR /&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Dec 2024 14:38:33 GMT</pubDate>
    <dc:creator>MattWho</dc:creator>
    <dc:date>2024-12-05T14:38:33Z</dc:date>
    <item>
      <title>Fileflow penalized for certain time before allowing to progress further</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Fileflow-penalized-for-certain-time-before-allowing-to/m-p/398436#M250188</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;&lt;BR /&gt;So I have a flow that at the end changes particular status through API.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The direct upstream processor is putEmail, which is supposed to notify dynamically generated contacts with data.&lt;BR /&gt;&lt;BR /&gt;After this e-mail is sent, the requirement is to wait 24 hours before using the API call.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have had a hard time understanding the Wait processor and its relation to signal release. ControlRate does not really work (or I cannot set it up properly).&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;What would be a suggested way to deal with such a scenario?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 12:29:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Fileflow-penalized-for-certain-time-before-allowing-to/m-p/398436#M250188</guid>
      <dc:creator>bgumis</dc:creator>
      <dc:date>2024-12-05T12:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Fileflow penalized for certain time before allowing to progress further</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Fileflow-penalized-for-certain-time-before-allowing-to/m-p/398438#M250189</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/121540"&gt;@bgumis&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;Can you please provide more info on your flow like screenshot or description of the steps and where do you expect the wait to happen? The wait processor is not intended for this scenario. Can you provide more information on why the ControlRate is not working for you wither through the configuration or through where it should be placed in the dataflow?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 13:04:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Fileflow-penalized-for-certain-time-before-allowing-to/m-p/398438#M250189</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2024-12-05T13:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Fileflow penalized for certain time before allowing to progress further</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Fileflow-penalized-for-certain-time-before-allowing-to/m-p/398442#M250190</link>
      <description>&lt;P&gt;Hi Samsal,&lt;BR /&gt;&lt;BR /&gt;Sure, here is the flow itself:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bgumis_0-1733404309099.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/42936i784BEDECA62509AE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bgumis_0-1733404309099.png" alt="bgumis_0-1733404309099.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Here is config of controlRate processor&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bgumis_1-1733404345480.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/42937iE3B939CE7AC2A523/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bgumis_1-1733404345480.png" alt="bgumis_1-1733404345480.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have also tried data rate, but the moment the fileFlow arrives at that processor, it immediately goes to queue for invokeHTTP.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 13:13:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Fileflow-penalized-for-certain-time-before-allowing-to/m-p/398442#M250190</guid>
      <dc:creator>bgumis</dc:creator>
      <dc:date>2024-12-05T13:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Fileflow penalized for certain time before allowing to progress further</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Fileflow-penalized-for-certain-time-before-allowing-to/m-p/398443#M250191</link>
      <description>&lt;P&gt;Couple of things I noticed:&lt;/P&gt;&lt;P&gt;1- You dont need the Wait processor as I said it doesnt apply in this case. Wait &amp;amp; Notify processor work together please review info about this &lt;A href="https://pierrevillard.com/2018/2018-06-27-nifi-workflow-monitoring-wait-notify-pattern-with-split-and-merge/" target="_self"&gt;here&lt;/A&gt;. You can remove the Wait processor and replace with the ControlRate processor.&lt;/P&gt;&lt;P&gt;2- In the Control Rate set the &lt;STRONG&gt;Max Rate = 1&lt;/STRONG&gt; . This will allow only one flowfile entry per specified Time Duration.&amp;nbsp; The first flowfile passed after adding this processor or changing its setting will go through without waiting but any subsequent flowfiles will wait. Each passed flowfile will reset the time so the next flowfile will wait the full Time Duration.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3- Why do you have the InvokeHttp disabled?! If its disabled then nothing will run coming from the ControlRate processor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 13:42:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Fileflow-penalized-for-certain-time-before-allowing-to/m-p/398443#M250191</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2024-12-05T13:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Fileflow penalized for certain time before allowing to progress further</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Fileflow-penalized-for-certain-time-before-allowing-to/m-p/398444#M250192</link>
      <description>&lt;P&gt;Hi Samsal,&lt;BR /&gt;&lt;BR /&gt;I added Wait processor there for debugging if needed, and invokeHTTP is disabled because it would hamper my testing due to the fact the initial trigger is the status change (So status changes to Started, fileflow is generated, then at the end it changes the status to ready).&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;As stopped processors are affected by starting/stopping the entire process group, I found it much easier to disable it after I already confirmed it worked the way I wanted.&lt;BR /&gt;&lt;BR /&gt;Yeah, then I am in a bit of a pickle, I would like to utilize either total life duration of a fileFlow or when it went through last processor.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The total duration is fine as the whole cycle lasts few seconds&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 13:52:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Fileflow-penalized-for-certain-time-before-allowing-to/m-p/398444#M250192</guid>
      <dc:creator>bgumis</dc:creator>
      <dc:date>2024-12-05T13:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: Fileflow penalized for certain time before allowing to progress further</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Fileflow-penalized-for-certain-time-before-allowing-to/m-p/398450#M250194</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/121540"&gt;@bgumis&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;One way you can accomplish what you want to do is using an &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-update-attribute-nar/1.28.0/org.apache.nifi.processors.attributes.UpdateAttribute/index.html" target="_blank"&gt;UpdateAttribute&lt;/A&gt; processor and &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.28.0/org.apache.nifi.processors.standard.RouteOnAttribute/index.html" target="_blank"&gt;RouteOnAttribute&lt;/A&gt; processor between your PutEmail and InvokeHTTP processors.&lt;BR /&gt;&lt;BR /&gt;The UpdateAttribute would be used to add an attribute to the FlowFile with the current time in milliseconds using NiFi Expression Language (NEL) statement:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;${now():toNumber()}&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MattWho_2-1733409278608.png" style="width: 709px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/42941iDF318CA1DB9259A8/image-dimensions/709x295?v=v2" width="709" height="295" role="button" title="MattWho_2-1733409278608.png" alt="MattWho_2-1733409278608.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The success relationship of the update Attribute processor would be routed to the RouteOnAttribute processor.&amp;nbsp; &amp;nbsp;In the RouteOnAttribute processor you setup a new property that compares the records timestamp added to FlowFile by UpdateAttribute against the current time in milliseconds to see if 24 hours has passed yet. If true, the FlowFile will route to the expression property name relationship. If false, the FlowFile will route to the "unmatched" relationship which can be looped back on RouteOnAttribute.&amp;nbsp; &amp;nbsp; The "unmatched" relationship should be configured to use "&lt;A href="https://nifi.apache.org/docs/nifi-docs/html/user-guide.html#automatically-retry" target="_blank"&gt;retry&lt;/A&gt;" to trigger penalization of FlowFiles.&amp;nbsp; This helps limit cpu usage by slowing how often the FlowFile is re-processed by penalizing the FlowFile on each retry.&amp;nbsp; The "Retry Max Back Off Period" would translate into the max time beyond 24 hours a FlowFile may get routed to the invokeHTTP.&amp;nbsp; I assume 24 hours is a min wait period and not a hard limit.&lt;BR /&gt;&lt;BR /&gt;The NEL statement used in RouteOnAttribute would look like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;${now():toNumber():minus(${emailTime}):ge('86400000')}&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MattWho_1-1733409245714.png" style="width: 716px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/42940i94F2666E91BF2558/image-dimensions/716x237?v=v2" width="716" height="237" role="button" title="MattWho_1-1733409245714.png" alt="MattWho_1-1733409245714.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MattWho_0-1733409188073.png" style="width: 713px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/42939iF4551AD5641CD211/image-dimensions/713x668?v=v2" width="713" height="668" role="button" title="MattWho_0-1733409188073.png" alt="MattWho_0-1733409188073.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The other option would require a custom script to set penalization of 24 hours on each FlowFile after the putEmail processor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help our community thrive. If you found&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;any&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "&lt;SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Accept as Solution&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;" on&amp;nbsp;&lt;STRONG&gt;one or more&lt;/STRONG&gt;&amp;nbsp;of them that helped.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you,&lt;BR /&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 14:38:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Fileflow-penalized-for-certain-time-before-allowing-to/m-p/398450#M250194</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2024-12-05T14:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Fileflow penalized for certain time before allowing to progress further</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Fileflow-penalized-for-certain-time-before-allowing-to/m-p/398451#M250195</link>
      <description>&lt;P&gt;I apologize but this so confusing to me. Im having hard time making heads from tail here. Also it seems you are trying to change status from disabled to ready (enabled) I'm not sure you can do that even with the API , once the processor is disabled it cant be changed until manually enabled. I dont think I can help you if I dont understand your problem statement very well but I hope someone else can. My advise is to re write your problem statement so that its clear to follow begging to end and then articulate what the problem is and how you are trying to solve, if its too long or to complex then try to come up simplified scenario that would isolate the problem you are trying to solve.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 14:49:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Fileflow-penalized-for-certain-time-before-allowing-to/m-p/398451#M250195</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2024-12-05T14:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: Fileflow penalized for certain time before allowing to progress further</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Fileflow-penalized-for-certain-time-before-allowing-to/m-p/398485#M250203</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Hi, sorry that I was not clear enough in my question, was doing my best &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;This works, thank you very much.&lt;BR /&gt;&lt;BR /&gt;I have set a maximum back-off time for 1 minute as this process is quite time-sensitive and set the queue before RouteonAttribute as well as looped relationship to prioritize the oldest fileflow.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you both for help!&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2024 08:25:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Fileflow-penalized-for-certain-time-before-allowing-to/m-p/398485#M250203</guid>
      <dc:creator>bgumis</dc:creator>
      <dc:date>2024-12-06T08:25:36Z</dc:date>
    </item>
  </channel>
</rss>

