public static int compareVersions(String version1, String version2) {
    return compareVersions(version1, version2, 0);
  }
Compares two versions strings of the form N.N.N.N

@param version1
         the first operand. If set to {@value #DEV_VERSION}
         then this will always return {@code 0)}
@param version2
         the second operand.
@return 0 if both are equal, -1 if first one is lower, +1 otherwise
ambari-server-spi/src/main/java/org/apache/ambari/server/utils/VersionUtils.java