ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tbeerbo...@apache.org
Subject git commit: AMBARI-7768 - Views: Masked property not encoded on newly created instance
Date Tue, 14 Oct 2014 14:55:16 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk a1bb3bc90 -> a97d5c6f2


AMBARI-7768 - Views: Masked property not encoded on newly created instance


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

Branch: refs/heads/trunk
Commit: a97d5c6f27fbffbbecf2eea7bb9d36d120b8a158
Parents: a1bb3bc
Author: tbeerbower <tbeerbower@hortonworks.com>
Authored: Tue Oct 14 10:54:04 2014 -0400
Committer: tbeerbower <tbeerbower@hortonworks.com>
Committed: Tue Oct 14 10:54:55 2014 -0400

----------------------------------------------------------------------
 .../apache/ambari/server/view/ViewContextImpl.java  |  4 +++-
 .../org/apache/ambari/server/view/ViewRegistry.java | 16 ++++++++--------
 2 files changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a97d5c6f/ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java
b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java
index 0f6cf9f..7fea0d5 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java
@@ -207,7 +207,9 @@ public class ViewContextImpl implements ViewContext, ViewController {
     try {
       viewRegistry.updateViewInstance(viewInstanceEntity);
     } catch (SystemException e) {
-      LOG.error("Caught exception updating the view instance.", e);
+      String msg = "Caught exception updating the view instance.";
+      LOG.error(msg, e);
+      throw new IllegalStateException(msg, e);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/a97d5c6f/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
index d525f46..1e28e62 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
@@ -465,7 +465,7 @@ public class ViewRegistry {
               version + "/" + instanceName);
         }
 
-        SetViewInstanceProperties(instanceEntity, viewEntity.getConfiguration(), viewEntity.getClassLoader());
+        setViewInstanceProperties(instanceEntity, viewEntity.getConfiguration(), viewEntity.getClassLoader());
         instanceEntity.validate(viewEntity);
 
         ResourceTypeEntity resourceTypeEntity = resourceTypeDAO.findByName(ViewEntity.getViewName(viewName,
version));
@@ -520,7 +520,7 @@ public class ViewRegistry {
     ViewEntity viewEntity = getDefinition(instanceEntity.getViewName());
 
     if (viewEntity != null) {
-      SetViewInstanceProperties(instanceEntity, viewEntity.getConfiguration(), viewEntity.getClassLoader());
+      setViewInstanceProperties(instanceEntity, viewEntity.getConfiguration(), viewEntity.getClassLoader());
       instanceEntity.validate(viewEntity);
       instanceDAO.merge(instanceEntity);
     }
@@ -876,7 +876,7 @@ public class ViewRegistry {
     ViewInstanceEntity viewInstanceDefinition =
         new ViewInstanceEntity(viewDefinition, instanceConfig);
 
-    SetViewInstanceProperties(viewInstanceDefinition, instanceConfig, viewConfig, viewDefinition.getClassLoader());
+    setViewInstanceProperties(viewInstanceDefinition, instanceConfig, viewConfig, viewDefinition.getClassLoader());
     viewInstanceDefinition.validate(viewDefinition);
 
     bindViewInstance(viewDefinition, viewInstanceDefinition);
@@ -923,7 +923,7 @@ public class ViewRegistry {
   }
 
   // Set the properties of the given view instance.
-  private void SetViewInstanceProperties(ViewInstanceEntity instanceEntity, ViewConfig viewConfig,
ClassLoader classLoader) throws SystemException {
+  private void setViewInstanceProperties(ViewInstanceEntity instanceEntity, ViewConfig viewConfig,
ClassLoader classLoader) throws SystemException {
 
     Map<String, String> properties = new HashMap<String, String>();
 
@@ -933,22 +933,22 @@ public class ViewRegistry {
     for (ViewInstancePropertyEntity viewInstancePropertyEntity : propertyEntities) {
       properties.put(viewInstancePropertyEntity.getName(), viewInstancePropertyEntity.getValue());
     }
-    SetViewInstanceProperties( instanceEntity,  properties, viewConfig,  classLoader);
+    setViewInstanceProperties(instanceEntity, properties, viewConfig, classLoader);
   }
 
   // Set the properties of the given view instance from the given instance configuration.
-  private void SetViewInstanceProperties(ViewInstanceEntity instanceEntity, InstanceConfig
instanceConfig, ViewConfig viewConfig, ClassLoader classLoader) throws SystemException {
+  private void setViewInstanceProperties(ViewInstanceEntity instanceEntity, InstanceConfig
instanceConfig, ViewConfig viewConfig, ClassLoader classLoader) throws SystemException {
 
     Map<String, String> properties = new HashMap<String, String>();
 
     for (PropertyConfig propertyConfig : instanceConfig.getProperties()) {
       properties.put(propertyConfig.getKey(), propertyConfig.getValue());
     }
-    SetViewInstanceProperties( instanceEntity,  properties, viewConfig,  classLoader);
+    setViewInstanceProperties(instanceEntity, properties, viewConfig, classLoader);
   }
 
   // Set the properties of the given view instance from the given property set.
-  private void SetViewInstanceProperties(ViewInstanceEntity instanceEntity, Map<String,
String> properties, ViewConfig viewConfig, ClassLoader classLoader) throws SystemException
{
+  private void setViewInstanceProperties(ViewInstanceEntity instanceEntity, Map<String,
String> properties, ViewConfig viewConfig, ClassLoader classLoader) throws SystemException
{
     try {
       Masker masker = getMasker(viewConfig.getMaskerClass(classLoader));
 


Mime
View raw message