<?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: namenode HA and hdfs zkfc -formatZK -force in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/namenode-HA-and-hdfs-zkfc-formatZK-force/m-p/303652#M221642</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/59349"&gt;@mike_bronson7&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No need to run "&lt;SPAN&gt;&lt;EM&gt;hdfs zkfc -formatZK -force&lt;/EM&gt;" if you are not changing the hostname of the HDFS components like NameNode, FailoverController or ZooKeeper hosts in the cluster.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The command &lt;STRONG&gt;&lt;EM&gt;"hdfs zkfc -formatZK"&lt;/EM&gt;&lt;/STRONG&gt; is used to initialize the HA state in ZooKeeper.&amp;nbsp;This will create a &lt;STRONG&gt;znode&lt;/STRONG&gt; in ZooKeeper in which the automatic failover system stores its data. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The example below shows the HA &lt;STRONG&gt;znode &lt;/STRONG&gt;output where it stores the name of the Active NN in the cluster.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[zk: localhost:2181(CONNECTED) 3] ls /hadoop-ha/ns1
[ActiveBreadCrumb, ActiveStandbyElectorLock] &amp;lt;=== HA znodes in zookeeper 
[zk: localhost:2181(CONNECTED) 2] get /hadoop-ha/ns1/ActiveBreadCrumb

ns1
namenode39%nightly63x-2.nightly63x.root.hwx.site ?&amp;gt;(?&amp;gt;  &amp;lt;==== Active NN hostname
[zk: localhost:2181(CONNECTED) 3] &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The command&amp;nbsp;"&lt;SPAN&gt;hdfs zkfc -formatZK -force" needs to run after the ZK Service is UP and running post hostname changes.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 19:26:56 GMT</pubDate>
    <dc:creator>PabitraDas</dc:creator>
    <dc:date>2020-09-29T19:26:56Z</dc:date>
    <item>
      <title>namenode HA and hdfs zkfc -formatZK -force</title>
      <link>https://community.cloudera.com/t5/Support-Questions/namenode-HA-and-hdfs-zkfc-formatZK-force/m-p/302766#M221240</link>
      <description>&lt;P&gt;hi all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are performing now the change hostname configuration on production cluster according to the document - &lt;A href="https://docs.cloudera.com/HDPDocuments/Ambari-2.7.0.0/administering-ambari/content/amb_changing_host_names.html" target="_blank"&gt;https://docs.cloudera.com/HDPDocuments/Ambari-2.7.0.0/administering-ambari/content/amb_changing_host_names.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The last stage is talking about – "&lt;EM&gt;in case NameNode HA enabled , then need to run the following command on one of the name node&lt;/EM&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;hdfs zkfc -formatZK -force&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;since we have &lt;EM&gt;active name node&lt;/EM&gt; and&lt;EM&gt; standby name node&lt;/EM&gt; we assume that our namenode is HA enable ?&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="Capture.PNG" style="width: 517px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/28879iD7924DBE30E1541D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but we want to understand&amp;nbsp; what are the risks when doing the following cli on one of the namenode&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;hdfs zkfc -formatZK -force&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is the below command is safety to run without risks ?&lt;/P&gt;</description>
      <pubDate>Sun, 13 Sep 2020 16:17:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/namenode-HA-and-hdfs-zkfc-formatZK-force/m-p/302766#M221240</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2020-09-13T16:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: namenode HA and hdfs zkfc -formatZK -force</title>
      <link>https://community.cloudera.com/t5/Support-Questions/namenode-HA-and-hdfs-zkfc-formatZK-force/m-p/303652#M221642</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/59349"&gt;@mike_bronson7&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No need to run "&lt;SPAN&gt;&lt;EM&gt;hdfs zkfc -formatZK -force&lt;/EM&gt;" if you are not changing the hostname of the HDFS components like NameNode, FailoverController or ZooKeeper hosts in the cluster.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The command &lt;STRONG&gt;&lt;EM&gt;"hdfs zkfc -formatZK"&lt;/EM&gt;&lt;/STRONG&gt; is used to initialize the HA state in ZooKeeper.&amp;nbsp;This will create a &lt;STRONG&gt;znode&lt;/STRONG&gt; in ZooKeeper in which the automatic failover system stores its data. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The example below shows the HA &lt;STRONG&gt;znode &lt;/STRONG&gt;output where it stores the name of the Active NN in the cluster.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[zk: localhost:2181(CONNECTED) 3] ls /hadoop-ha/ns1
[ActiveBreadCrumb, ActiveStandbyElectorLock] &amp;lt;=== HA znodes in zookeeper 
[zk: localhost:2181(CONNECTED) 2] get /hadoop-ha/ns1/ActiveBreadCrumb

ns1
namenode39%nightly63x-2.nightly63x.root.hwx.site ?&amp;gt;(?&amp;gt;  &amp;lt;==== Active NN hostname
[zk: localhost:2181(CONNECTED) 3] &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The command&amp;nbsp;"&lt;SPAN&gt;hdfs zkfc -formatZK -force" needs to run after the ZK Service is UP and running post hostname changes.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:26:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/namenode-HA-and-hdfs-zkfc-formatZK-force/m-p/303652#M221642</guid>
      <dc:creator>PabitraDas</dc:creator>
      <dc:date>2020-09-29T19:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: namenode HA and hdfs zkfc -formatZK -force</title>
      <link>https://community.cloudera.com/t5/Support-Questions/namenode-HA-and-hdfs-zkfc-formatZK-force/m-p/304101#M221882</link>
      <description>&lt;P&gt;you said that not need to run it , but the post that I mentioned say to run it , so what is right&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2020 07:59:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/namenode-HA-and-hdfs-zkfc-formatZK-force/m-p/304101#M221882</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2020-10-09T07:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: namenode HA and hdfs zkfc -formatZK -force</title>
      <link>https://community.cloudera.com/t5/Support-Questions/namenode-HA-and-hdfs-zkfc-formatZK-force/m-p/304142#M221903</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/59349"&gt;@mike_bronson7&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Always stick to the Cloudera documentation. Yes !!! there is no risk in running that command I can understand your reservation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Oct 2020 18:35:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/namenode-HA-and-hdfs-zkfc-formatZK-force/m-p/304142#M221903</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2020-10-10T18:35:47Z</dc:date>
    </item>
  </channel>
</rss>

