Package org.apache.ambari.server

Examples of org.apache.ambari.server.StackAccessException


        break;
      }
    }

    if (stackInfoResult == null)
      throw new StackAccessException("stackName=" + stackName
          + ", stackVersion=" + version);

    return stackInfoResult;
  }
View Full Code Here


  public PropertyInfo getProperty(String stackName, String version, String serviceName, String propertyName)
      throws AmbariException {
    Set<PropertyInfo> properties = getProperties(stackName, version, serviceName);

    if (properties.size() == 0)
      throw new StackAccessException("stackName=" + stackName
          + ", stackVersion=" + version
          + ", serviceName=" + serviceName
          + ", propertyName=" + propertyName);

    PropertyInfo propertyResult = null;

    for (PropertyInfo property : properties) {
      if (property.getName().equals(propertyName))
        propertyResult = property;
    }

    if (propertyResult == null)
      throw new StackAccessException("stackName=" + stackName
          + ", stackVersion=" + version
          + ", serviceName=" + serviceName
          + ", propertyName=" + propertyName);

    return propertyResult;
View Full Code Here

      throws AmbariException {

    Set<OperatingSystemInfo> operatingSystems = getOperatingSystems(stackName, version);

    if (operatingSystems.size() == 0)
      throw new StackAccessException("stackName=" + stackName
          + ", stackVersion=" + version
          + ", osType=" + osType);

    OperatingSystemInfo resultOperatingSystem = null;

    for (OperatingSystemInfo operatingSystem : operatingSystems) {
      if (operatingSystem.getOsType().equals(osType))
        resultOperatingSystem = operatingSystem;
    }

    if (resultOperatingSystem == null)
      throw new StackAccessException("stackName=" + stackName
          + ", stackVersion=" + version
          + ", osType=" + osType);

    return resultOperatingSystem;
  }
View Full Code Here

    // validate existing
    RepositoryInfo ri = getRepository(stackName, stackVersion, osType, repoId);

    if (!stackRoot.exists())
      throw new StackAccessException("Stack root does not exist.");

    ri.setBaseUrl(newBaseUrl);

    if (null != metainfoDAO) {
      String metaKey = generateRepoMetaKey(stackName, stackVersion, osType,
View Full Code Here

TOP

Related Classes of org.apache.ambari.server.StackAccessException

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.