You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2017/06/12 16:45:50 UTC

[43/50] [abbrv] ambari git commit: AMBARI-19149. Code cleanup: concatenation in debug messages, unnecessary toString calls

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/state/stack/StackRoleCommandOrder.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/StackRoleCommandOrder.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/StackRoleCommandOrder.java
index cda9ab0..93ae810 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/StackRoleCommandOrder.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/StackRoleCommandOrder.java
@@ -161,7 +161,7 @@ public class StackRoleCommandOrder {
 			}
 			depValue = buffer.toString();
 		  }
-		  LOG.debug(depKey + " => " + depValue);
+      LOG.debug("{} => {}", depKey, depValue);
 		}
       }
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java
index b8e57c7..8662958 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java
@@ -54,7 +54,7 @@ public class UpgradePack {
 
   private static final String ALL_VERSIONS = "*";
 
-  private static Logger LOG = LoggerFactory.getLogger(UpgradePack.class);
+  private static final Logger LOG = LoggerFactory.getLogger(UpgradePack.class);
 
   /**
    * Name of the file without the extension, such as upgrade-2.2

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ColocatedGrouping.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ColocatedGrouping.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ColocatedGrouping.java
index b19d72d..18f8cce 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ColocatedGrouping.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ColocatedGrouping.java
@@ -54,7 +54,7 @@ import com.google.gson.JsonPrimitive;
 @XmlType(name="colocated")
 public class ColocatedGrouping extends Grouping {
 
-  private static Logger LOG = LoggerFactory.getLogger(ColocatedGrouping.class);
+  private static final Logger LOG = LoggerFactory.getLogger(ColocatedGrouping.class);
 
   @XmlElement(name="batch")
   public Batch batch;

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConfigUpgradeChangeDefinition.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConfigUpgradeChangeDefinition.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConfigUpgradeChangeDefinition.java
index 452b66a..89b6567 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConfigUpgradeChangeDefinition.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConfigUpgradeChangeDefinition.java
@@ -82,7 +82,7 @@ import com.google.common.base.Objects;
 @XmlAccessorType(XmlAccessType.FIELD)
 public class ConfigUpgradeChangeDefinition {
 
-  private static Logger LOG = LoggerFactory.getLogger(ConfigUpgradeChangeDefinition.class);
+  private static final Logger LOG = LoggerFactory.getLogger(ConfigUpgradeChangeDefinition.class);
 
   /**
    * The key that represents the configuration type to change (ie hdfs-site).

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConfigureTask.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConfigureTask.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConfigureTask.java
index 58d63b3..68dc63f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConfigureTask.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ConfigureTask.java
@@ -60,7 +60,7 @@ import com.google.gson.Gson;
 @XmlType(name="configure")
 public class ConfigureTask extends ServerSideActionTask {
 
-  private static Logger LOG = LoggerFactory.getLogger(ConfigureTask.class);
+  private static final Logger LOG = LoggerFactory.getLogger(ConfigureTask.class);
 
   /**
    * The key that represents the configuration type to change (ie hdfs-site).

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/HostOrderGrouping.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/HostOrderGrouping.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/HostOrderGrouping.java
index 4d5003f..dd2dd02 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/HostOrderGrouping.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/HostOrderGrouping.java
@@ -56,7 +56,7 @@ import com.google.gson.JsonObject;
 public class HostOrderGrouping extends Grouping {
   private static final String TYPE = "type";
   private static final String HOST = "host";
-  private static Logger LOG = LoggerFactory.getLogger(HostOrderGrouping.class);
+  private static final Logger LOG = LoggerFactory.getLogger(HostOrderGrouping.class);
 
   /**
    * Contains the ordered actions to schedule for this grouping.

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RestartGrouping.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RestartGrouping.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RestartGrouping.java
index 0e3b4af..6ad7531 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RestartGrouping.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RestartGrouping.java
@@ -28,7 +28,7 @@ import org.slf4j.LoggerFactory;
 @XmlType(name="restart")
 public class RestartGrouping extends Grouping implements UpgradeFunction {
 
-  private static Logger LOG = LoggerFactory.getLogger(RestartGrouping.class);
+  private static final Logger LOG = LoggerFactory.getLogger(RestartGrouping.class);
 
   @Override
   public Task.Type getFunction() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ServiceCheckGrouping.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ServiceCheckGrouping.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ServiceCheckGrouping.java
index ef1d0c3..61a387f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ServiceCheckGrouping.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ServiceCheckGrouping.java
@@ -50,7 +50,7 @@ import org.slf4j.LoggerFactory;
 @XmlType(name="service-check")
 public class ServiceCheckGrouping extends Grouping {
 
-  private static Logger LOG = LoggerFactory.getLogger(ServiceCheckGrouping.class);
+  private static final Logger LOG = LoggerFactory.getLogger(ServiceCheckGrouping.class);
 
   /**
    * During a Rolling Upgrade, the priority services are ran first, then the remaining services in the cluster.

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/StartGrouping.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/StartGrouping.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/StartGrouping.java
index d27e6d8..9a22789 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/StartGrouping.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/StartGrouping.java
@@ -28,7 +28,7 @@ import org.slf4j.LoggerFactory;
 @XmlType(name="start")
 public class StartGrouping extends Grouping implements UpgradeFunction {
 
-  private static Logger LOG = LoggerFactory.getLogger(StartGrouping.class);
+  private static final Logger LOG = LoggerFactory.getLogger(StartGrouping.class);
 
   @Override
   public Task.Type  getFunction() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/StopGrouping.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/StopGrouping.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/StopGrouping.java
index 44996c8..9a0d956 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/StopGrouping.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/StopGrouping.java
@@ -28,7 +28,7 @@ import org.slf4j.LoggerFactory;
 @XmlType(name="stop")
 public class StopGrouping extends Grouping implements UpgradeFunction {
 
-  private static Logger LOG = LoggerFactory.getLogger(StopGrouping.class);
+  private static final Logger LOG = LoggerFactory.getLogger(StopGrouping.class);
 
   @Override
   public Task.Type getFunction() {

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/TaskWrapperBuilder.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/TaskWrapperBuilder.java b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/TaskWrapperBuilder.java
index 98e8736..23f2557 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/TaskWrapperBuilder.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/TaskWrapperBuilder.java
@@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory;
  */
 public class TaskWrapperBuilder {
 
-  private static Logger LOG = LoggerFactory.getLogger(TaskWrapperBuilder.class);
+  private static final Logger LOG = LoggerFactory.getLogger(TaskWrapperBuilder.class);
 
   /**
    * Creates a collection of task wrappers based on the set of hosts they are allowed to run on

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
index 9704dc5..f9d3cfc 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
@@ -690,8 +690,7 @@ public class ServiceComponentHostImpl implements ServiceComponentHost {
         ServiceComponentHostInstallEvent e =
             (ServiceComponentHostInstallEvent) event;
         if (LOG.isDebugEnabled()) {
-          LOG.debug("Updating live stack version during INSTALL event"
-              + ", new stack version=" + e.getStackId());
+          LOG.debug("Updating live stack version during INSTALL event, new stack version={}", e.getStackId());
         }
       }
     }
@@ -1011,9 +1010,7 @@ public class ServiceComponentHostImpl implements ServiceComponentHost {
   public void handleEvent(ServiceComponentHostEvent event)
       throws InvalidStateTransitionException {
     if (LOG.isDebugEnabled()) {
-      LOG.debug("Handling ServiceComponentHostEvent event,"
-          + " eventType=" + event.getType().name()
-          + ", event=" + event.toString());
+      LOG.debug("Handling ServiceComponentHostEvent event, eventType={}, event={}", event.getType().name(), event);
     }
     State oldState = getState();
     try {
@@ -1045,13 +1042,8 @@ public class ServiceComponentHostImpl implements ServiceComponentHost {
                + ", oldState=" + oldState
                + ", currentState=" + getState());
       if (LOG.isDebugEnabled()) {
-        LOG.debug("ServiceComponentHost transitioned to a new state"
-            + ", serviceComponentName=" + getServiceComponentName()
-            + ", hostName=" + getHostName()
-            + ", oldState=" + oldState
-            + ", currentState=" + getState()
-            + ", eventType=" + event.getType().name()
-            + ", event=" + event);
+        LOG.debug("ServiceComponentHost transitioned to a new state, serviceComponentName={}, hostName={}, oldState={}, currentState={}, eventType={}, event={}",
+          getServiceComponentName(), getHostName(), oldState, getState(), event.getType().name(), event);
       }
     }
   }
@@ -1393,7 +1385,7 @@ public class ServiceComponentHostImpl implements ServiceComponentHost {
           Long groupId = Long.parseLong(overrideEntry.getKey());
           hc.getConfigGroupOverrides().put(groupId, overrideEntry.getValue());
           if (!configGroupMap.containsKey(groupId)) {
-            LOG.debug("Config group does not exist, id = " + groupId);
+            LOG.debug("Config group does not exist, id = {}", groupId);
           }
         }
       }

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintValidatorImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintValidatorImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintValidatorImpl.java
index 4030e3a..1a43b85 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintValidatorImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintValidatorImpl.java
@@ -110,7 +110,7 @@ public class BlueprintValidatorImpl implements BlueprintValidator {
       }
       if (containsSecretReferences) {
         throw new InvalidTopologyException("Secret references are not allowed in blueprints, " +
-          "replace following properties with real passwords:\n" + errorMessage.toString());
+          "replace following properties with real passwords:\n" + errorMessage);
       }
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/topology/tasks/ConfigureClusterTask.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/topology/tasks/ConfigureClusterTask.java b/ambari-server/src/main/java/org/apache/ambari/server/topology/tasks/ConfigureClusterTask.java
index 19d99ad..0ce5982 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/topology/tasks/ConfigureClusterTask.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/topology/tasks/ConfigureClusterTask.java
@@ -35,7 +35,7 @@ import com.google.inject.assistedinject.AssistedInject;
 
 public class ConfigureClusterTask implements Callable<Boolean> {
 
-  private static Logger LOG = LoggerFactory.getLogger(ConfigureClusterTask.class);
+  private static final Logger LOG = LoggerFactory.getLogger(ConfigureClusterTask.class);
 
   private ClusterConfigurationRequest configRequest;
   private ClusterTopology topology;

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/topology/tasks/TopologyHostTask.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/topology/tasks/TopologyHostTask.java b/ambari-server/src/main/java/org/apache/ambari/server/topology/tasks/TopologyHostTask.java
index 82a2f6e..e016ec8 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/topology/tasks/TopologyHostTask.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/topology/tasks/TopologyHostTask.java
@@ -28,7 +28,7 @@ import org.springframework.security.core.context.SecurityContextHolder;
 
 public abstract class TopologyHostTask implements TopologyTask {
 
-  private static Logger LOG = LoggerFactory.getLogger(TopologyHostTask.class);
+  private static final Logger LOG = LoggerFactory.getLogger(TopologyHostTask.class);
 
   ClusterTopology clusterTopology;
   HostRequest hostRequest;
@@ -56,4 +56,4 @@ public abstract class TopologyHostTask implements TopologyTask {
 
   public abstract void runTask();
 
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/topology/validators/ClusterConfigTypeValidator.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/topology/validators/ClusterConfigTypeValidator.java b/ambari-server/src/main/java/org/apache/ambari/server/topology/validators/ClusterConfigTypeValidator.java
index dce38b4..0170186 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/topology/validators/ClusterConfigTypeValidator.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/topology/validators/ClusterConfigTypeValidator.java
@@ -59,7 +59,7 @@ public class ClusterConfigTypeValidator implements TopologyValidator {
       invalidConfigTypes.removeAll(configTypeIntersection);
 
       LOGGER.error("The following config typess are wrong: {}", invalidConfigTypes);
-      throw new InvalidTopologyException("The following configuration types are invalid: " + invalidConfigTypes.toString());
+      throw new InvalidTopologyException("The following configuration types are invalid: " + invalidConfigTypes);
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
index 3f15400..1d277a7 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
@@ -1120,7 +1120,7 @@ public abstract class AbstractUpgradeCatalog implements UpgradeCatalog {
                 }
               }
               if (widgetDescriptor != null) {
-                LOG.debug("Loaded widget descriptor: " + widgetDescriptor);
+                LOG.debug("Loaded widget descriptor: {}", widgetDescriptor);
                 for (Object artifact : widgetDescriptor.values()) {
                   List<WidgetLayout> widgetLayouts = (List<WidgetLayout>) artifact;
                   for (WidgetLayout widgetLayout : widgetLayouts) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java
index 48cf5f6..dee05c3 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/SchemaUpgradeHelper.java
@@ -403,7 +403,7 @@ public class SchemaUpgradeHelper {
       UpgradeCatalog targetUpgradeCatalog = AbstractUpgradeCatalog
         .getUpgradeCatalog(targetVersion);
 
-      LOG.debug("Target upgrade catalog. " + targetUpgradeCatalog);
+      LOG.debug("Target upgrade catalog. {}", targetUpgradeCatalog);
 
       // Read source version from DB
       String sourceVersion = schemaUpgradeHelper.readSourceVersion();

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
index 9632cd1..cc7dcb8 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog222.java
@@ -647,7 +647,7 @@ public class UpgradeCatalog222 extends AbstractUpgradeCatalog {
                   }
                 }
                 if (widgetDescriptor != null) {
-                  LOG.debug("Loaded widget descriptor: " + widgetDescriptor);
+                  LOG.debug("Loaded widget descriptor: {}", widgetDescriptor);
                   for (Object artifact : widgetDescriptor.values()) {
                     List<WidgetLayout> widgetLayouts = (List<WidgetLayout>) artifact;
                     for (WidgetLayout widgetLayout : widgetLayouts) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
index 1f3a99d..aed4adf 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
@@ -328,7 +328,7 @@ public class UpgradeCatalog250 extends AbstractUpgradeCatalog {
               clusterID, "storm_webui");
 
       if (stormServerProcessDefinitionEntity != null) {
-        LOG.info("Removing alert definition : " + stormServerProcessDefinitionEntity.toString());
+        LOG.info("Removing alert definition : " + stormServerProcessDefinitionEntity);
         alertDefinitionDAO.remove(stormServerProcessDefinitionEntity);
       }
 
@@ -336,7 +336,7 @@ public class UpgradeCatalog250 extends AbstractUpgradeCatalog {
         LOG.info("Updating alert definition : " + stormWebAlert.getDefinitionName());
         String source = stormWebAlert.getSource();
         JsonObject sourceJson = new JsonParser().parse(source).getAsJsonObject();
-        LOG.debug("Source before update : " + sourceJson);
+        LOG.debug("Source before update : {}", sourceJson);
 
         JsonObject uriJson = sourceJson.get("uri").getAsJsonObject();
         uriJson.remove("https");
@@ -346,7 +346,7 @@ public class UpgradeCatalog250 extends AbstractUpgradeCatalog {
         uriJson.addProperty("https_property", "{{storm-site/ui.https.keystore.type}}");
         uriJson.addProperty("https_property_value", "jks");
 
-        LOG.debug("Source after update : " + sourceJson);
+        LOG.debug("Source after update : {}", sourceJson);
         stormWebAlert.setSource(sourceJson.toString());
         alertDefinitionDAO.merge(stormWebAlert);
       }
@@ -370,7 +370,7 @@ public class UpgradeCatalog250 extends AbstractUpgradeCatalog {
         LOG.info("Updating alert definition : " + logSearchWebAlert.getDefinitionName());
         String source = logSearchWebAlert.getSource();
         JsonObject sourceJson = new JsonParser().parse(source).getAsJsonObject();
-        LOG.debug("Source before update : " + sourceJson);
+        LOG.debug("Source before update : {}", sourceJson);
 
         JsonObject uriJson = sourceJson.get("uri").getAsJsonObject();
         uriJson.remove("https_property");
@@ -378,7 +378,7 @@ public class UpgradeCatalog250 extends AbstractUpgradeCatalog {
         uriJson.addProperty("https_property", "{{logsearch-env/logsearch_ui_protocol}}");
         uriJson.addProperty("https_property_value", "https");
 
-        LOG.debug("Source after update : " + sourceJson);
+        LOG.debug("Source after update : {}", sourceJson);
         logSearchWebAlert.setSource(sourceJson.toString());
         alertDefinitionDAO.merge(logSearchWebAlert);
       }

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/utils/AmbariPath.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/utils/AmbariPath.java b/ambari-server/src/main/java/org/apache/ambari/server/utils/AmbariPath.java
index 790e0be..4e1d904 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/utils/AmbariPath.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/utils/AmbariPath.java
@@ -22,7 +22,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class AmbariPath {
-  private static Logger LOG = LoggerFactory.getLogger(AmbariPath.class);
+  private static final Logger LOG = LoggerFactory.getLogger(AmbariPath.class);
   
   public static final String AMBARI_SERVER_ROOT_ENV_VARIABLE = "ROOT";
   public static final String rootDirectory = System.getenv(AMBARI_SERVER_ROOT_ENV_VARIABLE);

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/utils/CommandUtils.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/utils/CommandUtils.java b/ambari-server/src/main/java/org/apache/ambari/server/utils/CommandUtils.java
index 296e4d0..af3171d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/utils/CommandUtils.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/utils/CommandUtils.java
@@ -28,7 +28,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class CommandUtils {
-  private static Logger LOG = LoggerFactory.getLogger(CommandUtils.class);
+  private static final Logger LOG = LoggerFactory.getLogger(CommandUtils.class);
 
   /**
    * Converts a collection of commands to {@code}Map{@code} from command.taskId to command.

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/utils/SecretReference.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/utils/SecretReference.java b/ambari-server/src/main/java/org/apache/ambari/server/utils/SecretReference.java
index 2ab9ac5..dfd925d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/utils/SecretReference.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/utils/SecretReference.java
@@ -85,7 +85,7 @@ public class SecretReference {
   }
 
   public static String generateStub(String configType, Long configVersion, String propertyName) {
-    return secretPrefix + ":" + configType + ":" + configVersion.toString() + ":" + propertyName;
+    return secretPrefix + ":" + configType + ":" + configVersion + ":" + propertyName;
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/utils/ShellCommandUtil.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/utils/ShellCommandUtil.java b/ambari-server/src/main/java/org/apache/ambari/server/utils/ShellCommandUtil.java
index 4fcad3d..f6967a0 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/utils/ShellCommandUtil.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/utils/ShellCommandUtil.java
@@ -28,15 +28,15 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
  * Logs OpenSsl command exit code with description
  */
 public class ShellCommandUtil {
-  private static final Log LOG = LogFactory.getLog(ShellCommandUtil.class);
+  private static final Logger LOG = LoggerFactory.getLogger(ShellCommandUtil.class);
   private static final Object WindowsProcessLaunchLock = new Object();
   private static final String PASS_TOKEN = "pass:";
   private static final String KEY_TOKEN = "-key ";

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/utils/StageUtils.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/utils/StageUtils.java b/ambari-server/src/main/java/org/apache/ambari/server/utils/StageUtils.java
index 1d21ccd..9930148 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/utils/StageUtils.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/utils/StageUtils.java
@@ -56,12 +56,12 @@ import org.apache.ambari.server.state.ServiceComponentHost;
 import org.apache.ambari.server.state.svccomphost.ServiceComponentHostInstallEvent;
 import org.apache.ambari.server.topology.TopologyManager;
 import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.codehaus.jackson.JsonGenerationException;
 import org.codehaus.jackson.map.JsonMappingException;
 import org.codehaus.jackson.map.ObjectMapper;
 import org.codehaus.jackson.map.SerializationConfig;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Joiner;
 import com.google.common.collect.Sets;
@@ -74,7 +74,7 @@ public class StageUtils {
   public static final String DEFAULT_RACK = "/default-rack";
   public static final String DEFAULT_IPV4_ADDRESS = "127.0.0.1";
 
-  private static final Log LOG = LogFactory.getLog(StageUtils.class);
+  private static final Logger LOG = LoggerFactory.getLogger(StageUtils.class);
   protected static final String AMBARI_SERVER_HOST = "ambari_server_host";
   protected static final String AMBARI_SERVER_PORT = "ambari_server_port";
   protected static final String AMBARI_SERVER_USE_SSL = "ambari_server_use_ssl";

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/view/HttpImpersonatorImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/HttpImpersonatorImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/view/HttpImpersonatorImpl.java
index fc3f1d0..7e67891 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/view/HttpImpersonatorImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/view/HttpImpersonatorImpl.java
@@ -45,7 +45,7 @@ public class HttpImpersonatorImpl implements HttpImpersonator {
   private ViewContext context;
   private final URLStreamProvider urlStreamProvider;
 
-  private static Logger LOG = LoggerFactory.getLogger(HttpImpersonatorImpl.class);
+  private static final Logger LOG = LoggerFactory.getLogger(HttpImpersonatorImpl.class);
 
   public HttpImpersonatorImpl(ViewContext c) {
     this.context = c;

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/view/ViewAmbariStreamProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewAmbariStreamProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewAmbariStreamProvider.java
index dfa937e..836796a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewAmbariStreamProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewAmbariStreamProvider.java
@@ -55,7 +55,7 @@ public class ViewAmbariStreamProvider implements AmbariStreamProvider {
    */
   private final AmbariManagementController controller;
 
-  private static Logger LOG = LoggerFactory.getLogger(ViewAmbariStreamProvider.class);
+  private static final Logger LOG = LoggerFactory.getLogger(ViewAmbariStreamProvider.class);
 
 
   // ----- Constructor -----------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/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 b62f433..f6a8789 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
@@ -54,14 +54,14 @@ import org.apache.ambari.view.ViewInstanceDefinition;
 import org.apache.ambari.view.cluster.Cluster;
 import org.apache.ambari.view.events.Event;
 import org.apache.ambari.view.events.Listener;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.directory.api.util.Strings;
 import org.apache.hadoop.security.authentication.util.KerberosName;
 import org.apache.hadoop.security.authentication.util.KerberosUtil;
 import org.apache.velocity.VelocityContext;
 import org.apache.velocity.app.Velocity;
 import org.apache.velocity.exception.ParseErrorException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.inject.Guice;
 import com.google.inject.Injector;
@@ -75,7 +75,7 @@ public class ViewContextImpl implements ViewContext, ViewController {
   /**
    * Logger.
    */
-  private static final Log LOG = LogFactory.getLog(ViewContextImpl.class);
+  private static final Logger LOG = LoggerFactory.getLogger(ViewContextImpl.class);
 
   public static final String HADOOP_SECURITY_AUTH_TO_LOCAL = "hadoop.security.auth_to_local";
   public static final String CORE_SITE = "core-site";

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/view/ViewDataMigrationContextImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewDataMigrationContextImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewDataMigrationContextImpl.java
index 0432265..a13b01e 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewDataMigrationContextImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewDataMigrationContextImpl.java
@@ -34,8 +34,8 @@ import org.apache.ambari.view.PersistenceException;
 import org.apache.ambari.view.migration.EntityConverter;
 import org.apache.ambari.view.migration.ViewDataMigrationContext;
 import org.apache.ambari.view.migration.ViewDataMigrationException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeanUtils;
 
 import com.google.inject.Guice;
@@ -50,7 +50,7 @@ public class ViewDataMigrationContextImpl implements ViewDataMigrationContext {
   /**
    * Logger.
    */
-  private static final Log LOG = LogFactory.getLog(ViewDataMigrationContextImpl.class);
+  private static final Logger LOG = LoggerFactory.getLogger(ViewDataMigrationContextImpl.class);
 
   /**
    * The data store of origin(source) view instance with source data.

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/view/ViewDataMigrationUtility.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewDataMigrationUtility.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewDataMigrationUtility.java
index 0c827fe..55f85a7 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewDataMigrationUtility.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewDataMigrationUtility.java
@@ -85,12 +85,12 @@ public class ViewDataMigrationUtility {
     Map<String, Class> originClasses = migrationContext.getOriginEntityClasses();
     Map<String, Class> currentClasses = migrationContext.getCurrentEntityClasses();
     for (Map.Entry<String, Class> originEntity : originClasses.entrySet()) {
-      LOG.debug("Migrating persistence entity " + originEntity.getKey());
+      LOG.debug("Migrating persistence entity {}", originEntity.getKey());
       if (currentClasses.containsKey(originEntity.getKey())) {
         Class entity = currentClasses.get(originEntity.getKey());
         dataMigrator.migrateEntity(originEntity.getValue(), entity);
       } else {
-        LOG.debug("Entity " + originEntity.getKey() + " not found in target view");
+        LOG.debug("Entity {} not found in target view", originEntity.getKey());
         dataMigrator.migrateEntity(originEntity.getValue(), null);
       }
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/view/ViewDirectoryWatcher.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewDirectoryWatcher.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewDirectoryWatcher.java
index 717bc65..a1b984b 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewDirectoryWatcher.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewDirectoryWatcher.java
@@ -40,8 +40,8 @@ import javax.annotation.Nullable;
 
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.utils.Closeables;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Function;
 import com.google.common.collect.Lists;
@@ -68,7 +68,7 @@ public class ViewDirectoryWatcher implements DirectoryWatcher {
 
   private Future<?> watchTask;
 
-  private static Log LOG = LogFactory.getLog(ViewDirectoryWatcher.class);
+  private static final Logger LOG = LoggerFactory.getLogger(ViewDirectoryWatcher.class);
 
   // Callbacks to hook into file processing
   private List<Function<Path, Boolean>> hooks = Lists.newArrayList(Collections.singleton(loggingHook()));

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/view/ViewExtractor.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewExtractor.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewExtractor.java
index 825a6c5..ad1cc52 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewExtractor.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewExtractor.java
@@ -108,13 +108,13 @@ public class ViewExtractor {
               try {
                 String   entryPath = archivePath + File.separator + jarEntry.getName();
 
-                LOG.debug("Extracting " + entryPath);
+                LOG.debug("Extracting {}", entryPath);
 
                 File entryFile = archiveUtility.getFile(entryPath);
 
                 if (jarEntry.isDirectory()) {
 
-                  LOG.debug("Making directory " + entryPath);
+                  LOG.debug("Making directory {}", entryPath);
 
                   if (!entryFile.mkdir()) {
                     msg = "Could not create archive entry directory " + entryPath + ".";
@@ -127,14 +127,14 @@ public class ViewExtractor {
 
                   FileOutputStream fos = archiveUtility.getFileOutputStream(entryFile);
                   try {
-                    LOG.debug("Begin copying from " + jarEntry.getName() + " to "+ entryPath);
+                    LOG.debug("Begin copying from {} to {}", jarEntry.getName(), entryPath);
 
                     byte[] buffer = new byte[BUFFER_SIZE];
                     int n;
                     while((n = jarInputStream.read(buffer)) > -1) {
                       fos.write(buffer, 0, n);
                     }
-                    LOG.debug("Finish copying from " + jarEntry.getName() + " to "+ entryPath);
+                    LOG.debug("Finish copying from {} to {}", jarEntry.getName(), entryPath);
 
                   } finally {
                     fos.flush();

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/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 89b784f..c50276e 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
@@ -578,8 +578,7 @@ public class ViewRegistry {
 
       if (getInstanceDefinition(viewName, version, instanceName) == null) {
         if (LOG.isDebugEnabled()) {
-          LOG.debug("Creating view instance " + viewName + "/" +
-              version + "/" + instanceName);
+          LOG.debug("Creating view instance {}/{}/{}", viewName, version, instanceName);
         }
 
         instanceEntity.validate(viewEntity, Validator.ValidationContext.PRE_CREATE);
@@ -706,8 +705,7 @@ public class ViewRegistry {
   @Transactional
   public void copyPrivileges(ViewInstanceEntity sourceInstanceEntity,
                              ViewInstanceEntity targetInstanceEntity) {
-    LOG.debug("Copy all privileges from " + sourceInstanceEntity.getName() + " to " +
-        targetInstanceEntity.getName());
+    LOG.debug("Copy all privileges from {} to {}", sourceInstanceEntity.getName(), targetInstanceEntity.getName());
     List<PrivilegeEntity> targetInstancePrivileges = privilegeDAO.findByResourceId(targetInstanceEntity.getResource().getId());
     if (targetInstancePrivileges.size() > 0) {
       LOG.warn("Target instance {} already has privileges assigned, these will not be deleted. Manual clean up may be needed", targetInstanceEntity.getName());
@@ -1496,13 +1494,13 @@ public class ViewRegistry {
     ViewEntity persistedView = viewDAO.findByName(viewName);
 
     if (LOG.isDebugEnabled()) {
-      LOG.debug("Syncing view " + viewName + ".");
+      LOG.debug("Syncing view {}.", viewName);
     }
 
     // if the view is not yet persisted ...
     if (persistedView == null) {
       if (LOG.isDebugEnabled()) {
-        LOG.debug("Creating view " + viewName + ".");
+        LOG.debug("Creating view {}.", viewName);
       }
 
       // create an admin resource type to represent this view
@@ -1543,7 +1541,7 @@ public class ViewRegistry {
       }
     }
     if (LOG.isDebugEnabled()) {
-      LOG.debug("Syncing view " + viewName + " complete.");
+      LOG.debug("Syncing view {} complete.", viewName);
     }
   }
 
@@ -1852,14 +1850,13 @@ public class ViewRegistry {
 
   private void migrateDataFromPreviousVersion(ViewEntity viewDefinition, String serverVersion) {
     if (!viewDefinitions.containsKey(viewDefinition.getName())) { // migrate only registered views to avoid recursive calls
-      LOG.debug("Cancel auto migration of not loaded view: " + viewDefinition.getName() + ".");
+      LOG.debug("Cancel auto migration of not loaded view: {}.", viewDefinition.getName());
       return;
     }
     try {
 
       for (ViewInstanceEntity instance : viewDefinition.getInstances()) {
-        LOG.debug("Try to migrate the data from previous version of: " + viewDefinition.getName() + "/" +
-            instance.getInstanceName() + ".");
+        LOG.debug("Try to migrate the data from previous version of: {}/{}.", viewDefinition.getName(), instance.getInstanceName());
         ViewInstanceEntity latestUnregisteredView = getLatestUnregisteredInstance(serverVersion, instance);
 
         if (latestUnregisteredView != null) {
@@ -2246,12 +2243,12 @@ public class ViewRegistry {
               continue;
             }
 
-            LOG.debug("Unregistered extracted view found: " + archiveDir.getPath());
+            LOG.debug("Unregistered extracted view found: {}", archiveDir.getPath());
 
             ViewEntity uViewDefinition = new ViewEntity(uViewConfig, configuration, archiveDir.getPath());
             readViewArchive(uViewDefinition, archiveDir, archiveDir, serverVersion);
             for (ViewInstanceEntity instanceEntity : uViewDefinition.getInstances()) {
-              LOG.debug(uViewDefinition.getName() + " instance found: " + instanceEntity.getInstanceName());
+              LOG.debug("{} instance found: {}", uViewDefinition.getName(), instanceEntity.getInstanceName());
               unregInstancesTimestamps.put(instanceEntity, archiveDir.lastModified());
             }
           }
@@ -2272,10 +2269,10 @@ public class ViewRegistry {
       }
     }
     if (latestPrevInstance != null) {
-      LOG.debug("Previous version of " + instance.getViewEntity().getName() + "/" + instance.getName() + " found: " +
-          latestPrevInstance.getViewEntity().getName() + "/" + latestPrevInstance.getName());
+      LOG.debug("Previous version of {}/{} found: {}/{}",
+        instance.getViewEntity().getName(), instance.getName(), latestPrevInstance.getViewEntity().getName(), latestPrevInstance.getName());
     } else {
-      LOG.debug("Previous version of " + instance.getViewEntity().getName() + "/" + instance.getName() + " not found");
+      LOG.debug("Previous version of {}/{} not found", instance.getViewEntity().getName(), instance.getName());
     }
     return latestPrevInstance;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/main/java/org/apache/ambari/server/view/ViewURLStreamProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewURLStreamProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewURLStreamProvider.java
index 9c44597..349b647 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewURLStreamProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewURLStreamProvider.java
@@ -37,16 +37,16 @@ import org.apache.ambari.view.URLConnectionProvider;
 import org.apache.ambari.view.ViewContext;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.http.client.utils.URIBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Wrapper around an internal URL stream provider.
  */
 public class ViewURLStreamProvider implements org.apache.ambari.view.URLStreamProvider, URLConnectionProvider {
 
-  private static final Log LOG = LogFactory.getLog(ViewContextImpl.class);
+  private static final Logger LOG = LoggerFactory.getLogger(ViewContextImpl.class);
 
   /**
    * The key for the "doAs" header.
@@ -270,7 +270,7 @@ public class ViewURLStreamProvider implements org.apache.ambari.view.URLStreamPr
 
     public HostPortRestrictionHandler(String allowedHostPortsValue) {
       this.allowedHostPortsValue = allowedHostPortsValue;
-      LOG.debug("Proxy restriction will be derived from " + allowedHostPortsValue);
+      LOG.debug("Proxy restriction will be derived from {}", allowedHostPortsValue);
     }
 
     /**
@@ -282,7 +282,7 @@ public class ViewURLStreamProvider implements org.apache.ambari.view.URLStreamPr
      * @return if the host and port combination is allowed
      */
     public boolean allowProxy(String host, String port) {
-      LOG.debug("Checking host " + host + " port " + port + " against allowed list.");
+      LOG.debug("Checking host {} port {} against allowed list.", host, port);
       if (StringUtils.isNotBlank(host)) {
         String hostToCompare = host.trim().toLowerCase();
         if (allowedHostPorts == null) {
@@ -327,13 +327,13 @@ public class ViewURLStreamProvider implements org.apache.ambari.view.URLStreamPr
                 allowed.put(hostAndPort[0], new HashSet<String>());
               }
               allowed.get(hostAndPort[0]).add("*");
-              LOG.debug("Allow proxy to host " + hostAndPort[0] + " and all ports.");
+              LOG.debug("Allow proxy to host {} and all ports.", hostAndPort[0]);
             } else {
               if (!allowed.containsKey(hostAndPort[0])) {
                 allowed.put(hostAndPort[0], new HashSet<String>());
               }
               allowed.get(hostAndPort[0]).add(hostAndPort[1]);
-              LOG.debug("Allow proxy to host " + hostAndPort[0] + " and port " + hostAndPort[1]);
+              LOG.debug("Allow proxy to host {} and port {}", hostAndPort[0], hostAndPort[1]);
             }
           }
         }

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/test/java/org/apache/ambari/server/agent/AgentResourceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/agent/AgentResourceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/agent/AgentResourceTest.java
index c2c548d..38b77da 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/agent/AgentResourceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/agent/AgentResourceTest.java
@@ -75,13 +75,13 @@ import org.apache.ambari.server.state.stack.OsFamily;
 import org.apache.ambari.server.state.svccomphost.ServiceComponentHostImpl;
 import org.apache.ambari.server.topology.PersistedState;
 import org.apache.ambari.server.topology.tasks.ConfigureClusterTaskFactory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
 import org.easymock.EasyMock;
 import org.eclipse.jetty.server.SessionManager;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
@@ -103,7 +103,7 @@ import junit.framework.Assert;
 
 public class AgentResourceTest extends RandomPortJerseyTest {
   static String PACKAGE_NAME = "org.apache.ambari.server.agent.rest";
-  private static Log LOG = LogFactory.getLog(AgentResourceTest.class);
+  private static final Logger LOG = LoggerFactory.getLogger(AgentResourceTest.class);
   protected Client client;
   HeartBeatHandler handler;
   ActionManager actionManager;

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/test/java/org/apache/ambari/server/agent/LocalAgentSimulator.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/agent/LocalAgentSimulator.java b/ambari-server/src/test/java/org/apache/ambari/server/agent/LocalAgentSimulator.java
index 9de1509..366f7b3 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/agent/LocalAgentSimulator.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/agent/LocalAgentSimulator.java
@@ -20,15 +20,15 @@ package org.apache.ambari.server.agent;
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.state.fsm.InvalidStateTransitionException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * The purpose of this class is to simulate the agent.
  */
 public class LocalAgentSimulator implements Runnable {
 
-  private static Log LOG = LogFactory.getLog(HeartBeatHandler.class);
+  private static final Logger LOG = LoggerFactory.getLogger(HeartBeatHandler.class);
 
   private Thread agentThread = null;
   private volatile boolean shouldRun = true;

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/test/java/org/apache/ambari/server/agent/TestActionQueue.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/agent/TestActionQueue.java b/ambari-server/src/test/java/org/apache/ambari/server/agent/TestActionQueue.java
index 0faa311..fb9268e 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/agent/TestActionQueue.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/agent/TestActionQueue.java
@@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory;
 
 public class TestActionQueue {
 
-  private static Logger LOG = LoggerFactory.getLogger(TestActionQueue.class);
+  private static final Logger LOG = LoggerFactory.getLogger(TestActionQueue.class);
 
   private static int threadCount = 100;
   static class ActionQueueOperation implements Runnable {

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java b/ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java
index 7d95ed2..baa9bae 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java
@@ -559,7 +559,7 @@ public class TestHeartbeatHandler {
       handler.handleRegistration(reg);
       fail ("Expected failure for non compatible agent version");
     } catch (AmbariException e) {
-      log.debug("Error:" + e.getMessage());
+      log.debug("Error:{}", e.getMessage());
       Assert.assertTrue(e.getMessage().contains(
           "Cannot register host with non compatible agent version"));
     }
@@ -569,7 +569,7 @@ public class TestHeartbeatHandler {
       handler.handleRegistration(reg);
       fail ("Expected failure for non compatible agent version");
     } catch (AmbariException e) {
-      log.debug("Error:" + e.getMessage());
+      log.debug("Error:{}", e.getMessage());
       Assert.assertTrue(e.getMessage().contains(
           "Cannot register host with non compatible agent version"));
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
index 06f8918..349cb54 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
@@ -587,7 +587,7 @@ public class AmbariMetaInfoTest {
 
     for (List<RepositoryInfo> vals : repos.values()) {
       for (RepositoryInfo repo : vals) {
-        LOG.debug("Dumping repo info : " + repo.toString());
+        LOG.debug("Dumping repo info : {}", repo);
         if (repo.getOsType().equals("centos5")) {
           centos5Cnt.add(repo.getRepoId());
         } else if (repo.getOsType().equals("centos6")) {
@@ -1070,7 +1070,7 @@ public class AmbariMetaInfoTest {
 
               }
             }
-            Assert.assertEquals(failedMetrics.toString() +
+            Assert.assertEquals(failedMetrics +
                 " metrics defined with pointInTime=true for both jmx and ganglia types.",
               0, failedMetrics.size());
           }

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/test/java/org/apache/ambari/server/api/services/PersistServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/PersistServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/PersistServiceTest.java
index b68c666..2950872 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/PersistServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/PersistServiceTest.java
@@ -26,12 +26,12 @@ import org.apache.ambari.server.RandomPortJerseyTest;
 import org.apache.ambari.server.orm.GuiceJpaInitializer;
 import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
 import org.apache.ambari.server.utils.StageUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.codehaus.jettison.json.JSONException;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.inject.AbstractModule;
 import com.google.inject.Guice;
@@ -49,7 +49,7 @@ import junit.framework.Assert;
 
 public class PersistServiceTest extends RandomPortJerseyTest {
   static String PACKAGE_NAME = "org.apache.ambari.server.api.services";
-  private static Log LOG = LogFactory.getLog(PersistServiceTest.class);
+  private static final Logger LOG = LoggerFactory.getLogger(PersistServiceTest.class);
   Injector injector;
   protected Client client;
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/test/java/org/apache/ambari/server/bootstrap/BootStrapResourceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/bootstrap/BootStrapResourceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/bootstrap/BootStrapResourceTest.java
index b99b172..9034162 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/bootstrap/BootStrapResourceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/bootstrap/BootStrapResourceTest.java
@@ -31,11 +31,11 @@ import javax.ws.rs.core.MediaType;
 import org.apache.ambari.server.api.rest.BootStrapResource;
 import org.apache.ambari.server.bootstrap.BSResponse.BSRunStat;
 import org.apache.ambari.server.bootstrap.BootStrapStatus.BSStat;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.inject.AbstractModule;
 import com.google.inject.Guice;
@@ -54,7 +54,7 @@ import junit.framework.Assert;
 public class BootStrapResourceTest extends JerseyTest {
 
   static String PACKAGE_NAME = "org.apache.ambari.server.api.rest";
-  private static Log LOG = LogFactory.getLog(BootStrapResourceTest.class);
+  private static final Logger LOG = LoggerFactory.getLogger(BootStrapResourceTest.class);
   Injector injector;
   BootStrapImpl bsImpl;
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/test/java/org/apache/ambari/server/bootstrap/BootStrapTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/bootstrap/BootStrapTest.java b/ambari-server/src/test/java/org/apache/ambari/server/bootstrap/BootStrapTest.java
index 91ca644..b9da013 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/bootstrap/BootStrapTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/bootstrap/BootStrapTest.java
@@ -28,12 +28,12 @@ import org.apache.ambari.server.api.services.AmbariMetaInfo;
 import org.apache.ambari.server.bootstrap.BootStrapStatus.BSStat;
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.commons.io.FileUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import junit.framework.Assert;
 import junit.framework.TestCase;
@@ -42,7 +42,7 @@ import junit.framework.TestCase;
  * Test BootStrap Implementation.
  */
 public class BootStrapTest extends TestCase {
-  private static Log LOG = LogFactory.getLog(BootStrapTest.class);
+  private static final Logger LOG = LoggerFactory.getLogger(BootStrapTest.class);
   public TemporaryFolder temp = new TemporaryFolder();
 
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
index e10e4cd..3215e72 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
@@ -2054,8 +2054,7 @@ public class AmbariManagementControllerTest {
     boolean foundH2CLT = false;
 
     for (ShortTaskStatus taskStatus : taskStatuses) {
-      LOG.debug("Task dump :"
-          + taskStatus.toString());
+      LOG.debug("Task dump :{}", taskStatus);
       Assert.assertEquals(RoleCommand.INSTALL.toString(),
           taskStatus.getCommand());
       Assert.assertEquals(HostRoleStatus.PENDING.toString(),
@@ -2166,7 +2165,7 @@ public class AmbariManagementControllerTest {
 
     StringBuilder sb = new StringBuilder();
     clusters.debugDump(sb);
-    LOG.info("Cluster Dump: " + sb.toString());
+    LOG.info("Cluster Dump: " + sb);
 
     for (ServiceComponent sc :
       clusters.getCluster(cluster1).getService(serviceName)
@@ -3457,7 +3456,7 @@ public class AmbariManagementControllerTest {
     List<Stage> stages = actionDB.getAllStages(requestId);
 
     for (Stage stage : stages) {
-      LOG.debug("Stage dump: " + stage.toString());
+      LOG.debug("Stage dump: {}", stage);
     }
 
     Assert.assertTrue(!stages.isEmpty());
@@ -3694,7 +3693,7 @@ public class AmbariManagementControllerTest {
     // FIXME check stage count
 
     for (Stage stage : stages) {
-      LOG.debug("Stage dump: " + stage.toString());
+      LOG.debug("Stage dump: {}", stage);
     }
 
     // FIXME verify stages content - execution commands, etc
@@ -3864,7 +3863,7 @@ public class AmbariManagementControllerTest {
     // FIXME check stage count
 
     for (Stage stage : stages) {
-      LOG.debug("Stage dump: " + stage.toString());
+      LOG.debug("Stage dump: {}", stage);
     }
 
     // FIXME verify stages content - execution commands, etc
@@ -5255,7 +5254,7 @@ public class AmbariManagementControllerTest {
       List<HostRoleCommand> hrcs = stage.getOrderedHostRoleCommands();
 
       for (HostRoleCommand hrc : hrcs) {
-        LOG.debug("role: " + hrc.getRole());
+        LOG.debug("role: {}", hrc.getRole());
         if (hrc.getRole().toString().equals("HDFS_CLIENT")) {
           if (hrc.getHostName().equals(host3)) {
             hdfsCmdHost3 = hrc;
@@ -5494,7 +5493,7 @@ public class AmbariManagementControllerTest {
 
     stages = actionDB.getAllStages(trackAction.getRequestId());
     for (Stage s : stages) {
-      LOG.info("Stage dump : " + s.toString());
+      LOG.info("Stage dump : " + s);
     }
     Assert.assertEquals(1, stages.size());
 
@@ -10398,7 +10397,7 @@ public class AmbariManagementControllerTest {
       add(configRequest);
     }});
     for(ConfigurationResponse resp : requestedConfigs) {
-      String secretName = "SECRET:hdfs-site:"+resp.getVersion().toString()+":test.password";
+      String secretName = "SECRET:hdfs-site:"+ resp.getVersion() +":test.password";
       if(resp.getConfigs().containsKey("test.password")) {
         assertEquals(resp.getConfigs().get("test.password"), secretName);
       }

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractJDBCResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractJDBCResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractJDBCResourceProviderTest.java
index 07540bf..6c47ae1 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractJDBCResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractJDBCResourceProviderTest.java
@@ -59,7 +59,7 @@ public class AbstractJDBCResourceProviderTest {
     AbstractJDBCResourceProvider<TestFields> provider = new TestAbstractJDBCResourceProviderImpl(
         requestedIds, null);
     Assert.assertEquals(
-        TestFields.field1.toString() + "," + TestFields.field2.toString(),
+        TestFields.field1 + "," + TestFields.field2,
         provider.getDBFieldString(requestedIds));
     Assert.assertEquals(TestFields.field1.toString(),
         provider.getDBFieldString(Collections.singleton(property1)));

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java
index 7cc6702..89ed022 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java
@@ -385,7 +385,7 @@ public class CredentialResourceProviderTest {
       } else if ("alias3".equals(alias)) {
         Assert.assertEquals(CredentialStoreType.TEMPORARY.name().toLowerCase(), type);
       } else {
-        Assert.fail("Unexpected alias in list: " + alias.toString());
+        Assert.fail("Unexpected alias in list: " + alias);
       }
     }
 
@@ -462,7 +462,7 @@ public class CredentialResourceProviderTest {
       if ("alias1".equals(alias)) {
         Assert.assertEquals(CredentialStoreType.TEMPORARY.name().toLowerCase(), type);
       } else {
-        Assert.fail("Unexpected alias in list: " + alias.toString());
+        Assert.fail("Unexpected alias in list: " + alias);
       }
     }
 
@@ -658,7 +658,7 @@ public class CredentialResourceProviderTest {
       if ("alias1".equals(alias)) {
         Assert.assertEquals(CredentialStoreType.TEMPORARY.name().toLowerCase(), type);
       } else {
-        Assert.fail("Unexpected alias in list: " + alias.toString());
+        Assert.fail("Unexpected alias in list: " + alias);
       }
     }
 
@@ -674,7 +674,7 @@ public class CredentialResourceProviderTest {
       if ("alias1".equals(alias)) {
         Assert.assertEquals(CredentialStoreType.PERSISTED.name().toLowerCase(), type);
       } else {
-        Assert.fail("Unexpected alias in list: " + alias.toString());
+        Assert.fail("Unexpected alias in list: " + alias);
       }
     }
 
@@ -821,7 +821,7 @@ public class CredentialResourceProviderTest {
       if ("alias1".equals(alias)) {
         Assert.assertEquals(CredentialStoreType.TEMPORARY.name().toLowerCase(), type);
       } else {
-        Assert.fail("Unexpected alias in list: " + alias.toString());
+        Assert.fail("Unexpected alias in list: " + alias);
       }
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaMetricTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaMetricTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaMetricTest.java
index 2df730b..7289674 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaMetricTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaMetricTest.java
@@ -88,7 +88,7 @@ public class GangliaMetricTest {
     listTemporalMetrics.add(new GangliaMetric.TemporalMetric("0.0", new Long(17)));
     listTemporalMetrics.add(new GangliaMetric.TemporalMetric("0.0", new Long(18)));
     instance.setDatapointsFromList(listTemporalMetrics);
-    System.out.println(instance.toString());
+    System.out.println(instance);
     assertTrue(instance.getDatapoints().length == 11);
   }  
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/test/java/org/apache/ambari/server/orm/OrmTestHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/OrmTestHelper.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/OrmTestHelper.java
index 550cc9f..271d536 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/OrmTestHelper.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/OrmTestHelper.java
@@ -106,7 +106,7 @@ import com.google.inject.persist.Transactional;
 @Singleton
 public class OrmTestHelper {
 
-  private static Logger LOG = LoggerFactory.getLogger(OrmTestHelper.class);
+  private static final Logger LOG = LoggerFactory.getLogger(OrmTestHelper.class);
 
   private AtomicInteger uniqueCounter = new AtomicInteger();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/RepositoryVersionDAOTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/RepositoryVersionDAOTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/RepositoryVersionDAOTest.java
index 92d8d60..d596084 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/RepositoryVersionDAOTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/dao/RepositoryVersionDAOTest.java
@@ -91,7 +91,7 @@ public class RepositoryVersionDAOTest {
 
     // Assert the version must be unique
     RepositoryVersionEntity dupVersion = new RepositoryVersionEntity();
-    dupVersion.setDisplayName("display name " + uuid.toString());
+    dupVersion.setDisplayName("display name " + uuid);
     dupVersion.setOperatingSystems("repositories");
     dupVersion.setStack(stackEntity);
     dupVersion.setVersion(first.getVersion());

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/test/java/org/apache/ambari/server/security/CertGenerationTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/CertGenerationTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/CertGenerationTest.java
index 784fd86..0ae3001 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/CertGenerationTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/CertGenerationTest.java
@@ -35,14 +35,14 @@ import org.apache.ambari.server.utils.ShellCommandUtil;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.RandomStringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.inject.AbstractModule;
 import com.google.inject.Guice;
@@ -56,7 +56,7 @@ public class CertGenerationTest {
   private static final int PASS_FILE_NAME_LEN = 20;
   private static final float MAX_PASS_LEN = 100;
 
-  private static Log LOG = LogFactory.getLog(CertGenerationTest.class);
+  private static final Logger LOG = LoggerFactory.getLogger(CertGenerationTest.class);
   public static TemporaryFolder temp = new TemporaryFolder();
 
   private static Injector injector;

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/test/java/org/apache/ambari/server/security/SslExecutionTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/SslExecutionTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/SslExecutionTest.java
index f91f5b7..3614be7 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/SslExecutionTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/SslExecutionTest.java
@@ -26,12 +26,12 @@ import java.util.Properties;
 
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.state.stack.OsFamily;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.inject.AbstractModule;
 import com.google.inject.Guice;
@@ -40,7 +40,7 @@ import com.google.inject.Injector;
 
 public class SslExecutionTest {
 
-  private static Log LOG = LogFactory.getLog(SslExecutionTest.class);
+  private static final Logger LOG = LoggerFactory.getLogger(SslExecutionTest.class);
   public TemporaryFolder temp = new TemporaryFolder();
 
   Injector injector;

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/MasterKeyServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/MasterKeyServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/MasterKeyServiceTest.java
index f289c11..5f76072 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/MasterKeyServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/encryption/MasterKeyServiceTest.java
@@ -31,8 +31,6 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.ambari.server.configuration.Configuration;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
@@ -40,6 +38,8 @@ import org.junit.runner.RunWith;
 import org.powermock.core.classloader.annotations.PowerMockIgnore;
 import org.powermock.core.classloader.annotations.PrepareForTest;
 import org.powermock.modules.junit4.PowerMockRunner;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import junit.framework.Assert;
 import junit.framework.TestCase;
@@ -51,7 +51,7 @@ public class MasterKeyServiceTest extends TestCase {
   @Rule
   public TemporaryFolder tmpFolder = new TemporaryFolder();
   private String fileDir;
-  private static final Log LOG = LogFactory.getLog
+  private static final Logger LOG = LoggerFactory.getLogger
       (MasterKeyServiceTest.class);
 
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/test/java/org/apache/ambari/server/state/host/HostTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/host/HostTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/host/HostTest.java
index b85a901..3d8b87d 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/host/HostTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/host/HostTest.java
@@ -56,12 +56,12 @@ import org.apache.ambari.server.state.HostHealthStatus.HealthStatus;
 import org.apache.ambari.server.state.HostState;
 import org.apache.ambari.server.state.MaintenanceState;
 import org.apache.ambari.server.state.StackId;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.inject.Guice;
 import com.google.inject.Injector;
@@ -72,7 +72,7 @@ public class HostTest {
   private Clusters clusters;
   private HostDAO hostDAO;
   private OrmTestHelper helper;
-  private static Log LOG = LogFactory.getLog(HostTest.class);
+  private static final Logger LOG = LoggerFactory.getLogger(HostTest.class);
 
   @Before
    public void setup() throws AmbariException{

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java
index 4dedc2f..dbf0c8f 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java
@@ -78,7 +78,7 @@ import com.google.inject.Inject;
 import com.google.inject.Injector;
 
 public class ServiceComponentHostTest {
-  private static Logger LOG = LoggerFactory.getLogger(ServiceComponentHostTest.class);
+  private static final Logger LOG = LoggerFactory.getLogger(ServiceComponentHostTest.class);
   @Inject
   private Injector injector;
   @Inject
@@ -177,8 +177,7 @@ public class ServiceComponentHostTest {
     try {
       s = c.getService(svc);
     } catch (ServiceNotFoundException e) {
-      LOG.debug("Calling service create"
-          + ", serviceName=" + svc);
+      LOG.debug("Calling service create, serviceName={}", svc);
 
       s = serviceFactory.createNew(c, svc, repositoryVersion);
       c.addService(s);

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/test/java/org/apache/ambari/server/testing/DBInconsistencyTests.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/testing/DBInconsistencyTests.java b/ambari-server/src/test/java/org/apache/ambari/server/testing/DBInconsistencyTests.java
index 506846b..d70adad 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/testing/DBInconsistencyTests.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/testing/DBInconsistencyTests.java
@@ -55,7 +55,7 @@ import com.google.inject.persist.PersistService;
 
 public class DBInconsistencyTests {
 
-  private static Logger LOG = LoggerFactory.getLogger(DBInconsistencyTests.class);
+  private static final Logger LOG = LoggerFactory.getLogger(DBInconsistencyTests.class);
 
   @Inject
   private Injector injector;

http://git-wip-us.apache.org/repos/asf/ambari/blob/219f2234/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeTest.java b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeTest.java
index e311fea..207e958 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeTest.java
@@ -193,7 +193,7 @@ public class UpgradeTest {
     UpgradeCatalog targetUpgradeCatalog = AbstractUpgradeCatalog
         .getUpgradeCatalog(targetVersion);
 
-    LOG.debug("Target upgrade catalog. " + targetUpgradeCatalog);
+    LOG.debug("Target upgrade catalog. {}", targetUpgradeCatalog);
 
     // Read source version from DB
     String sourceVersion = schemaUpgradeHelper.readSourceVersion();