<?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: When configuring for Embedded Zookeeper for NiFi, question regarding generating 'state' directory in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Configuring-Embedded-ZooKeeper-for-Apache-NiFi-Clusters/m-p/168287#M255013</link>
    <description>&lt;P&gt;Hello,  &lt;/P&gt;&lt;P&gt;   Thank you for the fast reply.  Someone else initially installed the software.  A start command was issued via a NiFi Service once, then we realized I needed to go in and edit several of the properties files for this configuration, since it is a Clustered environment. Have we unintentionally caused the configuration to be unusable, or should we reload the software? &lt;/P&gt;&lt;P&gt; Now I am trying to go back and edit all of the configuration files like: nifi.properties, bootstrap,zookeeper, authority providers and users... to try and set this up for a cluster environment using embedded zookeeper.&lt;/P&gt;&lt;P&gt;Thank you for your reply. &lt;/P&gt;</description>
    <pubDate>Thu, 26 May 2016 05:42:39 GMT</pubDate>
    <dc:creator>pam1</dc:creator>
    <dc:date>2016-05-26T05:42:39Z</dc:date>
    <item>
      <title>Configuring Embedded ZooKeeper for Apache NiFi Clusters: State Directory and myid File Setup</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Configuring-Embedded-ZooKeeper-for-Apache-NiFi-Clusters/m-p/168284#M255010</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Reading the latest NiFi manual from the Hortworks web site: &lt;A href="http://docs.hortonworks.com/HDPDocuments/HDF1/HDF-1.2.0.1/bk_AdminGuide/content/index.html" target="_blank" rel="noopener"&gt;http://docs.hortonworks.com/HDPDocuments/HDF1/HDF-1.2.0.1/bk_AdminGuide/content/index.html&lt;/A&gt; (this uses NiFi version 0.6.0.)&lt;/P&gt;
&lt;P&gt;The manual talks about creating a 'state' directory you need to use, when you want to use "embedded zookeeper' for a clustered NiFi environment:&lt;/P&gt;
&lt;P&gt;When using an embedded ZooKeeper, the ./&lt;EM&gt;conf/zookeeper.properties &lt;/EM&gt;file has a property named&lt;CODE&gt;dataDir&lt;/CODE&gt;. By default, this value is set to&lt;CODE&gt;./state/zookeeper&lt;/CODE&gt;. If more than one NiFi node is running an embedded ZooKeeper, it is important to tell the server which one it is. This is accomplished by creating a file named &lt;EM&gt;myid &lt;/EM&gt;and placing it in ZooKeeper's data directory. The contents of this file should be the index of the server as specific by the&lt;CODE&gt;server.&amp;lt;number&amp;gt;&lt;/CODE&gt;. So for one of the ZooKeeper servers, we will accomplish this by performing the following commands:&lt;/P&gt;
&lt;PRE&gt;cd $NIFI_HOME&lt;/PRE&gt;
&lt;PRE&gt;mkdir state&lt;/PRE&gt;
&lt;PRE&gt;mkdir state/zookeeper&lt;/PRE&gt;
&lt;PRE&gt;echo 1 &amp;gt; state/zookeeper/myid


When I started looking around the directories, before running these commands from the manual, I found a 'state' directory already in out there in the same directory level as 'conf', 'logs' and 'bin'. The ONLY sub-directory under "state" was" "local".

