accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [1/2] git commit: ACCUMULO-2391 hide warning if it takes just one retry
Date Mon, 24 Feb 2014 16:41:19 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master a74f392ea -> aa61a3379


ACCUMULO-2391 hide warning if it takes just one retry


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

Branch: refs/heads/master
Commit: ec3a160425a8c307e5b4dbe859d29f45377c680c
Parents: 6395840
Author: Eric Newton <eric.newton@gmail.com>
Authored: Mon Feb 24 11:39:44 2014 -0500
Committer: Eric Newton <eric.newton@gmail.com>
Committed: Mon Feb 24 11:39:59 2014 -0500

----------------------------------------------------------------------
 .../org/apache/accumulo/tserver/log/TabletServerLogger.java  | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/ec3a1604/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
index 14905af..d25ee75 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
@@ -237,7 +237,7 @@ public class TabletServerLogger {
     
     int seq = -1;
     
-    int attempt = 0;
+    int attempt = 1;
     boolean success = false;
     while (!success) {
       try {
@@ -285,9 +285,11 @@ public class TabletServerLogger {
           success = (currentLogSet == logSetId.get());
         }
       } catch (DfsLogger.LogClosedException ex) {
-        log.debug("Logs closed while writing, retrying " + (attempt + 1));
+        log.debug("Logs closed while writing, retrying " + attempt);
       } catch (Exception t) {
-        log.error("Unexpected error writing to log, retrying attempt " + (attempt + 1), t);
+        if (attempt != 1) {
+          log.error("Unexpected error writing to log, retrying attempt " + attempt, t);
+        }
         UtilWaitThread.sleep(100);
       } finally {
         attempt++;


Mime
View raw message