directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1536066 [3/3] - in /directory/mavibot/trunk/mavibot/src: main/java/org/apache/directory/mavibot/btree/ main/java/org/apache/directory/mavibot/btree/managed/ main/java/org/apache/directory/mavibot/btree/memory/ main/java/org/apache/director...
Date Sun, 27 Oct 2013 08:48:08 GMT
Modified: directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/BTreeDuplicateKeyTest.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/BTreeDuplicateKeyTest.java?rev=1536066&r1=1536065&r2=1536066&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/BTreeDuplicateKeyTest.java
(original)
+++ directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/BTreeDuplicateKeyTest.java
Sun Oct 27 08:48:07 2013
@@ -31,8 +31,8 @@ import java.io.IOException;
 import java.util.NoSuchElementException;
 import java.util.UUID;
 
-import org.apache.directory.mavibot.btree.Cursor;
 import org.apache.directory.mavibot.btree.Tuple;
+import org.apache.directory.mavibot.btree.TupleCursor;
 import org.apache.directory.mavibot.btree.serializer.IntSerializer;
 import org.apache.directory.mavibot.btree.serializer.StringSerializer;
 import org.junit.Test;
@@ -55,7 +55,7 @@ public class BTreeDuplicateKeyTest
 
         btree.insert( 1, null );
 
-        Cursor<Integer, Integer> cursor = btree.browse();
+        TupleCursor<Integer, Integer> cursor = btree.browse();
         assertTrue( cursor.hasNext() );
 
         Tuple<Integer, Integer> t = cursor.next();
@@ -75,7 +75,7 @@ public class BTreeDuplicateKeyTest
         BTree<Integer, Integer> btree = new BTree<Integer, Integer>( "master",
serializer, serializer );
         btree.init();
 
-        Cursor<Integer, Integer> cursor = btree.browse();
+        TupleCursor<Integer, Integer> cursor = btree.browse();
         assertFalse( cursor.hasNext() );
         assertFalse( cursor.hasPrev() );
 
@@ -117,7 +117,7 @@ public class BTreeDuplicateKeyTest
         btree.insert( 1, 1 );
         btree.insert( 1, 2 );
 
-        Cursor<Integer, Integer> cursor = btree.browse();
+        TupleCursor<Integer, Integer> cursor = btree.browse();
         assertTrue( cursor.hasNext() );
 
         Tuple<Integer, Integer> t = cursor.next();
@@ -259,7 +259,7 @@ public class BTreeDuplicateKeyTest
             }
         }
 
-        Cursor<String, String> cursor = btree.browse();
+        TupleCursor<String, String> cursor = btree.browse();
 
         char ch = 'a';
         int k = 0;
@@ -316,14 +316,16 @@ public class BTreeDuplicateKeyTest
         // add one more value for 'a'
         btree.insert( String.valueOf( 'a' ), UUID.randomUUID().toString() );
 
-        Cursor<String, String> cursor = btree.browseFrom( "c" );
+        TupleCursor<String, String> cursor = btree.browseFrom( "c" );
 
         int i = 0;
+
         while ( cursor.hasNext() )
         {
             assertNotNull( cursor.next() );
             i++;
         }
+
         assertEquals( 24, i );
 
         // now move the cursor first
@@ -332,6 +334,7 @@ public class BTreeDuplicateKeyTest
         assertEquals( "c", cursor.next().getKey() );
 
         i = 0;
+
         while ( cursor.hasNext() )
         {
             assertNotNull( cursor.next() );
@@ -384,7 +387,7 @@ public class BTreeDuplicateKeyTest
 
         btree.insert( String.valueOf( 'z' ), UUID.randomUUID().toString() );
 
-        Cursor<String, String> cursor = btree.browseFrom( "c" );
+        TupleCursor<String, String> cursor = btree.browseFrom( "c" );
         cursor.afterLast();
 
         assertFalse( cursor.hasNext() );
@@ -424,7 +427,7 @@ public class BTreeDuplicateKeyTest
             }
         }
 
-        Cursor<String, String> cursor = btree.browse();
+        TupleCursor<String, String> cursor = btree.browse();
 
         assertTrue( cursor.hasNext() );
         assertFalse( cursor.hasPrev() );
@@ -527,7 +530,7 @@ public class BTreeDuplicateKeyTest
         }
 
         // 3 is the last element of the first leaf
-        Cursor<Integer, Integer> cursor = btree.browseFrom( 3 );
+        TupleCursor<Integer, Integer> cursor = btree.browseFrom( 3 );
         cursor.moveToNextNonDuplicateKey();
 
         assertTrue( cursor.hasNext() );
