Updated Branches:
  refs/heads/trunk 978f4cd86 -> a13f2324e

AMBARI-2748. Misc logging changes. (smohanty)


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

Branch: refs/heads/trunk
Commit: a13f2324e1c9989f89d25741c6ef0e42c470d59f
Parents: 978f4cd
Author: Sumit Mohanty <smoha...@hortonworks.com>
Authored: Fri Jul 26 13:58:33 2013 -0700
Committer: Sumit Mohanty <smoha...@hortonworks.com>
Committed: Fri Jul 26 13:58:33 2013 -0700

----------------------------------------------------------------------
 .../server/actionmanager/ActionScheduler.java   |  1 +
 .../ambari/server/agent/HeartBeatHandler.java   |  2 ++
 .../AmbariManagementControllerImpl.java         | 20 ++++++++++++--------
 .../ganglia/GangliaPropertyProvider.java        |  6 ++++--
 4 files changed, 19 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a13f2324/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
index fe62b21..c49cc75 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java
@@ -325,6 +325,7 @@ class ActionScheduler implements Runnable {
               ServiceComponentHost svcCompHost =
                   svcComp.getServiceComponentHost(host);
               svcCompHost.handleEvent(timeoutEvent);
+              LOG.warn("Operation timed out. Role: " + roleStr + ", host: " + 
host);
             } catch (ServiceComponentNotFoundException scnex) {
               LOG.debug("Not a service component, assuming its an action. 
Details: "
                   + scnex.getMessage());

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a13f2324/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
index 1025f83..e82c6ec 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
@@ -223,6 +223,8 @@ public class HeartBeatHandler {
                   hostname, now));
             }
           } else if (report.getStatus().equals("FAILED")) {
+            LOG.warn("Operation failed - may be retried. Service component 
host: "
+                + schName + ", host: " + hostname);
             scHost.handleEvent(new ServiceComponentHostOpFailedEvent(schName,
                 hostname, now));
           } else if (report.getStatus().equals("IN_PROGRESS")) {

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a13f2324/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index 2a1d188..1e2e950 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@ -2775,6 +2775,12 @@ public class AmbariManagementControllerImpl implements
             + " update components");
       }
 
+      LOG.info("Received a updateComponent request"
+          + ", clusterName=" + request.getClusterName()
+          + ", serviceName=" + request.getServiceName()
+          + ", componentName=" + request.getComponentName()
+          + ", request=" + request.toString());
+
       Cluster cluster = clusters.getCluster(request.getClusterName());
 
       if (request.getServiceName() == null
@@ -3139,14 +3145,12 @@ public class AmbariManagementControllerImpl implements
         request.setServiceName(findServiceName(cluster, 
request.getComponentName()));
       }
 
-      if (LOG.isDebugEnabled()) {
-        LOG.debug("Received a updateHostComponent request"
-            + ", clusterName=" + request.getClusterName()
-            + ", serviceName=" + request.getServiceName()
-            + ", componentName=" + request.getComponentName()
-            + ", hostname=" + request.getHostname()
-            + ", request=" + request);
-      }
+      LOG.info("Received a updateHostComponent request"
+          + ", clusterName=" + request.getClusterName()
+          + ", serviceName=" + request.getServiceName()
+          + ", componentName=" + request.getComponentName()
+          + ", hostname=" + request.getHostname()
+          + ", request=" + request);
 
       clusterNames.add(request.getClusterName());
 

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a13f2324/ambari-server/src/main/java/org/apache/ambari/server/controller/ganglia/GangliaPropertyProvider.java
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ganglia/GangliaPropertyProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ganglia/GangliaPropertyProvider.java
index 7db539f..84426b1 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ganglia/GangliaPropertyProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ganglia/GangliaPropertyProvider.java
@@ -365,6 +365,7 @@ public abstract class GangliaPropertyProvider extends 
AbstractPropertyProvider {
    * The information required to make a single RRD request.
    */
   private class RRDRequest {
+    private static final int POPULATION_TIME_UPPER_LIMIT = 5;
     private final String clusterName;
     private final TemporalInfo temporalInfo;
     private final Map<ResourceKey, Set<Resource>> resources = new 
HashMap<ResourceKey, Set<Resource>>();
@@ -458,8 +459,9 @@ public abstract class GangliaPropertyProvider extends 
AbstractPropertyProvider {
         }
         int endTime = convertToNumber(reader.readLine()).intValue();
 
-        if (LOG.isInfoEnabled()) {
-          LOG.info("Ganglia resource population time: " + (endTime - 
startTime));
+        int totalTime = endTime - startTime;
+        if (LOG.isInfoEnabled() && totalTime > POPULATION_TIME_UPPER_LIMIT) {
+          LOG.info("Ganglia resource population time: " + totalTime);
         }
       } catch (IOException e) {
         if (LOG.isErrorEnabled()) {

Reply via email to