code: File syncLog(long stamp, final long startTxId, final URL url, String name, File tmpFile)
        throws IOException {
      final File[] localPaths = new File[] { tmpFile };
  
      // TODO add security if needed.
      LOG.info("Synchronizing log " + name + " from " + url);
      boolean success = false;
      try {
        TransferFsImage.doGetUrl(
            url,
            ImageSet.convertFilesToStreams(localPaths, journalStorage,
                url.toString()), journalStorage, true);
        assert tmpFile.exists();
        success = true;
      } finally {
        if (!success) {
          if (!tmpFile.delete()) {
            LOG.warn("Failed to delete temporary file " + tmpFile);
          }
        }
      }
      return tmpFile;
    }
docs: Synchronize a log segment from another JournalNode. The log is
  downloaded from the provided URL into a temporary location on disk