accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhava...@apache.org
Subject [02/10] git commit: ACCUMULO-2450 Backport of ACCUMULO-2438 to 1.4: ensure that we watch separate sets of tables for merges (cherry picked from commit 12b53b043b60368fb647db9c0a15916171d4504b)
Date Tue, 11 Mar 2014 16:19:58 GMT
ACCUMULO-2450 Backport of ACCUMULO-2438 to 1.4: ensure that we watch separate sets of tables
for merges
(cherry picked from commit 12b53b043b60368fb647db9c0a15916171d4504b)

Original authors: Eric Newton (1.6+), Josh Elser (1.5 backport)

This backport does not include the new DeleteRowsTest, as no location for it is obvious
under the 1.4 development branch.

Conflicts:
	src/server/src/main/java/org/apache/accumulo/server/master/Master.java


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

Branch: refs/heads/1.5.2-SNAPSHOT
Commit: 117dce76568bbe6355eae2ca058bdc3f81e53578
Parents: 6faac42
Author: Josh Elser <elserj@apache.org>
Authored: Sun Mar 9 23:34:18 2014 -0400
Committer: Bill Havanki <bhavanki@cloudera.com>
Committed: Tue Mar 11 11:54:47 2014 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/accumulo/server/master/Master.java | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/117dce76/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
----------------------------------------------------------------------
diff --git a/src/server/src/main/java/org/apache/accumulo/server/master/Master.java b/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
index aa8305b..fb7be51 100644
--- a/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
+++ b/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
@@ -1293,9 +1293,10 @@ public class Master implements LiveTServerSet.Listener, LoggerWatcher,
TableObse
         int unloaded = 0;
         try {
           Map<Text,MergeStats> mergeStatsCache = new HashMap<Text,MergeStats>();
+          Map<Text,MergeStats> currentMerges = new HashMap<Text,MergeStats>();
           for (MergeInfo merge : merges()) {
             if (merge.getRange() != null) {
-              mergeStatsCache.put(merge.getRange().getTableId(), new MergeStats(merge));
+              currentMerges.put(merge.getRange().getTableId(), new MergeStats(merge));
             }
           }
           
@@ -1341,7 +1342,11 @@ public class Master implements LiveTServerSet.Listener, LoggerWatcher,
TableObse
             Text tableId = tls.extent.getTableId();
             MergeStats mergeStats = mergeStatsCache.get(tableId);
             if (mergeStats == null) {
-              mergeStatsCache.put(tableId, mergeStats = new MergeStats(getMergeInfo(tableId)));
+              mergeStats = currentMerges.get(tableId);
+              if (mergeStats == null) {
+                mergeStats = new MergeStats(getMergeInfo(tableId));
+              }
+              mergeStatsCache.put(tableId, mergeStats);
             }
             TabletGoalState goal = getGoalState(tls, mergeStats.getMergeInfo());
             TServerInstance server = tls.getServer();


Mime
View raw message