code: private static int getMapCount(int srcCount, int numNodes) {
      int numMaps = (int)(srcCount / OP_PER_MAP);
      numMaps = Math.min(numMaps, numNodes * MAX_MAPS_PER_NODE);
      return Math.max(numMaps, 1);
    }
docs: Calculate how many maps to run.