ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject git commit: AMBARI-3701. Reduce logs emitted to report heartbeats from agents (Dmytro Shkvyra via dsen)
Date Wed, 06 Nov 2013 17:01:02 GMT
Updated Branches:
  refs/heads/trunk 5f1637dd2 -> d6176141a


AMBARI-3701. Reduce logs emitted to report heartbeats from agents (Dmytro Shkvyra via dsen)


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

Branch: refs/heads/trunk
Commit: d6176141a9dd0d8ccbdcf4ebb6c678e545c5f21b
Parents: 5f1637d
Author: Dmitry Sen <dsen@hortonworks.com>
Authored: Wed Nov 6 19:00:19 2013 +0200
Committer: Dmitry Sen <dsen@hortonworks.com>
Committed: Wed Nov 6 19:00:32 2013 +0200

----------------------------------------------------------------------
 ambari-server/conf/unix/log4j.properties                         | 4 ++--
 .../java/org/apache/ambari/server/agent/HeartBeatHandler.java    | 4 ++--
 .../java/org/apache/ambari/server/agent/rest/AgentResource.java  | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/d6176141/ambari-server/conf/unix/log4j.properties
----------------------------------------------------------------------
diff --git a/ambari-server/conf/unix/log4j.properties b/ambari-server/conf/unix/log4j.properties
index e47ebdc..6adc56c 100644
--- a/ambari-server/conf/unix/log4j.properties
+++ b/ambari-server/conf/unix/log4j.properties
@@ -23,8 +23,8 @@ log4j.rootLogger=INFO,file
 # Direct log messages to a log file
 log4j.appender.file=org.apache.log4j.RollingFileAppender
 log4j.appender.file.File=/var/log/ambari-server/ambari-server.log
-log4j.appender.file.MaxFileSize=10MB
-log4j.appender.file.MaxBackupIndex=20
+log4j.appender.file.MaxFileSize=80MB
+log4j.appender.file.MaxBackupIndex=60
 log4j.appender.file.layout=org.apache.log4j.PatternLayout
 log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p [%t] %c{1}:%L - %m%n
 

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/d6176141/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 69a86be..d1af55c 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
@@ -120,7 +120,7 @@ public class HeartBeatHandler {
       return createRegisterCommand();
     }
 
-    LOG.info("Received heartbeat from host"
+    LOG.debug("Received heartbeat from host"
         + ", hostname=" + hostname
         + ", currentResponseId=" + currentResponseId
         + ", receivedResponseId=" + heartbeat.getResponseId());
@@ -200,7 +200,7 @@ public class HeartBeatHandler {
         throw new AmbariException("Invalid command report, service: " + service);
       }
       if (actionMetadata.getActions(service.toLowerCase()).contains(report.getRole())) {
-        LOG.info(report.getRole() + " is an action - skip component lookup");
+        LOG.debug(report.getRole() + " is an action - skip component lookup");
       } else {
         try {
           Service svc = cl.getService(service);

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/d6176141/ambari-server/src/main/java/org/apache/ambari/server/agent/rest/AgentResource.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/rest/AgentResource.java
b/ambari-server/src/main/java/org/apache/ambari/server/agent/rest/AgentResource.java
index 071b7da..1aac28e 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/agent/rest/AgentResource.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/agent/rest/AgentResource.java
@@ -106,12 +106,12 @@ public class AgentResource {
     HeartBeatResponse heartBeatResponse;
     try {
       heartBeatResponse = hh.handleHeartBeat(message);
-      LOG.info("Sending heartbeat response with response id " + heartBeatResponse.getResponseId());
       if (LOG.isDebugEnabled()) {
+        LOG.debug("Sending heartbeat response with response id " + heartBeatResponse.getResponseId());
         LOG.debug("Response details " + heartBeatResponse);
       }
     } catch (Exception e) {
-      LOG.info("Error in HeartBeat", e);
+      LOG.warn("Error in HeartBeat", e);
       throw new WebApplicationException(500);
     }
     return heartBeatResponse;


Mime
View raw message