private static String[] getVersionComponents(final String version) {
    assert (version != null);
    List<String> list = Splitter.onPattern("[\\.-]").splitToList(version);
    String[] strComps = list.toArray(new String[list.size()]);
    assert (strComps.length > 0);
    String[] comps = new String[strComps.length];
    for (int i = 0; i < strComps.length; ++i) {
      if (StringUtils.isNumeric(strComps[i])) {
        comps[i] = strComps[i];
      } else if (StringUtils.isEmpty(strComps[i])) {
        comps[i] = String.valueOf(VERY_LARGE_NUMBER);
      } else {
        if ("SNAPSHOT".equals(strComps[i])) {
          comps[i] = "-1";
        } else if ("beta".equals(strComps[i])) {
          comps[i] = "-2";
        } else if ("alpha".equals(strComps[i])) {
          comps[i] = "-3";
        } else {
          comps[i] = "-4";
        }
      }
    }
    return comps;
  }
Returns the version components as String objects Examples: "1.4.3" returns ["1", "4", "3"],
"4.5.6-SNAPSHOT" returns ["4", "5", "6", "-1"] "4.5.6-beta" returns ["4", "5", "6", "-2"],
"4.5.6-alpha" returns ["4", "5", "6", "-3"] "4.5.6-UNKNOW" returns ["4", "5", "6", "-4"]
@return the components of the version string
hbase-common/src/main/java/org/apache/hadoop/hbase/util/VersionInfo.java