code: public static Long getValidMaxTotalRows(IndexTuningConfig tuningConfig)
    {
      @Nullable final Integer numShards = tuningConfig.numShards;
      @Nullable final Long maxTotalRows = tuningConfig.maxTotalRows;
      if (numShards == null || numShards == -1) {
        return maxTotalRows == null ? IndexTuningConfig.DEFAULT_MAX_TOTAL_ROWS : maxTotalRows;
      } else {
        return null;
      }
    }
docs: Return the valid target partition size. If {@link IndexTuningConfig#numShards} is valid, this returns null.
  Otherwise, this returns {@link IndexTuningConfig#DEFAULT_MAX_TOTAL_ROWS} or the given
  {@link IndexTuningConfig#maxTotalRows}.