code: static boolean downloadCheckpointFiles(final String nnHostPort,
        final FSImage dstImage, final CheckpointSignature sig,
        final RemoteEditLogManifest manifest) throws IOException {
  
      // Sanity check manifest - these could happen if, eg, someone on the
      // NN side accidentally rmed the storage directories
      if (manifest.getLogs().isEmpty()) {
        throw new IOException("Found no edit logs to download on NN since txid "
            + sig.mostRecentCheckpointTxId);
      }
  
      long expectedTxId = sig.mostRecentCheckpointTxId + 1;
      if (manifest.getLogs().get(0).getStartTxId() != expectedTxId) {
        throw new IOException("Bad edit log manifest (expected txid = "
            + expectedTxId + ": " + manifest);
      }
  
      dstImage.storage.cTime = sig.cTime;
  
      // get fsimage
      boolean downloadImage = true;
      if (sig.mostRecentCheckpointTxId == dstImage.storage
          .getMostRecentCheckpointTxId() &&
          sig.mostRecentCheckpointTxId != -1) {
        downloadImage = false;
        LOG.info("Image has not changed. Will not download image.");
      } else {
        MD5Hash downloadedHash = TransferFsImage
            .downloadImageToStorage(nnHostPort, sig.mostRecentCheckpointTxId,
                dstImage, true);
        dstImage.checkpointUploadDone(sig.mostRecentCheckpointTxId, downloadedHash);
        dstImage.saveDigestAndRenameCheckpointImage(sig.mostRecentCheckpointTxId,
            downloadedHash);
  
      }
  
      // get edits file
      for (RemoteEditLog log : manifest.getLogs()) {
        if (log.inProgress())
          break;
        TransferFsImage.downloadEditsToStorage(nnHostPort, log,
            dstImage.storage);
      }
      return downloadImage;
  
    }
docs: Download <code>fsimage</code> and <code>edits</code>
  files from the name-node.
  @return true if a new image has been downloaded and needs to be loaded
  @throws IOException