private long calculateBSTimeout(int hostCount) {
    final int PARALLEL_BS_COUNT = 20; // bootstrap.py bootstraps 20 hosts in parallel
    final long HOST_BS_TIMEOUT = 300000L; // 5 minutes timeout for a host (average). Same as in bootstrap.py

    return Math.max(HOST_BS_TIMEOUT, HOST_BS_TIMEOUT * hostCount / PARALLEL_BS_COUNT);
  }
Calculates bootstrap timeout as a function of number of hosts.
@return timeout in milliseconds
ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BSRunner.java