public void validateExternalNamenodeHa(ClusterTopology topology) throws InvalidTopologyException {
    Map<String, String> hdfsSite = topology.getConfiguration().getFullProperties().get("hdfs-site");
    Set<String> hosts = topology.getAllHosts();

    for (Map.Entry<String, List<String>> entry: getNameServicesToNameNodes(hdfsSite).entrySet()) {
      String nameService = entry.getKey();
      List<String> nameNodes = entry.getValue();
      for (String nameNode: nameNodes) {
        String address = hdfsSite.get("dfs.namenode.rpc-address." + nameService + "." + nameNode);
        checkValidExternalNameNodeAddress(nameService, nameNode, address, hosts);
      }
    }
  }
Verifies that all respective properties are set for an external NANENODE HA setup
ambari-server/src/main/java/org/apache/ambari/server/topology/validators/NameNodeHaValidator.java