Package org.apache.ambari.server

Examples of org.apache.ambari.server.ClusterNotFoundException


      throws AmbariException {
    checkLoaded();
    r.lock();
    try {
      if (!clusters.containsKey(clusterName)) {
        throw new ClusterNotFoundException(clusterName);
      }
      return clusters.get(clusterName);
    } finally {
      r.unlock();
    }
View Full Code Here


  public Cluster getClusterById(long id) throws AmbariException {
    checkLoaded();
    r.lock();
    try {
      if (!clustersById.containsKey(id)) {
        throw new ClusterNotFoundException("clusterID=" + id);
      }
      return clustersById.get(id);
    } finally {
      r.unlock();
    }
View Full Code Here

    checkLoaded();
    r.lock();
    try {
      if (!clusters.containsKey(clusterName)) {
        throw new ClusterNotFoundException(clusterName);
      }
      Cluster cluster = clusters.get(clusterName);
      cluster.setCurrentStackVersion(stackId);
    } finally {
      r.unlock();
View Full Code Here

    r.lock();
    try {
      for (String c : clusterSet) {
        if (c != null) {
          if (!clusters.containsKey(c))
            throw new ClusterNotFoundException(c);
          else
            clusterMap.put(c, clusters.get(c));
        }
      }
    } finally {
View Full Code Here

      throws AmbariException {
    loadClustersAndHosts();
    r.lock();
    try {
      if (!clusters.containsKey(clusterName)) {
        throw new ClusterNotFoundException(clusterName);
      }
      return clusters.get(clusterName);
    } finally {
      r.unlock();
    }
View Full Code Here

  public Cluster getClusterById(long id) throws AmbariException {
    loadClustersAndHosts();
    r.lock();
    try {
      if (!clustersById.containsKey(id)) {
        throw new ClusterNotFoundException("clusterID=" + id);
      }
      return clustersById.get(id);
    } finally {
      r.unlock();
    }
View Full Code Here

    loadClustersAndHosts();
    r.lock();
    try {
      if (!clusters.containsKey(clusterName)) {
        throw new ClusterNotFoundException(clusterName);
      }
      Cluster cluster = clusters.get(clusterName);
      cluster.setCurrentStackVersion(stackId);
    } finally {
      r.unlock();
View Full Code Here

    r.lock();
    try {
      for (String c : clusterSet) {
        if (c != null) {
          if (!clusters.containsKey(c))
            throw new ClusterNotFoundException(c);
          else
            clusterMap.put(c, clusters.get(c));
        }
      }
    } finally {
View Full Code Here

        clustersById.put(cl.getClusterId(), cl);
        clusters.put(cl.getClusterName(), cl);
        if (!clusterHostMap.containsKey(clusterEntity.getClusterName()))
          clusterHostMap.put(clusterEntity.getClusterName(), new HashSet<Host>());
      } else {
        throw new ClusterNotFoundException(clusterName);
      }
    }
    return clusters.get(clusterName);
  }
View Full Code Here

        clustersById.put(cluster.getClusterId(), cluster);
        clusters.put(clusterEntity.getClusterName(), cluster);
        if (!clusterHostMap.containsKey(clusterEntity.getClusterName()))
          clusterHostMap.put(clusterEntity.getClusterName(), new HashSet<Host>());
      } else {
        throw new ClusterNotFoundException("clusterID=" + id);
      }
    }
    return clustersById.get(id);
  }
View Full Code Here

TOP

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

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.