ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smoha...@apache.org
Subject ambari git commit: AMBARI-13080. Log a WARN/ERROR when invalid blueprint is POST'ed (smohanty)
Date Sat, 12 Sep 2015 19:42:02 GMT
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 <smohanty@hortonworks.com>
Authored: Sat Sep 12 12:29:37 2015 -0700
Committer: Sumit Mohanty <smohanty@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);
 


Mime
View raw message