<?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 Secondary NameNode performs checkpoint i.e. once it writes the updated fsimage to NameNode, does the old fsimage file gets deleted? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/When-Secondary-NameNode-performs-checkpoint-i-e-once-it/m-p/118493#M17182</link>
    <description>&lt;P&gt;This answer quotes a lot of Apache documentation on the &lt;A href="https://hadoop.apache.org/docs/r2.4.1/hadoop-project-dist/hadoop-hdfs/HdfsUserGuide.html#Checkpoint_Node"&gt;CheckpointNode&lt;/A&gt;.  The Checkpoint Node has never been used in HDP deployments, and I have not personally encountered it in other distros either.  A modern HA deployment will use &lt;A href="https://hadoop.apache.org/docs/r2.4.1/hadoop-project-dist/hadoop-hdfs/HDFSHighAvailabilityWithQJM.html"&gt;NameNode HA using QuorumJournalManager&lt;/A&gt;.  A non-HA deployment will run the &lt;A href="https://hadoop.apache.org/docs/r2.4.1/hadoop-project-dist/hadoop-hdfs/HdfsUserGuide.html#Secondary_NameNode"&gt;SecondaryNameNode&lt;/A&gt;, which is slightly different from the CheckpointNode.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Feb 2016 02:00:01 GMT</pubDate>
    <dc:creator>cnauroth</dc:creator>
    <dc:date>2016-02-04T02:00:01Z</dc:date>
    <item>
      <title>When Secondary NameNode performs checkpoint i.e. once it writes the updated fsimage to NameNode, does the old fsimage file gets deleted?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/When-Secondary-NameNode-performs-checkpoint-i-e-once-it/m-p/118486#M17175</link>
      <description>&lt;P&gt;When Secondary NameNode performs checkpoint i.e. once it writes the updated fsimage to NameNode, does the old fsimage file gets deleted?&lt;/P&gt;</description>
      <pubDate>Sat, 30 Jan 2016 20:43:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/When-Secondary-NameNode-performs-checkpoint-i-e-once-it/m-p/118486#M17175</guid>
      <dc:creator>clouderazone</dc:creator>
      <dc:date>2016-01-30T20:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: When Secondary NameNode performs checkpoint i.e. once it writes the updated fsimage to NameNode, does the old fsimage file gets deleted?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/When-Secondary-NameNode-performs-checkpoint-i-e-once-it/m-p/118487#M17176</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2426/avinash-c005.html" nodeid="2426"&gt;@Avinash C&lt;/A&gt;