@@ -602,7 +605,7 @@ public class BTreeDuplicateKeyTest
         }
 
         // 3 is the last element of the first leaf
-        Cursor<Integer, Integer> cursor = btree.browseFrom( 4 );
+        TupleCursor<Integer, Integer> cursor = btree.browseFrom( 4 );
 
         assertTrue( cursor.hasNext() );
         Tuple<Integer, Integer> tuple = cursor.next();
@@ -647,7 +650,7 @@ public class BTreeDuplicateKeyTest
         }
 
         // 4 is the last element in the tree
-        Cursor<Integer, Integer> cursor = btree.browseFrom( 4 );
+        TupleCursor<Integer, Integer> cursor = btree.browseFrom( 4 );
         cursor.moveToNextNonDuplicateKey();
 
         int currentKey = 4;
@@ -685,7 +688,7 @@ public class BTreeDuplicateKeyTest
         }
 
         // 4 is the last element in the tree
-        Cursor<Integer, Integer> cursor = btree.browseFrom( 0 );
+        TupleCursor<Integer, Integer> cursor = btree.browseFrom( 0 );
         cursor.moveToPrevNonDuplicateKey();
 
         int currentKey = 0;

Modified: directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/BTreeFlushTest.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/BTreeFlushTest.java?rev=1536066&r1=1536065&r2=1536066&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/BTreeFlushTest.java
(original)
+++ directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/BTreeFlushTest.java
Sun Oct 27 08:48:07 2013
@@ -29,8 +29,8 @@ import java.io.IOException;
 import java.util.Random;
 import java.util.Set;
 
-import org.apache.directory.mavibot.btree.Cursor;
 import org.apache.directory.mavibot.btree.Tuple;
+import org.apache.directory.mavibot.btree.TupleCursor;
 import org.apache.directory.mavibot.btree.exception.KeyNotFoundException;
 import org.apache.directory.mavibot.btree.serializer.IntSerializer;
 import org.apache.directory.mavibot.btree.serializer.LongSerializer;
@@ -251,8 +251,8 @@ public class BTreeFlushTest
                 new StringSerializer() );
             btree.setPageSize( 8 );
 
