ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jspei...@apache.org
Subject ambari git commit: AMBARI-11886. return 400 response and good error msg when user attempts to use API to scale a UI provisioned cluster
Date Fri, 12 Jun 2015 17:11:19 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 4987bfa0a -> 80c221bd4


AMBARI-11886.  return 400 response and good error msg when user attempts
               to use API to scale a UI provisioned cluster


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/80c221bd
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/80c221bd
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/80c221bd

Branch: refs/heads/trunk
Commit: 80c221bd407469cdc47de187aa1d65a43be5c3a4
Parents: 4987bfa
Author: John Speidel <jspeidel@hortonworks.com>
Authored: Fri Jun 12 10:35:04 2015 -0400
Committer: John Speidel <jspeidel@hortonworks.com>
Committed: Fri Jun 12 13:11:06 2015 -0400

----------------------------------------------------------------------
 .../org/apache/ambari/server/topology/TopologyManager.java     | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/80c221bd/ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java
b/ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java
index a75cccb..31363b4 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java
@@ -117,7 +117,11 @@ public class TopologyManager {
     String clusterName = request.getClusterName();
     ClusterTopology topology = clusterTopologyMap.get(clusterName);
     if (topology == null) {
-      throw new AmbariException("TopologyManager: Unable to retrieve cluster topology for
cluster: " + clusterName);
+      throw new InvalidTopologyException("Unable to retrieve cluster topology for cluster.
This is most likely a " +
+                                         "result of trying to scale a cluster via the API
which was created using " +
+                                         "the Ambari UI. At this time only clusters created
via the API using a " +
+                                         "blueprint can be scaled with this API.  If the
cluster was originally created " +
+                                         "via the API as described above, please file a Jira
for this matter.");
     }
 
     PersistedTopologyRequest persistedRequest = persistedState.persistTopologyRequest(request);


Mime
View raw message