public Set<String> getServiceNames() {
    return getServices().stream().map(ServiceInfo::getName).collect(Collectors.toSet());
  }
@return names of each service in the stack
ambari-server/src/main/java/org/apache/ambari/server/state/StackInfo.java