title: namespace image and edit log
body: <p>From the book "<em>Hadoop The Definitive Guide</em>", under the topic <strong>Namenodes and Datanodes</strong> it is mentioned that:</p>
  
  <blockquote>
    <p>The namenode manages the filesystem namespace. It maintains the
    filesystem tree and the metadata for all the files and directories in
    the tree. This information is stored persistently on the local disk in
    the form of two files:  the namespace image and the edit log.</p>
    
    <p>secondary namenode, which despite its name does not act as a namenode.
    Its main role is to periodically merge the namespace image with the
    edit log to prevent the edit log from becoming  too large.</p>
  </blockquote>
  
  <p>I am having some confusion with these files <em>namespace</em> and <em>edit log</em>.</p>
  
  <p>Namespace image is for storing the metadata. </p>
  
  <p>So, my questions are </p>
  
  <ol>
  <li>What is the <strong>edit log</strong>? And what is its role? </li>
  <li>Can you explain the statement "<em>Its main role is to periodically merge the namespace image with the edit log to prevent the edit log from becoming 
  too large</em>."?</li>
  </ol>