&lt;/P&gt;&lt;P&gt; See this description&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"The secondary NameNode merges the fsimage and the edits log files periodically and keeps edits log size within a limit. It is usually run on a different machine than the primary NameNode since its memory requirements are on the same order as the primary NameNode."&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The Checkpoint node periodically creates checkpoints of the namespace. It downloads fsimage and edits from the active NameNode, merges them locally, and uploads the new image back to the active NameNode. The Checkpoint node usually runs on a different machine than the NameNode since its memory requirements are on the same order as the NameNode. The Checkpoint node is started by bin/hdfs namenode -checkpoint on the node specified in the configuration file.&lt;/P&gt;&lt;P&gt;The location of the Checkpoint (or Backup) node and its accompanying web interface are configured via the dfs.namenode.backup.address and dfs.namenode.backup.http-addressconfiguration variables.&lt;/P&gt;&lt;P&gt;The start of the checkpoint process on the Checkpoint node is controlled by two configuration parameters.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;dfs.namenode.checkpoint.period, set to 1 hour by default, specifies the maximum delay between two consecutive checkpoints&lt;/LI&gt;&lt;LI&gt;dfs.namenode.checkpoint.txns, set to 1 million by default, defines the number of uncheckpointed transactions on the NameNode which will force an urgent checkpoint, even if the checkpoint period has not been reached.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The Checkpoint node stores the latest checkpoint in a directory that is structured the same as the NameNode's directory. This allows the checkpointed image to be always available for reading by the NameNode if necessary. See Import checkpoint.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Jan 2016 20:51:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/When-Secondary-NameNode-performs-checkpoint-i-e-once-it/m-p/118487#M17176</guid>
      <dc:creator>nsabharwal</dc:creator>
      <dc:date>2016-01-30T20:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: When Secondary NameNode performs checkpoint i.e. once it writes the updated fsimage to NameNode, does the old fsimage file gets deleted?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/When-Secondary-NameNode-performs-checkpoint-i-e-once-it/m-p/118488#M17177</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2426/avinash-c005.html" nodeid="2426"&gt;@Avinash C&lt;/A&gt;  Details &lt;A target="_blank" href="https://hadoop.apache.org/docs/r2.4.1/hadoop-project-dist/hadoop-hdfs/HdfsUserGuide.html#Secondary_NameNode"&gt;link&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Jan 2016 20:54:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/When-Secondary-NameNode-performs-checkpoint-i-e-once-it/m-p/118488#M17177</guid>
      <dc:creator>nsabharwal</dc:creator>
      <dc:date>2016-01-30T20:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: When Secondary NameNode performs checkpoint i.e. once it writes the updated fsimage to NameNode, does the old fsimage file gets deleted?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/When-Secondary-NameNode-performs-checkpoint-i-e-once-it/m-p/118489#M17178</link>
      <description>&lt;P&gt;Thanks Neeraj for details explanation of check-pointing. However I just wanted to know what happens with the old fsimage file stored in NameNode i.e. does it get replaced with new fsimage or does it maintain the old and new fsimage as well? &lt;/P&gt;</description>
      <pubDate>Sat, 30 Jan 2016 21:02:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/When-Secondary-NameNode-performs-checkpoint-i-e-once-it/m-p/118489#M17178</guid>
      <dc:creator>clouderazone</dc:creator>
      <dc:date>2016-01-30T21:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: When Secondary NameNode performs checkpoint i.e. once it writes the updated fsimage to NameNode, does the old fsimage file gets deleted?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/When-Secondary-NameNode-performs-checkpoint-i-e-once-it/m-p/118490#M17179</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/2426/avinash-c005.html" nodeid="2426"&gt;@Avinash C&lt;/A&gt;&lt;P&gt;Yes , new fsimage &lt;/P&gt;&lt;P&gt;old fsimage + edit logs = new fsimage &lt;/P&gt;</description>
      <pubDate>Sat, 30 Jan 2016 21:15:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/When-Secondary-NameNode-performs-checkpoint-i-e-once-it/m-p/118490#M17179</guid>
      <dc:creator>nsabharwal</dc:creator>
      <dc:date>2016-01-30T21:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: When Secondary NameNode performs checkpoint i.e. once it writes the updated fsimage to NameNode, does the old fsimage file gets deleted?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/When-Secondary-NameNode-performs-checkpoint-i-e-once-it/m-p/118491#M17180</link>
      <description>&lt;P&gt;See this explanation. &lt;/P&gt;&lt;P&gt;&lt;EM&gt;When the NameNode starts up, it reads the FsImage and EditLog from disk, applies all the transactions from the EditLog to the in-memory representation of the FsImage, and flushes out this new version into a new FsImage on disk. It can then truncate the old EditLog because its transactions have been applied to the persistent FsImage. This process is called a checkpoint&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Jan 2016 21:16:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/When-Secondary-NameNode-performs-checkpoint-i-e-once-it/m-p/118491#M17180</guid>
      <dc:creator>nsabharwal</dc:creator>
      <dc:date>2016-01-30T21:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: When Secondary NameNode performs checkpoint i.e. once it writes the updated fsimage to NameNode, does the old fsimage file gets deleted?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/When-Secondary-NameNode-performs-checkpoint-i-e-once-it/m-p/118492#M17181</link>
      <description>&lt;P&gt;Thanks Neeraj, appreciate your response&lt;/P&gt;</description>
      <pubDate>Sat, 30 Jan 2016 21:42:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/When-Secondary-NameNode-performs-checkpoint-i-e-once-it/m-p/118492#M17181</guid>
      <dc:creator>clouderazone</dc:creator>
      <dc:date>2016-01-30T21:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: When Secondary NameNode performs checkpoint i.e. once it writes the updated fsimage to NameNode, does the old fsimage file gets deleted?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/When-Secondary-NameNode-performs-checkpoint-i-e-once-it/m-p/118493#M17182</link>
      <description>&lt;P&gt;This answer quotes a lot of Apache documentation on the &lt;A href="https://hadoop.apache.org/docs/r2.4.1/hadoop-project-dist/hadoop-hdfs/HdfsUserGuide.html#Checkpoint_Node"&gt;CheckpointNode&lt;/A&gt;.  The Checkpoint Node has never been used in HDP deployments, and I have not personally encountered it in other distros either.  A modern HA deployment will use &lt;A href="https://hadoop.apache.org/docs/r2.4.1/hadoop-project-dist/hadoop-hdfs/HDFSHighAvailabilityWithQJM.html"&gt;NameNode HA using QuorumJournalManager&lt;/A&gt;.  A non-HA deployment will run the &lt;A href="https://hadoop.apache.org/docs/r2.4.1/hadoop-project-dist/hadoop-hdfs/HdfsUserGuide.html#Secondary_NameNode"&gt;SecondaryNameNode&lt;/A&gt;, which is slightly different from the CheckpointNode.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 02:00:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/When-Secondary-NameNode-performs-checkpoint-i-e-once-it/m-p/118493#M17182</guid>
      <dc:creator>cnauroth</dc:creator>
      <dc:date>2016-02-04T02:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: When Secondary NameNode performs checkpoint i.e. once it writes the updated fsimage to NameNode, does the old fsimage file gets deleted?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/When-Secondary-NameNode-performs-checkpoint-i-e-once-it/m-p/118494#M17183</link>
      <description>&lt;P&gt;The prior answer does not actually answer the original stated question.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;When Secondary NameNode performs checkpoint i.e. once it writes the updated fsimage to NameNode, does the old fsimage file gets deleted?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Yes, old fsimage files get deleted.  However, a certain number of prior fsimage files will be retained.  The exact number to retain is controlled by configuration property dfs.namenode.num.checkpoints.retained in hdfs-site.xml.  If unspecified, then the default value is 2.&lt;/P&gt;&lt;PRE&gt;&amp;lt;property&amp;gt;
  &amp;lt;name&amp;gt;dfs.namenode.num.checkpoints.retained&amp;lt;/name&amp;gt;
  &amp;lt;value&amp;gt;2&amp;lt;/value&amp;gt;
  &amp;lt;description&amp;gt;The number of image checkpoint files (fsimage_*) that will be retained by
  the NameNode and Secondary NameNode in their storage directories. All edit
  logs (stored on edits_* files) necessary to recover an up-to-date namespace from the oldest retained
  checkpoint will also be retained.
  &amp;lt;/description&amp;gt;
