added missing file from previous commit
git-svn-id: https://hyracks.googlecode.com/svn/branches/hyracks_lsm_tree@1362 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks-storage-am-rtree/src/main/java/edu/uci/ics/hyracks/storage/am/rtree/impls/RTreeSearchCursor.java b/hyracks-storage-am-rtree/src/main/java/edu/uci/ics/hyracks/storage/am/rtree/impls/RTreeSearchCursor.java
index c9cbf7e..ee7ec5f 100644
--- a/hyracks-storage-am-rtree/src/main/java/edu/uci/ics/hyracks/storage/am/rtree/impls/RTreeSearchCursor.java
+++ b/hyracks-storage-am-rtree/src/main/java/edu/uci/ics/hyracks/storage/am/rtree/impls/RTreeSearchCursor.java
@@ -43,6 +43,8 @@
private int tupleIndex = 0;
private int tupleIndexInc = 0;
+ private int currentTupleIndex = 0;
+ private int pageId = -1;
private MultiComparator cmp;
@@ -72,6 +74,14 @@
return frameTuple;
}
+ public int getTupleOffset() {
+ return leafFrame.getTupleOffset(currentTupleIndex);
+ }
+
+ public int getPageId() {
+ return pageId;
+ }
+
@Override
public ICachedPage getPage() {
return page;
@@ -123,6 +133,8 @@
} else {
page = node;
+ this.pageId = pageId; // This is only needed for the
+ // LSMRTree flush operation
leafFrame.setPage(page);
tupleIndex = 0;
succeeded = true;
@@ -158,11 +170,16 @@
if (searchKey != null) {
if (leafFrame.intersect(searchKey, i, cmp)) {
frameTuple.resetByTupleIndex(leafFrame, i);
+ currentTupleIndex = i; // This is only needed for the
+ // LSMRTree flush operation
tupleIndexInc = i + 1;
return true;
}
} else {
frameTuple.resetByTupleIndex(leafFrame, i);
+ currentTupleIndex = i; // This is only needed for the
+ // LSMRTree
+ // flush operation
tupleIndexInc = i + 1;
return true;
}