code: private void doMerge(CheckpointSignature sig, RemoteEditLogManifest manifest,
        boolean loadImage, FSImage dstImage) throws IOException {
      if (loadImage) { // create an empty namespace if new image
        namesystem = new FSNamesystem(checkpointImage, conf);
        checkpointImage.setFSNamesystem(namesystem);
      }
      assert namesystem.dir.fsImage == checkpointImage;
      checkpointImage.doMerge(sig, manifest, loadImage);
    }
docs: Merge downloaded image and edits and write the new image into current
  storage directory.