Package org.apache.ambari.server.state.stack

Examples of org.apache.ambari.server.state.stack.StackMetainfoXml$Version


  }
 
  public static Version toWGAVersion(VersionCompliance versionCompliance) {
    if (versionCompliance != null) {
      if (versionCompliance.getKey().equals(VERSIONCOMPLIANCE_WGA3)) {
        return new Version(3, 0, 0);
      } else if (versionCompliance.getKey().equals(VERSIONCOMPLIANCE_WGA4)) {
        return new Version(4, 0, 0);
      } else if (versionCompliance.getKey().equals(VERSIONCOMPLIANCE_WGA41)) {
        return new Version(4, 1, 0);
      } else if (versionCompliance.getKey().equals(VERSIONCOMPLIANCE_WGA50)) {
        return new Version(5, 0 ,0);
      } else if (versionCompliance.getKey().equals(VERSIONCOMPLIANCE_WGA51)) {
                return new Version(5, 1 ,0);
            } else if (versionCompliance.getKey().equals(VERSIONCOMPLIANCE_WGA52)) {
                return new Version(5, 2 ,0);
            } else if (versionCompliance.getKey().equals(VERSIONCOMPLIANCE_WGA53)) {
                return new Version(5, 3 ,0);
            } else if (versionCompliance.getKey().equals(VERSIONCOMPLIANCE_WGA54)) {
                return new Version(5, 4 ,0);
            }
    }
    return null;
  }
View Full Code Here


        bean.setUniqueName(sValue)
        update(bean);
        break;
      case 1:
        try {       
          bean.setVersion(new Version((String)value));
          update(bean);
        } catch (RuntimeException e) {
          // unparsable version
            throw new IllegalArgumentException("Unparseable plugin version");
        }
View Full Code Here

      if (LOG.isDebugEnabled()) {
        LOG.debug("Reading stack version metainfo from file "
            + stackMetainfoFile.getAbsolutePath());
      }
     
      StackMetainfoXml smx = unmarshal(StackMetainfoXml.class, stackMetainfoFile);
     
      stackInfo.setMinUpgradeVersion(smx.getVersion().getUpgrade());
      stackInfo.setActive(smx.getVersion().isActive());
      stackInfo.setParentStackVersion(smx.getExtends());
      String rcoFileLocation = stackVersionFolder.getAbsolutePath() + File.separator + AmbariMetaInfo.RCO_FILE_NAME;
      if (new File(rcoFileLocation).exists())
        stackInfo.setRcoFileLocation(rcoFileLocation);
    }
View Full Code Here

TOP

Related Classes of org.apache.ambari.server.state.stack.StackMetainfoXml$Version

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.