You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by js...@apache.org on 2015/06/12 19:11:19 UTC
ambari git commit: AMBARI-11886. return 400 response and good error
msg when user attempts to use API to scale a UI provisioned cluster
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 <js...@hortonworks.com>
Authored: Fri Jun 12 10:35:04 2015 -0400
Committer: John Speidel <js...@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);