{
int pageSize = 8;
int numKeys = 2;
String name = "duplicateTree";
BTree<Long, String> dupsTree = new BTree( name, null, new LongSerializer(), new StringSerializer(), pageSize,
true );
recordManager1.manage( dupsTree );
for ( long i = 0; i < numKeys; i++ )
{
for ( int k = 0; k < pageSize + 1; k++ )
{
dupsTree.insert( i, String.valueOf( k ) );
}
}
// Now, try to reload the file back
openRecordManagerAndBtree();
dupsTree = recordManager1.getManagedTree( name );
// Cursor<Long, String> cursor1 = dupsTree.browse();
// while( cursor1.hasNext() )
// {
// System.out.println( cursor1.next() );
// }
// cursor1.close();
for ( long i = 0; i < numKeys; i++ )
{
BTree<String, String> values = dupsTree.getValues( i );
// Cursor<String, String> cursor = values.browse();
// while( cursor.hasNext() )
// {
// System.out.println( cursor.next() );
// }