code: private void logNetworkErrorSample(ReplicationTask task, Throwable e) {
          long now = System.currentTimeMillis();
          if (now - lastNetworkErrorTime > 10000) {
              lastNetworkErrorTime = now;
              StringBuilder sb = new StringBuilder();
              sb.append("Network level connection to peer ").append(peerId);
              if (task != null) {
                  sb.append(" for task ").append(task.getTaskName());
              }
              sb.append("; retrying after delay");
              logger.error(sb.toString(), e);
          }
      }
docs: We want to retry eagerly, but without flooding log file with tons of error entries.
  As tasks are executed by a pool of threads the error logging multiplies. For example:
  20 threads * 100ms delay == 200 error entries / sec worst case
  Still we would like to see the exception samples, so we print samples at regular intervals.