You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sm...@apache.org on 2015/09/12 21:42:02 UTC
ambari git commit: AMBARI-13080. Log a WARN/ERROR when invalid
blueprint is POST'ed (smohanty)
Repository: ambari
Updated Branches:
refs/heads/branch-2.1 e7b946a98 -> ffb015f76
AMBARI-13080. Log a WARN/ERROR when invalid blueprint is POST'ed (smohanty)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ffb015f7
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ffb015f7
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ffb015f7
Branch: refs/heads/branch-2.1
Commit: ffb015f768f377b0364d34e196e8aab35fd7c3fd
Parents: e7b946a
Author: Sumit Mohanty <sm...@hortonworks.com>
Authored: Sat Sep 12 12:29:37 2015 -0700
Committer: Sumit Mohanty <sm...@hortonworks.com>
Committed: Sat Sep 12 12:29:37 2015 -0700
----------------------------------------------------------------------
.../server/controller/internal/BlueprintResourceProvider.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/ffb015f7/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java
index f85ec32..5fa6655 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java
@@ -150,7 +150,12 @@ public class BlueprintResourceProvider extends AbstractControllerResourceProvide
ResourceAlreadyExistsException, NoSuchParentResourceException {
for (Map<String, Object> properties : request.getProperties()) {
- createResources(getCreateCommand(properties, request.getRequestInfoProperties()));
+ try {
+ createResources(getCreateCommand(properties, request.getRequestInfoProperties()));
+ }catch(IllegalArgumentException e) {
+ LOG.error("Exception while creating blueprint", e);
+ throw e;
+ }
}
notifyCreate(Resource.Type.Blueprint, request);