code: public int getNextHeartbeatInterval() {
      // get the no of task trackers
      int clusterSize = getClusterStatus().getTaskTrackers();
      int heartbeatInterval =  Math.max(
                                  (int)(1000 * HEARTBEATS_SCALING_FACTOR *
                                        Math.ceil((double)clusterSize /
                                                  NUM_HEARTBEATS_IN_SECOND)),
                                  HEARTBEAT_INTERVAL_MIN) ;
      return heartbeatInterval;
    }
docs: Calculates next heartbeat interval using cluster size.
  Heartbeat interval is incremented by 1 second for every 100 nodes by default.
  @return next heartbeat interval.