public static List<NameService> fromConfig(ConfigHelper config, Cluster cluster) {
    return nameServiceIds(config, cluster).stream()
      .map(nameServiceId -> nameService(nameServiceId, config, cluster))
      .collect(Collectors.toList());
  }
NameNodes in this nameservice.
The minimum number of NameNodes for HA is two, but more can be configured.
ambari-server/src/main/java/org/apache/ambari/server/stack/NameService.java