|
From: Bryan T. <tho...@us...> - 2007-04-18 17:29:25
|
Update of /cvsroot/cweb/bigdata/src/java/com/bigdata/isolation In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv23060/src/java/com/bigdata/isolation Modified Files: UnisolatedBTree.java Log Message: testing SAIL and lubm, including adding BTree#removeAll(), touching up some inferences, making it possible to load different RDF interchange formats, and adding JOIN ordering based on the sesame optimizer and the actual triple pattern selectivity in the data. Index: UnisolatedBTree.java =================================================================== RCS file: /cvsroot/cweb/bigdata/src/java/com/bigdata/isolation/UnisolatedBTree.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** UnisolatedBTree.java 13 Apr 2007 15:04:23 -0000 1.11 --- UnisolatedBTree.java 18 Apr 2007 17:29:20 -0000 1.12 *************** *** 52,59 **** --- 52,61 ---- import java.io.ObjectInput; import java.io.ObjectOutput; + import java.util.Iterator; import java.util.UUID; import org.CognitiveWeb.extser.LongPacker; + import com.bigdata.btree.AbstractNode; import com.bigdata.btree.BTree; import com.bigdata.btree.BTreeMetadata; *************** *** 109,112 **** --- 111,116 ---- * application values will be inserted into this tree, not the {@link IValue} objects. * + * removeAll() - override to write deletion markers for each entry. + * * indexOf() - ok as implemented (counts deleted entries). * keyAt() - ok as implemented, but will return keys for deleted entries. *************** *** 457,460 **** --- 461,486 ---- } + + /** + * Overriden to write deletion markers for each non-deleted entry. When the + * transaction commits, those delete markers will have to validate against + * the global state of the tree. If the transaction validates, then the + * merge down onto the global state will cause the corresponding entries to + * be removed from the global tree. + * + * FIXME This method throws an exception since the iterator does not support + * {@link Iterator#remove()}. This issue is noted in {@link AbstractNode}. + */ + public void removeAll() { + + IEntryIterator itr = entryIterator(); + + while(itr.hasNext()) { + + itr.remove(); + + } + + } /** |