accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1397702 - in /accumulo/trunk: ./ core/ core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java fate/src/main/java/org/apache/accumulo/fate/ZooStore.java server/ src/
Date Fri, 12 Oct 2012 19:45:09 GMT
Author: ecn
Date: Fri Oct 12 19:45:08 2012
New Revision: 1397702

URL: http://svn.apache.org/viewvc?rev=1397702&view=rev
Log:
ACCUMULO-507 test the read/write of large numbers of ranges

Modified:
    accumulo/trunk/   (props changed)
    accumulo/trunk/core/   (props changed)
    accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java
    accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java   (props changed)
    accumulo/trunk/server/   (props changed)
    accumulo/trunk/src/   (props changed)

Propchange: accumulo/trunk/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/src:r1397700
  Merged /accumulo/branches/1.4:r1397700

Propchange: accumulo/trunk/core/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/core:r1397700
  Merged /accumulo/branches/1.4/src/core:r1397700

Modified: accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java?rev=1397702&r1=1397701&r2=1397702&view=diff
==============================================================================
--- accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java
(original)
+++ accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java
Fri Oct 12 19:45:08 2012
@@ -22,6 +22,7 @@ import static org.junit.Assert.assertTru
 import java.io.ByteArrayOutputStream;
 import java.io.DataOutputStream;
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
 
@@ -107,6 +108,24 @@ public class AccumuloInputFormatTest {
     String iterators = conf.get("AccumuloInputFormat.iterators");
     assertEquals(new String(Base64.encodeBase64(baos.toByteArray())), iterators);
   }
+
+  static abstract class GetRanges<K, V> extends InputFormatBase<K,V> {
+    public static List<Range> getRanges(Configuration conf) throws IOException {
+      return InputFormatBase.getRanges(conf);
+    }
+  };
+
+  @Test
+  public void testSetRanges() throws IOException {
+    JobContext job = ContextFactory.createJobContext();
+    List<Range> ranges = new ArrayList<Range>();
+    for (int i = 0; i < 100000; i++) {
+      ranges.add(new Range(new Text(String.format("%05x", i))));
+    }
+    AccumuloInputFormat.setRanges(job.getConfiguration(), ranges);
+    List<Range> ranges2 = GetRanges.getRanges(job.getConfiguration());
+    assertEquals(ranges, ranges2);
+  }
   
   @Test
   public void testAddIterator() {

Propchange: accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java:r1397700
  Merged /accumulo/branches/1.4/src/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java:r1397700

Propchange: accumulo/trunk/server/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/server:r1397700
  Merged /accumulo/branches/1.4/src/server:r1397700

Propchange: accumulo/trunk/src/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/src:r1397700
  Merged /accumulo/branches/1.4/src/src:r1397700



Mime
View raw message