accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject svn commit: r1438671 - /accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/CompactRange.java
Date Fri, 25 Jan 2013 19:54:07 GMT
Author: kturner
Date: Fri Jan 25 19:54:06 2013
New Revision: 1438671

URL: http://svn.apache.org/viewvc?rev=1438671&view=rev
Log:
ACCUMULO-988 make compact Range idempotent again

Modified:
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/CompactRange.java

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/CompactRange.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/CompactRange.java?rev=1438671&r1=1438670&r2=1438671&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/CompactRange.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/tableOps/CompactRange.java
Fri Jan 25 19:54:06 2013
@@ -217,12 +217,16 @@ public class CompactRange extends Master
           long flushID = Long.parseLong(new String(tokens[0]));
           flushID++;
           
-          if (tokens.length > 1) {
+          String txidString = String.format("%016x", tid);
+          
+          for (int i = 1; i < tokens.length; i++) {
+            if (tokens[i].startsWith(txidString))
+              continue; // skip self
+
             throw new ThriftTableOperationException(tableId, null, TableOperation.COMPACT,
TableOperationExceptionType.OTHER,
                 "Another compaction with iterators is running");
           }
 
-          String txidString = String.format("%016x", tid);
           StringBuilder encodedIterators = new StringBuilder();
 
           if (iterators != null && iterators.getIterators().size() > 0) {



Mime
View raw message