ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swa...@apache.org
Subject git commit: AMBARI-4893. Avoid printing stacktrace for state machine exceptions. (swagle)
Date Fri, 28 Feb 2014 19:26:36 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 25e74f958 -> 778f59e97


AMBARI-4893. Avoid printing stacktrace for state machine exceptions. (swagle)


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

Branch: refs/heads/trunk
Commit: 778f59e9759cbe5778fd20ebbbb6c51774b721b9
Parents: 25e74f9
Author: Siddharth Wagle <swagle@hortonworks.com>
Authored: Fri Feb 28 10:53:39 2014 -0800
Committer: Siddharth Wagle <swagle@hortonworks.com>
Committed: Fri Feb 28 11:26:19 2014 -0800

----------------------------------------------------------------------
 .../java/org/apache/ambari/server/agent/HeartBeatHandler.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/778f59e9/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 4666a29..b0258a4 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
@@ -358,7 +358,11 @@ public class HeartBeatHandler {
         } catch (ServiceComponentNotFoundException scnex) {
           LOG.warn("Service component not found ", scnex);
         } catch (InvalidStateTransitionException ex) {
-          LOG.warn("State machine exception", ex);
+          if (LOG.isDebugEnabled()) {
+            LOG.warn("State machine exception.", ex);
+          } else {
+            LOG.warn("State machine exception. " + ex.getMessage());
+          }
         }
       }
     }


Mime
View raw message