ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [16/29] git commit: AMBARI-7085. Configs: audit log scv changes.(mpapirkovskyy)
Date Mon, 01 Sep 2014 11:41:15 GMT
AMBARI-7085. Configs: audit log scv changes.(mpapirkovskyy)


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

Branch: refs/heads/branch-alerts-dev
Commit: 030413409eeabab60bca88dc367e08e895383cc4
Parents: 9c28108
Author: Myroslav Papirkovskyy <mpapyrkovskyy@hortonworks.com>
Authored: Fri Aug 29 20:16:20 2014 +0300
Committer: Myroslav Papirkovskyy <mpapyrkovskyy@hortonworks.com>
Committed: Fri Aug 29 20:16:43 2014 +0300

----------------------------------------------------------------------
 .../controller/internal/ConfigGroupResourceProvider.java     | 2 +-
 .../org/apache/ambari/server/state/cluster/ClusterImpl.java  | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/03041340/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
index e1d73e6..6e13d9c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
@@ -561,7 +561,7 @@ public class ConfigGroupResourceProvider extends
       configGroup.setDescription(request.getDescription());
       configGroup.setTag(request.getTag());
 
-      configLogger.info("Persisting updated Config group, "
+      configLogger.info("Persisting updated Config group"
         + ", clusterName = " + configGroup.getClusterName()
         + ", id = " + configGroup.getId()
         + ", tag = " + configGroup.getTag()

http://git-wip-us.apache.org/repos/asf/ambari/blob/03041340/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
b/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
index 9f88cf7..06f46fe 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
@@ -91,6 +91,8 @@ public class ClusterImpl implements Cluster {
 
   private static final Logger LOG =
     LoggerFactory.getLogger(ClusterImpl.class);
+  private static final Logger configChangeLog =
+    LoggerFactory.getLogger("configchange");
 
   @Inject
   private Clusters clusters;
@@ -1456,6 +1458,12 @@ public class ClusterImpl implements Cluster {
 
     serviceConfigDAO.create(serviceConfigEntity);
 
+    configChangeLog.info("Cluster '{}' changed by: '{}'; service_name='{}' config_group='{}'
config_group_id='{}' " +
+      "version='{}'", getClusterName(), user, serviceName,
+      configGroup==null?"default":configGroup.getName(),
+      configGroup==null?"-1":configGroup.getId(),
+      serviceConfigEntity.getVersion());
+
     ServiceConfigVersionResponse response = new ServiceConfigVersionResponse();
     response.setUserName(user);
     response.setClusterName(getClusterName());


Mime
View raw message