<?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: Automatic deployment of NiFi Flow in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Automatic-deployment-of-NiFi-Flow/m-p/311318#M224585</link>
    <description>&lt;P&gt;If you are using versioning and the NiFi registry, when you apply a new version to a running process group it will stop things and wait until things are not in process.&amp;nbsp; &amp;nbsp;&lt;A href="https://pierrevillard.com/2018/04/09/automate-workflow-deployment-in-apache-nifi-with-the-nifi-registry/" target="_blank"&gt;https://pierrevillard.com/2018/04/09/automate-workflow-deployment-in-apache-nifi-with-the-nifi-registry/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See the Python Helper by Dan&amp;nbsp;&lt;A href="https://pypi.org/project/nipyapi/" target="_blank"&gt;https://pypi.org/project/nipyapi/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CLI can do this, you'll have to look at the docs.&lt;/P&gt;&lt;P&gt;&lt;A href="https://nifi.apache.org/docs/nifi-docs/html/toolkit-guide.html" target="_blank"&gt;https://nifi.apache.org/docs/nifi-docs/html/toolkit-guide.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Examples&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.datainmotion.dev/2021/01/automating-starting-services-in-apache.html" target="_blank"&gt;https://www.datainmotion.dev/2021/01/automating-starting-services-in-apache.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The upcoming Cloudera DataFlow Experience does this automatically as part of autoscaling.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Make sure you use Load Balanced Queues between processors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also use Stateless NiFi if you want things to start/stop just complete a fixed job.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.datainmotion.dev/2019/11/exploring-apache-nifi-110-parameters.html" target="_blank"&gt;https://www.datainmotion.dev/2019/11/exploring-apache-nifi-110-parameters.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Extra docs&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.cloudera.com/cdf-datahub/7.2.6/nifi-api/topics/cdf-datahub-nifi-rest-api.html" target="_blank"&gt;https://docs.cloudera.com/cdf-datahub/7.2.6/nifi-api/topics/cdf-datahub-nifi-rest-api.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/tspannhw/EverythingApacheNiFi" target="_blank"&gt;https://github.com/tspannhw/EverythingApacheNiFi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.datainmotion.dev/2020/09/devops-working-with-parameter-contexts.html" target="_blank"&gt;https://www.datainmotion.dev/2020/09/devops-working-with-parameter-contexts.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.datainmotion.dev/2020/10/automating-building-migration-backup.html" target="_blank"&gt;https://www.datainmotion.dev/2020/10/automating-building-migration-backup.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.datainmotion.dev/2019/04/simple-apache-nifi-operations-dashboard.html" target="_blank"&gt;https://www.datainmotion.dev/2019/04/simple-apache-nifi-operations-dashboard.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Feb 2021 16:54:27 GMT</pubDate>
    <dc:creator>TimothySpann</dc:creator>
    <dc:date>2021-02-10T16:54:27Z</dc:date>
    <item>
      <title>Automatic deployment of NiFi Flow</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Automatic-deployment-of-NiFi-Flow/m-p/311313#M224582</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I try to work out some automated deployment situation in NiFi (no UI usage, just cli toolkit or alternatives).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let us asume, you have a nifi flow under a load which need to be updated.&lt;BR /&gt;There are some data in in-between connection queues.&lt;BR /&gt;What happens when you try to update the flow?&lt;BR /&gt;Will some data be lost or will the update be refused?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are there any solution for procedure like this.&lt;BR /&gt;1) stop the data receiving processor&lt;BR /&gt;2) check if the success connection queue is empty&lt;BR /&gt;3) apply steps 1 and 2 to the next processor till the last processor is stopped.&lt;BR /&gt;4) update the flow ignoring any data in failure or error connection queues&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you think it is reasonable approach? Is there something ready to use?&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;Jaro&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 16:29:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Automatic-deployment-of-NiFi-Flow/m-p/311313#M224582</guid>
      <dc:creator>Jarinek</dc:creator>
      <dc:date>2021-02-10T16:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic deployment of NiFi Flow</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Automatic-deployment-of-NiFi-Flow/m-p/311318#M224585</link>
      <description>&lt;P&gt;If you are using versioning and the NiFi registry, when you apply a new version to a running process group it will stop things and wait until things are not in process.&amp;nbsp; &amp;nbsp;&lt;A href="https://pierrevillard.com/2018/04/09/automate-workflow-deployment-in-apache-nifi-with-the-nifi-registry/" target="_blank"&gt;https://pierrevillard.com/2018/04/09/automate-workflow-deployment-in-apache-nifi-with-the-nifi-registry/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See the Python Helper by Dan&amp;nbsp;&lt;A href="https://pypi.org/project/nipyapi/" target="_blank"&gt;https://pypi.org/project/nipyapi/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CLI can do this, you'll have to look at the docs.&lt;/P&gt;&lt;P&gt;&lt;A href="https://nifi.apache.org/docs/nifi-docs/html/toolkit-guide.html" target="_blank"&gt;https://nifi.apache.org/docs/nifi-docs/html/toolkit-guide.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Examples&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.datainmotion.dev/2021/01/automating-starting-services-in-apache.html" target="_blank"&gt;https://www.datainmotion.dev/2021/01/automating-starting-services-in-apache.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The upcoming Cloudera DataFlow Experience does this automatically as part of autoscaling.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Make sure you use Load Balanced Queues between processors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also use Stateless NiFi if you want things to start/stop just complete a fixed job.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.datainmotion.dev/2019/11/exploring-apache-nifi-110-parameters.html" target="_blank"&gt;https://www.datainmotion.dev/2019/11/exploring-apache-nifi-110-parameters.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Extra docs&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.cloudera.com/cdf-datahub/7.2.6/nifi-api/topics/cdf-datahub-nifi-rest-api.html" target="_blank"&gt;https://docs.cloudera.com/cdf-datahub/7.2.6/nifi-api/topics/cdf-datahub-nifi-rest-api.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/tspannhw/EverythingApacheNiFi" target="_blank"&gt;https://github.com/tspannhw/EverythingApacheNiFi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.datainmotion.dev/2020/09/devops-working-with-parameter-contexts.html" target="_blank"&gt;https://www.datainmotion.dev/2020/09/devops-working-with-parameter-contexts.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.datainmotion.dev/2020/10/automating-building-migration-backup.html" target="_blank"&gt;https://www.datainmotion.dev/2020/10/automating-building-migration-backup.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.datainmotion.dev/2019/04/simple-apache-nifi-operations-dashboard.html" target="_blank"&gt;https://www.datainmotion.dev/2019/04/simple-apache-nifi-operations-dashboard.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 16:54:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Automatic-deployment-of-NiFi-Flow/m-p/311318#M224585</guid>
      <dc:creator>TimothySpann</dc:creator>
      <dc:date>2021-02-10T16:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic deployment of NiFi Flow</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Automatic-deployment-of-NiFi-Flow/m-p/311319#M224586</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80158"&gt;@Jarinek&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The process really depends on what update you are trying to make.&lt;BR /&gt;&lt;BR /&gt;1. You can not remove a connection that has queued FlowFiles in it, but you can redirect it to a different target processor with queued data.&lt;BR /&gt;2. You can not redirect a connection if the processor it is currently attached to still has a running thread.&amp;nbsp; Stopping a processor does not kill threads, it simply tells the processor to not execute again at the configured run schedule.&amp;nbsp; Existing threads will continue to run until they complete.&amp;nbsp; Until all threads exit, the processor is still in a state of "stopping" even though UI reflect red square for "stopped".&lt;BR /&gt;3. You cannot modify a processor if is still has running threads (see note about "stopping" processors above)&lt;/P&gt;&lt;P&gt;4. If you stop the component that is on the receiving side of a connection, any FlowFiles queued on that connection, not tied to any active thread still running on target processor component, will not be processed and remain queued on the connection.&amp;nbsp; You can manual empty a queue through a rest-api call (means data loss), but that is not necessary if you are not deleting the connection.&lt;BR /&gt;&lt;BR /&gt;Attempts to perform configuration changes when components still have active threads or are in a running state will result in an exception being thrown and the change not happening.&lt;BR /&gt;Attempts remove connections that have queued FlowFiles will throw an exception and block removal.&lt;BR /&gt;&lt;BR /&gt;Now if all you are trying to do is modify some configuration on a processor, all you need to do is stop the processor, check that it has no active threads, make the config change, and then start the processor again.&lt;BR /&gt;&lt;BR /&gt;Not sure wha you are asking with "&lt;SPAN&gt;update the flow ignoring any data in failure or error connection queues".&amp;nbsp; NiFi does not ignore queued FlowFiles.&amp;nbsp; It also not wise to leave connection with queued FlowFiles just sitting around your dataflows.&amp;nbsp; &amp;nbsp;Those old queued FlowFile will prevent removal or content claims that contain that FlowFiles data.&amp;nbsp; Since a content claim can contain the data from 1 to many FlowFiles, this can result in your content repository filling up.&amp;nbsp; NiFi can only remove content claims which have no FlowFiles pointing to them anymore.&lt;BR /&gt;&lt;BR /&gt;Here are some useful links:&lt;BR /&gt;&lt;A href="https://nipyapi.readthedocs.io/en/latest/nipyapi-docs/nipyapi.html" target="_blank"&gt;https://nipyapi.readthedocs.io/en/latest/nipyapi-docs/nipyapi.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://github.com/Chaffelson/nipyapi" target="_blank"&gt;https://github.com/Chaffelson/nipyapi&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="http://nifi.apache.org/docs/nifi-docs/rest-api/index.html" target="_blank"&gt;http://nifi.apache.org/docs/nifi-docs/rest-api/index.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.cloudera.com/t5/Community-Articles/Update-NiFi-Connection-Destination-via-REST-API/ta-p/244211" target="_blank"&gt;https://community.cloudera.com/t5/Community-Articles/Update-NiFi-Connection-Destination-via-REST-API/ta-p/244211&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://community.cloudera.com/t5/Community-Articles/Change-NiFi-Flow-Using-Rest-API-Part-1/ta-p/244631" target="_blank"&gt;https://community.cloudera.com/t5/Community-Articles/Change-NiFi-Flow-Using-Rest-API-Part-1/ta-p/244631&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 17:03:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Automatic-deployment-of-NiFi-Flow/m-p/311319#M224586</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2021-02-10T17:03:25Z</dc:date>
    </item>
  </channel>
</rss>

