code: @Override
    public void run() {
      long lastUpdate = -1L;
      // Start balancing the clusters
      while (running) {
        try {
          Thread.sleep(updateInterval / 10);
          long now = JobTracker.getClock().getTime();
          if (now - lastUpdate > updateInterval) {
            lastUpdate = now;
            doMoveSlots(clusters);
          }
        } catch (Exception e) {
          LOG.error("Exception while balancing cluster.", e);
        }
      }
    }
docs: Keep moving slots between two clusters according to their runnable tasks.
  These clusters are assumed to run tasktrackers on the same set of machines