You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2014/02/28 20:26:36 UTC

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

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 <sw...@hortonworks.com>
Authored: Fri Feb 28 10:53:39 2014 -0800
Committer: Siddharth Wagle <sw...@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());
+          }
         }
       }
     }