accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r1469531 - in /accumulo/trunk: ./ core/ core/src/main/java/org/apache/accumulo/core/client/mock/ proxy/src/test/java/org/apache/accumulo/proxy/ server/
Date Thu, 18 Apr 2013 19:20:16 GMT
Author: vines
Date: Thu Apr 18 19:20:16 2013
New Revision: 1469531

URL: http://svn.apache.org/r1469531
Log:
ACCUMULO-1306 - Mock merging


Modified:
    accumulo/trunk/   (props changed)
    accumulo/trunk/core/   (props changed)
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockTable.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
    accumulo/trunk/proxy/src/test/java/org/apache/accumulo/proxy/TestProxyTableOperations.java
    accumulo/trunk/server/   (props changed)

Propchange: accumulo/trunk/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5:r1468969-1468982,1468984-1468992,1468994,1468996-1469077,1469079,1469082-1469103,1469105-1469112,1469114-1469497,1469499-1469502,1469504-1469530

Propchange: accumulo/trunk/core/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/core:r1467466-1468097,1468099-1468200,1468202-1468526,1468528-1468531,1468533-1468544,1468546-1468575,1468577-1468581,1468583-1468598,1468600-1468926,1468928-1468931,1468933,1468935-1468946,1468948-1468958,1468960-1468982,1468984-1468992,1468994,1468996-1469077,1469079,1469082-1469103,1469105-1469112,1469114-1469502,1469504-1469530

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java?rev=1469531&r1=1469530&r2=1469531&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java
Thu Apr 18 19:20:16 2013
@@ -88,4 +88,8 @@ public class MockAccumulo {
   public Collection<Text> getSplits(String tableName) {
     return tables.get(tableName).getSplits();
   }
+
+  public void merge(String tableName, Text start, Text end) {
+    tables.get(tableName).merge(start, end);
+  }  
 }

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockTable.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockTable.java?rev=1469531&r1=1469530&r2=1469531&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockTable.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockTable.java
Thu Apr 18 19:20:16 2013
@@ -132,4 +132,13 @@ public class MockTable {
   public Map<String,Set<Text>> getLocalityGroups() {
     return localityGroups;
   }
+  
+  public void merge(Text start, Text end) {
+    boolean reAdd = false;
+    if (splits.contains(start))
+      reAdd = true;
+    splits.removeAll(splits.subSet(start, end));
+    if (reAdd)
+      splits.add(start);
+  }
 }

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java?rev=1469531&r1=1469530&r2=1469531&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
Thu Apr 18 19:20:16 2013
@@ -303,6 +303,7 @@ public class MockTableOperations extends
   public void merge(String tableName, Text start, Text end) throws AccumuloException, AccumuloSecurityException,
TableNotFoundException {
     if (!exists(tableName))
       throw new TableNotFoundException(tableName, tableName, "");
+    acu.merge(tableName, start, end);
   }
   
   @Override

Modified: accumulo/trunk/proxy/src/test/java/org/apache/accumulo/proxy/TestProxyTableOperations.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/test/java/org/apache/accumulo/proxy/TestProxyTableOperations.java?rev=1469531&r1=1469530&r2=1469531&view=diff
==============================================================================
--- accumulo/trunk/proxy/src/test/java/org/apache/accumulo/proxy/TestProxyTableOperations.java
(original)
+++ accumulo/trunk/proxy/src/test/java/org/apache/accumulo/proxy/TestProxyTableOperations.java
Thu Apr 18 19:20:16 2013
@@ -112,8 +112,7 @@ public class TestProxyTableOperations {
   }
   
   // This test does not yet function because the backing Mock instance does not yet support
merging
-  // TODO: add back in as a test when Mock is improved - ACCUMULO-1306
-  // @Test
+  @Test
   public void merge() throws TException {
     Set<ByteBuffer> splits = new HashSet<ByteBuffer>();
     splits.add(ByteBuffer.wrap("a".getBytes()));

Propchange: accumulo/trunk/server/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/server:r1467466-1468097,1468099-1468200,1468202-1468526,1468528-1468531,1468533-1468544,1468546-1468575,1468577-1468581,1468583-1468598,1468600-1468926,1468928-1468931,1468933,1468935-1468946,1468948-1468958,1468960-1468982,1468984-1468992,1468994,1468996-1469077,1469079,1469082-1469103,1469105-1469112,1469114-1469497,1469499-1469502,1469504-1469530



Mime
View raw message