Repository: ambari Updated Branches: refs/heads/trunk c01fda450 -> 9e22e1731
AMBARI-8806. Blueprints deployments failing due to missing Cluster ID in ClusterRequest. (rnettleton) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9e22e173 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9e22e173 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9e22e173 Branch: refs/heads/trunk Commit: 9e22e173102f15c2cfb181262fbfa8d8711423d2 Parents: c01fda4 Author: Bob Nettleton <[email protected]> Authored: Thu Dec 18 22:42:22 2014 -0500 Committer: Bob Nettleton <[email protected]> Committed: Thu Dec 18 23:36:38 2014 -0500 ---------------------------------------------------------------------- .../server/controller/AmbariManagementControllerImpl.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/9e22e173/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java index f9f2959..a907276 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java @@ -1149,12 +1149,13 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle // *************************************************** // set any session attributes for this cluster request - Long requestedClusterId = request.getClusterId(); - if (requestedClusterId == null) { - throw new AmbariException("The cluster ID may not be null"); + Cluster cluster; + if (request.getClusterId() == null) { + cluster = clusters.getCluster(request.getClusterName()); + } else { + cluster = clusters.getClusterById(request.getClusterId()); } - Cluster cluster = clusters.getClusterById(request.getClusterId()); if (cluster == null) { throw new AmbariException("The cluster may not be null"); }
