Package org.apache.ambari.server

Examples of org.apache.ambari.server.DuplicateResourceException


      if (duplicates.size() == 1) {
        msg = "Attempted to create a host_component which already exists: ";
      } else {
        msg = "Attempted to create host_component's which already exist: ";
      }
      throw new DuplicateResourceException(msg + names.toString());
    }

    // now doing actual work
    for (ServiceComponentHostRequest request : requests) {
      Cluster cluster = clusters.getCluster(request.getClusterName());
View Full Code Here


  public void addCluster(String clusterName)
      throws AmbariException {
    loadClustersAndHosts();

    if (clusters.containsKey(clusterName)) {
      throw new DuplicateResourceException("Attempted to create a Cluster which already exists"
          + ", clusterName=" + clusterName);
    }

    w.lock();
    try {
      if (clusters.containsKey(clusterName)) {
        throw new DuplicateResourceException("Attempted to create a Cluster which already exists"
            + ", clusterName=" + clusterName);
      }
      // retrieve new cluster id
      // add cluster id -> cluster mapping into clustersById
      ClusterEntity clusterEntity = new ClusterEntity();
View Full Code Here

            if (clusterName != null && !clusterName.isEmpty()) {
              Cluster cluster = clusterMap.get(clusterName);

              for (Cluster c : hostClusterMap.get(hostname)) {
                if (c.getClusterName().equals(clusterName)) {
                  throw new DuplicateResourceException("Attempted to create a host which already exists: clusterName=" +
                      clusterName + ", hostName=" + hostname);
                }
              }

              if (!isOsSupportedByClusterStack(cluster, host)) {
View Full Code Here

      Host host = getHost(hostname);
      Cluster cluster = getCluster(clusterName);

      for (Cluster c : hostClusterMap.get(hostname)) {
        if (c.getClusterName().equals(clusterName)) {
          throw new DuplicateResourceException("Attempted to create a host which already exists: clusterName=" +
              clusterName + ", hostName=" + hostname);
        }
      }

      if (!isOsSupportedByClusterStack(cluster, host)) {
View Full Code Here

  @Override
  public synchronized void addCluster(String clusterName)
      throws AmbariException {
    if (clusters.containsKey(clusterName)) {
      throw new DuplicateResourceException("Attempted to create a Cluster which already exists"
          + ", clusterName=" + clusterName);
    }

    // retrieve new cluster id
    // add cluster id -> cluster mapping into clustersById
View Full Code Here

      throw new HostNotFoundException(hostname);
    }

    for (Cluster c : hostClusterMap.get(hostname)) {
      if (c.getClusterName().equals(clusterName)) {
        throw new DuplicateResourceException("Attempted to create a host which already exists: clusterName=" +
            clusterName + ", hostName=" + hostname);
      }
    }

    if (!isOsSupportedByClusterStack(cluster, host)) {
View Full Code Here

  @Override
  public synchronized void addCluster(String clusterName)
      throws AmbariException {
    if (clusters.containsKey(clusterName)) {
      throw new DuplicateResourceException("Attempted to create a Cluster which already exists"
          + ", clusterName=" + clusterName);
    }

    // retrieve new cluster id
    // add cluster id -> cluster mapping into clustersById
View Full Code Here

      throw new HostNotFoundException(hostname);
    }

    for (Cluster c : hostClusterMap.get(hostname)) {
      if (c.getClusterName().equals(clusterName)) {
        throw new DuplicateResourceException("Attempted to create a host which already exists: clusterName=" +
            clusterName + ", hostName=" + hostname);
      }
    }

    if (!isOsSupportedByClusterStack(cluster, host)) {
View Full Code Here

      if (duplicates.size() == 1) {
        msg = "Attempted to create a host_component which already exists: ";
      } else {
        msg = "Attempted to create host_component's which already exist: ";
      }
      throw new DuplicateResourceException(msg + names.toString());
    }

    // now doing actual work
    for (ServiceComponentHostRequest request : requests) {
      Cluster cluster = clusters.getCluster(request.getClusterName());
View Full Code Here

  public void addCluster(String clusterName)
      throws AmbariException {
    loadClustersAndHosts();

    if (clusters.containsKey(clusterName)) {
      throw new DuplicateResourceException("Attempted to create a Cluster which already exists"
          + ", clusterName=" + clusterName);
    }

    w.lock();
    try {
      if (clusters.containsKey(clusterName)) {
        throw new DuplicateResourceException("Attempted to create a Cluster which already exists"
            + ", clusterName=" + clusterName);
      }
      // retrieve new cluster id
      // add cluster id -> cluster mapping into clustersById
      ClusterEntity clusterEntity = new ClusterEntity();
View Full Code Here

TOP

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

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.