directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1624871 - /directory/mavibot/branches/free-page-mgmt/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedValueHolder.java
Date Sun, 14 Sep 2014 16:48:41 GMT
Author: kayyagari
Date: Sun Sep 14 16:48:41 2014
New Revision: 1624871

URL: http://svn.apache.org/r1624871
Log:
o optimized the addition of a single value
o removed dead code

Modified:
    directory/mavibot/branches/free-page-mgmt/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedValueHolder.java

Modified: directory/mavibot/branches/free-page-mgmt/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedValueHolder.java
URL: http://svn.apache.org/viewvc/directory/mavibot/branches/free-page-mgmt/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedValueHolder.java?rev=1624871&r1=1624870&r2=1624871&view=diff
==============================================================================
--- directory/mavibot/branches/free-page-mgmt/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedValueHolder.java
(original)
+++ directory/mavibot/branches/free-page-mgmt/mavibot/src/main/java/org/apache/directory/mavibot/btree/PersistedValueHolder.java
Sun Sep 14 16:48:41 2014
@@ -121,22 +121,16 @@ import static org.apache.directory.mavib
             {
                 // Use a sub btree, now that we have reached the threshold
                 createSubTree();
-
-//             // Now inject all the values into it
-//                for ( V value : values )
-//                {
-//                    try
-//                    {
-//                        valueBtree.insert( value, value );
-//                    }
-//                    catch ( IOException e )
-//                    {
-//                        e.printStackTrace();
-//                    }
-//                }
                 try
                 {
-                    buildSubBTree( ( PersistedBTree<V, V> ) valueBtree, values );
+                    if( values.length == 1 )
+                    {
+                        add( values[0] );
+                    }
+                    else
+                    {
+                        buildSubBTree( ( PersistedBTree<V, V> ) valueBtree, values
);
+                    }
                 }
                 catch( Exception e )
                 {
@@ -783,7 +777,7 @@ import static org.apache.directory.mavib
         Page oldRoot = btree.getRootPage();
         
         long newRootPageOffset = ( ( AbstractPage ) rootPage ).getOffset();
-        //System.out.println( "replacing old offset " + btree.getRootPageOffset() + " of
the BTree " + btree.getName() + " with " + newRootPageOffset );
+        System.out.println( "replacing old offset " + btree.getRootPageOffset() + " of the
BTree " + btree.getName() + " with " + newRootPageOffset );
         
         BTreeHeader header = btree.getBtreeHeader();
         



Mime
View raw message