&amp;lt;/property&amp;gt;&lt;/PRE&gt;&lt;P&gt;The reason for retaining a few prior fsimage files is that it can be useful for post-mortem troubleshooting or in some disastrous cases as a way to restore a cluster to a prior state.  (However, restoring an old fsimage will cause loss of all data that was saved after that checkpoint, so this is not standard operating procedure.)&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 02:04:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/When-Secondary-NameNode-performs-checkpoint-i-e-once-it/m-p/118494#M17183</guid>
      <dc:creator>cnauroth</dc:creator>
      <dc:date>2016-02-04T02:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: When Secondary NameNode performs checkpoint i.e. once it writes the updated fsimage to NameNode, does the old fsimage file gets deleted?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/When-Secondary-NameNode-performs-checkpoint-i-e-once-it/m-p/118495#M17184</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/users/2426/avinash-c005.html"&gt;@Avinash C&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The process of checkpointing is to merge the old fsimage and edits logs to create a checkpoint file. This file is named something like - "fsimage.ckpt_*". &lt;/P&gt;&lt;P&gt;If the checkpointing is successful, then the  fsimage.ckpt_* file gets renamed. Internally, the "fsimage.ckpt_*" file is first validated and verified by namenode and then these are renamed to new "fsimage". &lt;/P&gt;&lt;P&gt;If on the other hand, the "fsimage.ckpt_*" are found to be invalid by namenode, then these are not renamed and they stay in the namenode directory.  This can later be used for understanding the reason for file to be invalid.&lt;/P&gt;&lt;P&gt;An example of "fsimage.ckpt_*" getting invalid can be, if the namenode got killed while checkpointing was in  progress, before renaming the "fsimage.ckpt_*" file to actual fsimage  file. This will leave the checkpointing as incomplete and on next NN start ( or checkpoinintg ), it will start the checkpointing again by loading the previous fsimage and applying rest of the edits. &lt;/P&gt;&lt;P&gt;It will not use the last "fsimage.ckpt_*" file. &lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2016 17:34:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/When-Secondary-NameNode-performs-checkpoint-i-e-once-it/m-p/118495#M17184</guid>
      <dc:creator>PARTOMIA</dc:creator>
      <dc:date>2016-04-27T17:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: When Secondary NameNode performs checkpoint i.e. once it writes the updated fsimage to NameNode, does the old fsimage file gets deleted?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/When-Secondary-NameNode-performs-checkpoint-i-e-once-it/m-p/118496#M17185</link>
      <description>&lt;P&gt;Hi Chris, my cluster was hacked and the HDFS data was deleted (includ /user/ and the trash files). I can see in /hadoop/hdfs/namenode the fsimage_ file before the deletes were applied. Could you explain how I would go about reverting to the older fsimage_ file? &lt;/P&gt;</description>
      <pubDate>Sun, 08 Jan 2017 20:01:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/When-Secondary-NameNode-performs-checkpoint-i-e-once-it/m-p/118496#M17185</guid>
      <dc:creator>mph</dc:creator>
      <dc:date>2017-01-08T20:01:48Z</dc:date>
    </item>
  </channel>
</rss>

