code: private void handleCheckpointFailure() {
      setCheckpointFailures(checkpointFailures + 1);
      if (checkpointFailures > MAX_CHECKPOINT_FAILURES) {
        LOG.fatal("Standby: Checkpointing - standby failed to checkpoint in "
            + checkpointFailures + " attempts. Aborting");
      } else {
        // We want to give some time for some transition error to recover
        // and DNS caching to expire. This is mainly for small clusters
        // where checkpoint can be very fast. Doesn't hurt if we sleep
        // on large clusters too.
        //
        LOG.info("Sleeping " + CHECKPOINT_SLEEP_BEFORE_RETRY
            + " msecs before retry checkpoints...");
        try {
          Thread.sleep(CHECKPOINT_SLEEP_BEFORE_RETRY);
          return;
        } catch (InterruptedException ie) {
          LOG.warn("Standby: Checkpointing - Thread interrupted"
              + " while sleeping before a retry.", ie);
        }
      }
      FSEditLog.runtime.exit(-1);
    }
docs: If checkpoint fails continuously, we want to abort the standby. We want to
  avoid the situation in which the standby continuously rolls edit log on the
  primary without finalizing checkpoint.