-            Cursor<Integer, String> cursor1 = btree.browse();
-            Cursor<Integer, String> cursor2 = btree.browse();
+            TupleCursor<Integer, String> cursor1 = btree.browse();
+            TupleCursor<Integer, String> cursor2 = btree.browse();
 
             while ( cursor1.hasNext() )
             {

Modified: directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/BulkDataSorterTest.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/BulkDataSorterTest.java?rev=1536066&r1=1536065&r2=1536066&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/BulkDataSorterTest.java
(original)
+++ directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/BulkDataSorterTest.java
Sun Oct 27 08:48:07 2013
@@ -75,7 +75,6 @@ public class BulkDataSorterTest
         for ( int i = 0; i < count; i++ )
         {
             int x = random.nextInt( 100 );
-            //System.out.println(x);
 
             Tuple<Integer, Integer> t = new Tuple<Integer, Integer>( x, x );
 
@@ -127,7 +126,6 @@ public class BulkDataSorterTest
         for ( int i = 0; i < count; i++ )
         {
             int x = random.nextInt( randUpper );
-            //System.out.println(x);
 
             Tuple<Integer, Integer> t = new Tuple<Integer, Integer>( x, x );
 
@@ -156,8 +154,6 @@ public class BulkDataSorterTest
             {
                 assertTrue( prev <= t.getKey() );
             }
-
-            //System.out.println(t);
         }
 
         deleteDir( bds.getWorkDir() );

Modified: directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/InMemoryBTreeTest.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/InMemoryBTreeTest.java?rev=1536066&r1=1536065&r2=1536066&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/InMemoryBTreeTest.java
(original)
+++ directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/InMemoryBTreeTest.java
Sun Oct 27 08:48:07 2013
@@ -35,8 +35,8 @@ import java.util.List;
 import java.util.Random;
 import java.util.Set;
 
-import org.apache.directory.mavibot.btree.Cursor;
 import org.apache.directory.mavibot.btree.Tuple;
+import org.apache.directory.mavibot.btree.TupleCursor;
 import org.apache.directory.mavibot.btree.exception.EndOfFileExceededException;
 import org.apache.directory.mavibot.btree.exception.KeyNotFoundException;
 import org.apache.directory.mavibot.btree.serializer.IntSerializer;
@@ -623,7 +623,7 @@ public class InMemoryBTreeTest
 
         // Browse starting at position 10
         int pos = 10;
-        Cursor<Integer, String> cursor = btree.browseFrom( sortedValues[pos] );
+        TupleCursor<Integer, String> cursor = btree.browseFrom( sortedValues[pos] );
 
         while ( cursor.hasNext() )
         {
@@ -707,7 +707,7 @@ public class InMemoryBTreeTest
 
         // Browse starting at position 10
         int pos = 10;
-        Cursor<Integer, String> cursor = btree.browseFrom( sortedValues[pos] );
+        TupleCursor<Integer, String> cursor = btree.browseFrom( sortedValues[pos] );
 
         while ( cursor.hasPrev() )
         {
@@ -764,7 +764,7 @@ public class InMemoryBTreeTest
         BTree<Integer, String> btree = new BTree<Integer, String>( "test", new
IntSerializer(), new StringSerializer() );
         btree.setPageSize( 8 );
 
-        Cursor<Integer, String> cursor = btree.browse();
+        TupleCursor<Integer, String> cursor = btree.browse();
 
         assertFalse( cursor.hasNext() );
         assertFalse( cursor.hasPrev() );
@@ -791,7 +791,7 @@ public class InMemoryBTreeTest
         }
 
         // Start to browse in the middle
-        Cursor<Integer, String> cursor = btree.browseFrom( 8 );
+        TupleCursor<Integer, String> cursor = btree.browseFrom( 8 );
 
         assertTrue( cursor.hasNext() );
 
@@ -1025,7 +1025,7 @@ public class InMemoryBTreeTest
         assertTrue( btree.hasKey( 8 ) );
         assertFalse( btree.hasKey( 11 ) );
 
-        Cursor<Integer, String> cursor = btree.browseFrom( 11 );
+        TupleCursor<Integer, String> cursor = btree.browseFrom( 11 );
         assertFalse( cursor.hasNext() );
     }
 
@@ -1194,7 +1194,7 @@ public class InMemoryBTreeTest
     {
         try
         {
-            Cursor<Integer, String> cursor = btree.browse();
+            TupleCursor<Integer, String> cursor = btree.browse();
             Integer value = null;
 
             while ( cursor.hasNext() )
@@ -1778,7 +1778,7 @@ public class InMemoryBTreeTest
         // Now browse them
         long l1 = System.currentTimeMillis();
 
-        Cursor<Long, String> cursor = btree.browse();
+        TupleCursor<Long, String> cursor = btree.browse();
 
         int nb = 0;
         long elem = Long.MIN_VALUE;
@@ -1851,7 +1851,7 @@ public class InMemoryBTreeTest
         }
 
         // Start to browse in the middle
-        Cursor<Integer, String> cursor = btree.browseFrom( 8 );
+        TupleCursor<Integer, String> cursor = btree.browseFrom( 8 );
 
         assertTrue( cursor.hasNext() );
 
@@ -1914,7 +1914,7 @@ public class InMemoryBTreeTest
         }
 
         // 3 is the last element of the first leaf
-        Cursor<Integer, Integer> cursor = btree.browseFrom( 4 );
+        TupleCursor<Integer, Integer> cursor = btree.browseFrom( 4 );
 
         assertTrue( cursor.hasNext() );
         Tuple<Integer, Integer> tuple = cursor.next();

Modified: directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/MultiThreadedBtreeTest.java
URL: http://svn.apache.org/viewvc/directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/MultiThreadedBtreeTest.java?rev=1536066&r1=1536065&r2=1536066&view=diff
==============================================================================
--- directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/MultiThreadedBtreeTest.java
(original)
+++ directory/mavibot/trunk/mavibot/src/test/java/org/apache/directory/mavibot/btree/memory/MultiThreadedBtreeTest.java
Sun Oct 27 08:48:07 2013
@@ -27,8 +27,8 @@ import java.io.IOException;
 import java.util.Random;
 import java.util.concurrent.CountDownLatch;
 
-import org.apache.directory.mavibot.btree.Cursor;
 import org.apache.directory.mavibot.btree.Tuple;
+import org.apache.directory.mavibot.btree.TupleCursor;
 import org.apache.directory.mavibot.btree.exception.KeyNotFoundException;
 import org.apache.directory.mavibot.btree.serializer.LongSerializer;
 import org.apache.directory.mavibot.btree.serializer.StringSerializer;
@@ -114,7 +114,7 @@ public class MultiThreadedBtreeTest
      */
     private int testBrowse() throws IOException
     {
-        Cursor<Long, String> cursor = btree.browse();
+        TupleCursor<Long, String> cursor = btree.browse();
 
         int nb = 0;
         long elem = Long.MIN_VALUE;



Mime
View raw message