I don't want to 'assume' anything.  Should I use this 'state' directory and build a 'zookeeper' sub directory in it, then add the file called 'myid'?  I am logged on as the root user trying to create this.  &lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Jun 2026 03:54:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Configuring-Embedded-ZooKeeper-for-Apache-NiFi-Clusters/m-p/168284#M255010</guid>
      <dc:creator>pam1</dc:creator>
      <dc:date>2026-06-05T03:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: When configuring for Embedded Zookeeper for NiFi, question regarding generating 'state' directory</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Configuring-Embedded-ZooKeeper-for-Apache-NiFi-Clusters/m-p/168285#M255011</link>
      <description>&lt;P&gt;Yes you can use that state directory and just create the zookeeper sub directory in which you will have the myid file.  I do recommend that your state directory is instead created somewhere outside of the base NiFi install path.  This can aid in simplifying future upgrades of NiFi.  Since newer version will still want to reference the existing cluster wide state created in your existing NiFi version.  If you do choose to move it form default, update the zookeeper properties file and create the new path.&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2016 05:14:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Configuring-Embedded-ZooKeeper-for-Apache-NiFi-Clusters/m-p/168285#M255011</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2016-05-26T05:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: When configuring for Embedded Zookeeper for NiFi, question regarding generating 'state' directory</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Configuring-Embedded-ZooKeeper-for-Apache-NiFi-Clusters/m-p/168286#M255012</link>
      <description>&lt;P&gt;That state directory you found only exists because at some point you started your NiFi instance and it was generated by the application.  Had this been a fresh install it would not have existed and you would have needed to create yourself to complete the zookeeper setup.&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2016 05:17:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Configuring-Embedded-ZooKeeper-for-Apache-NiFi-Clusters/m-p/168286#M255012</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2016-05-26T05:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: When configuring for Embedded Zookeeper for NiFi, question regarding generating 'state' directory</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Configuring-Embedded-ZooKeeper-for-Apache-NiFi-Clusters/m-p/168287#M255013</link>
      <description>&lt;P&gt;Hello,  &lt;/P&gt;&lt;P&gt;   Thank you for the fast reply.  Someone else initially installed the software.  A start command was issued via a NiFi Service once, then we realized I needed to go in and edit several of the properties files for this configuration, since it is a Clustered environment. Have we unintentionally caused the configuration to be unusable, or should we reload the software? &lt;/P&gt;&lt;P&gt; Now I am trying to go back and edit all of the configuration files like: nifi.properties, bootstrap,zookeeper, authority providers and users... to try and set this up for a cluster environment using embedded zookeeper.&lt;/P&gt;&lt;P&gt;Thank you for your reply. &lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2016 05:42:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Configuring-Embedded-ZooKeeper-for-Apache-NiFi-Clusters/m-p/168287#M255013</guid>
      <dc:creator>pam1</dc:creator>
      <dc:date>2016-05-26T05:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: When configuring for Embedded Zookeeper for NiFi, question regarding generating 'state' directory</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Configuring-Embedded-ZooKeeper-for-Apache-NiFi-Clusters/m-p/168288#M255014</link>
      <description>&lt;P&gt;The fact that it was started without any configuration modification will have only one impact.  With default configuration, the NiFi instance would have started http as a standalone instance.  As a result it would have generated a flow.xml.gz file and a templates directory inside the NiFi conf directory.  If the cluster NCM you are joining this node to already has a existing flow or templates, this node will fail to join because they will not match.  NO need to reinstall to fix this if that is the case.  Simply delete the flow.xml.gz file and the templates directory before starting it again.  When it joins the cluster it will get the current flow and templates from the NCM.&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2016 05:51:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Configuring-Embedded-ZooKeeper-for-Apache-NiFi-Clusters/m-p/168288#M255014</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2016-05-26T05:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: When configuring for Embedded Zookeeper for NiFi, question regarding generating 'state' directory</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Configuring-Embedded-ZooKeeper-for-Apache-NiFi-Clusters/m-p/168289#M255015</link>
      <description>&lt;P&gt;Thank you very, very much for your feedback.&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2016 05:57:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Configuring-Embedded-ZooKeeper-for-Apache-NiFi-Clusters/m-p/168289#M255015</guid>
      <dc:creator>pam1</dc:creator>
      <dc:date>2016-05-26T05:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: When configuring for Embedded Zookeeper for NiFi, question regarding generating 'state' directory</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Configuring-Embedded-ZooKeeper-for-Apache-NiFi-Clusters/m-p/168290#M255016</link>
      <description>&lt;P&gt;Hello one last time, as follow-up to your last comment:&lt;/P&gt;&lt;P&gt;    "If the cluster NCM you are joining this node to already has an existing flow or templates, this node will fail to join because they will not match. NO need to reinstall to fix this if that is the case. Simply delete the flow.xml.gz file and the templates directory before starting it again. When it joins the cluster it will get the current flow and templates from the NCM."   &lt;/P&gt;&lt;P&gt;When the " start" command was originally issued (to accidently make this a standalone configuration)  nothing had been configured - there was no NCM or node specific parameters defined.    Bottomline: There were no other NiFi configurations previously in existence in this environment.   &lt;/P&gt;&lt;P&gt;Thanks again for your great answers and the articles you post to this site. They are very much appreciated.&lt;/P&gt;</description>
      <pubDate>Sun, 29 May 2016 00:36:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Configuring-Embedded-ZooKeeper-for-Apache-NiFi-Clusters/m-p/168290#M255016</guid>
      <dc:creator>pam1</dc:creator>
      <dc:date>2016-05-29T00:36:47Z</dc:date>
    </item>
  </channel>
</rss>

