accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [1/2] accumulo git commit: ACCUMULO-2696 clairifed error messages in master for balancing and state change.
Date Tue, 27 Jan 2015 21:34:33 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master e4eb80238 -> 868dcd5bf


ACCUMULO-2696 clairifed error messages in master for balancing and state change.


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

Branch: refs/heads/master
Commit: bc72954bc213781e3317ddfe3517c51aa1dd3a21
Parents: e4eb802
Author: Ed Coleman <dev1@etcoleman.com>
Authored: Mon Jan 26 16:30:14 2015 -0500
Committer: Eric C. Newton <eric.newton@gmail.com>
Committed: Tue Jan 27 15:53:07 2015 -0500

----------------------------------------------------------------------
 .../main/java/org/apache/accumulo/master/Master.java | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/bc72954b/server/master/src/main/java/org/apache/accumulo/master/Master.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/Master.java b/server/master/src/main/java/org/apache/accumulo/master/Master.java
index fd0651d..be28bd0 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/Master.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java
@@ -660,7 +660,7 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List
         byte[] data = ZooReaderWriter.getInstance().getData(ZooUtil.getRoot(getInstance())
+ Constants.ZMASTER_GOAL_STATE, null);
         return MasterGoalState.valueOf(new String(data));
       } catch (Exception e) {
-        log.error("Problem getting real goal state: " + e);
+        log.error("Problem getting real goal state from zookeeper: " + e);
         UtilWaitThread.sleep(1000);
       }
   }
@@ -859,14 +859,14 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List
                   if (count == 0)
                     setMasterState(MasterState.UNLOAD_METADATA_TABLETS);
                 }
-                  break;
+                break;
                 case UNLOAD_METADATA_TABLETS: {
                   int count = assignedOrHosted(METADATA_TABLE_ID);
                   log.debug(String.format("There are %d metadata tablets assigned or hosted",
count));
                   if (count == 0)
                     setMasterState(MasterState.UNLOAD_ROOT_TABLET);
                 }
-                  break;
+                break;
                 case UNLOAD_ROOT_TABLET: {
                   int count = assignedOrHosted(METADATA_TABLE_ID);
                   if (count > 0) {
@@ -893,15 +893,20 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List
                       setMasterState(MasterState.STOP);
                   }
                 }
-                  break;
+                break;
                 default:
                   break;
               }
           }
+        }catch(Throwable t) {
+          log.error("Error occurred reading / switching master goal state. Will continue
with attempt to update status", t);
+        }
+
+        try {
           wait = updateStatus();
           eventListener.waitForEvents(wait);
         } catch (Throwable t) {
-          log.error("Error balancing tablets", t);
+          log.error("Error balancing tablets, will wait for " + WAIT_BETWEEN_ERRORS / ONE_SECOND
+ " (seconds) and then retry", t);
           UtilWaitThread.sleep(WAIT_BETWEEN_ERRORS);
         }
       }


Mime
View raw message