accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject git commit: ACCUMULO-1830 add an integration test that detects the problem
Date Fri, 01 Nov 2013 17:18:43 GMT
Updated Branches:
  refs/heads/master a974a4ad2 -> 16115f000


ACCUMULO-1830 add an integration test that detects the problem


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

Branch: refs/heads/master
Commit: 16115f000bf9500b38a01462c25ca5458ae1543f
Parents: a974a4a
Author: Eric Newton <eric.newton@gmail.com>
Authored: Fri Nov 1 13:19:04 2013 -0400
Committer: Eric Newton <eric.newton@gmail.com>
Committed: Fri Nov 1 13:19:04 2013 -0400

----------------------------------------------------------------------
 .../java/org/apache/accumulo/master/TabletGroupWatcher.java | 9 +++++++++
 .../main/java/org/apache/accumulo/tserver/TabletServer.java | 5 +++--
 2 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/16115f00/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
b/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
index 32a2ab7..d82ee00 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
@@ -148,6 +148,9 @@ class TabletGroupWatcher extends Daemon {
           if (TableManager.getInstance().getTableState(tls.extent.getTableId().toString())
== null)
             continue;
           
+          if (Master.log.isTraceEnabled())
+            Master.log.trace(tls + " walogs " + tls.walogs.size());
+                    
           // Don't overwhelm the tablet servers with work
           if (unassigned.size() + unloaded > Master.MAX_TSERVER_WORK_CHUNK * currentTServers.size())
{
             flushChanges(destinations, assignments, assigned, assignedToDeadServers, unassigned);
@@ -166,6 +169,8 @@ class TabletGroupWatcher extends Daemon {
           TabletGoalState goal = this.master.getGoalState(tls, mergeStats.getMergeInfo());
           TServerInstance server = tls.getServer();
           TabletState state = tls.getState(currentTServers.keySet());
+          if (Master.log.isTraceEnabled())
+            Master.log.trace("Goal state " + goal + " current " + state);
           stats.update(tableId, state);
           mergeStats.update(tls.extent, state, tls.chopped, !tls.walogs.isEmpty());
           sendChopRequest(mergeStats.getMergeInfo(), state, tls);
@@ -629,6 +634,10 @@ class TabletGroupWatcher extends Daemon {
       for (Entry<KeyExtent,TServerInstance> assignment : assignedOut.entrySet()) {
         if (unassigned.containsKey(assignment.getKey())) {
           if (assignment.getValue() != null) {
+            if (!currentTServers.containsKey(assignment.getValue())) {
+              Master.log.warn("balancer assigned " + assignment.getKey() + " to a tablet
server that is not current " + assignment.getValue() + " ignoring");
+              continue;
+            }
             Master.log.debug(store.name() + " assigning tablet " + assignment);
             assignments.add(new Assignment(assignment.getKey(), assignment.getValue()));
           }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/16115f00/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
index dea817e..2ba25ba 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
@@ -1,5 +1,5 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
+77 * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
@@ -2992,13 +2992,14 @@ public class TabletServer extends AbstractMetricsImpl implements org.apache.accu
   }
 
   public void addLoggersToMetadata(List<DfsLogger> logs, KeyExtent extent, int id)
{
-    log.info("Adding " + logs.size() + " logs for extent " + extent + " as alias " + id);
     if (!this.onlineTablets.containsKey(extent)) {
+      log.info("Not adding " + logs.size() + " logs for extent " + extent + " as alias "
+ id + " tablet is offline");
       // minor compaction due to recovery... don't make updates... if it finishes, there
will be no WALs,
       // if it doesn't, we'll need to do the same recovery with the old files.
       return;
     }
 
+    log.info("Adding " + logs.size() + " logs for extent " + extent + " as alias " + id);
     long now = RelativeTime.currentTimeMillis();
     List<String> logSet = new ArrayList<String>();
     for (DfsLogger log : logs)


Mime
View raw message