@Override
  public StackReleaseInfo parse(String versionString) {
    String version = "0";
    String build = "0";

    String[] parts = StringUtils.split(versionString, '-');
    if (1 == parts.length) {
      version = parts[0];
    } else if (parts.length > 1) {
      version = parts[0];
      build = parts[1];
    }

    return new StackReleaseInfo(version, "0", build);
  }
This is the default implementation if no stack provides an implementation.
Before this mechanism, Ambari assumed the version was in the format X.X.X.X-YYYY
ambari-server/src/main/java/org/apache/ambari/server/state/repository/DefaultStackVersion.java