use of org.apache.jena.dboe.index.RangeIndex in project jena by apache.
the class AbstractTestRangeIndex method tree_iter_2_08.
@Test
public void tree_iter_2_08() {
int[] keys = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
RangeIndex rIndex = makeRangeIndex(2);
add(rIndex, keys);
List<Integer> x = toIntList(rIndex.iterator(r(0), r(99)));
List<Integer> expected = toIntList(keys);
assertEquals(expected, x);
}
use of org.apache.jena.dboe.index.RangeIndex in project jena by apache.
the class AbstractTestRangeIndex method tree_iter_2_02.
@Test
public void tree_iter_2_02() {
int[] keys = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
RangeIndex rIndex = makeRangeIndex(2);
add(rIndex, keys);
List<Integer> x = toIntList(rIndex.iterator(r(4), r(7)));
List<Integer> expected = toIntList(4, 5, 6);
assertEquals(expected, x);
}
use of org.apache.jena.dboe.index.RangeIndex in project jena by apache.
the class AbstractTestRangeIndex method tree_iter_0_03.
@Test
public void tree_iter_0_03() {
int[] keys = { 1, 2, 3, 4, 5 };
RangeIndex rIndex = makeRangeIndex(5);
add(rIndex, keys);
List<Integer> x = toIntList(rIndex.iterator(r(5), null));
List<Integer> expected = toIntList(5);
assertEquals(expected, x);
}
use of org.apache.jena.dboe.index.RangeIndex in project jena by apache.
the class TestTupleIndexRecordDirect method create.
static TupleIndexRecord create(String description) {
IndexParams indexParams = StoreParams.getDftStoreParams();
RangeIndex rIdx = BuildTestLib.buildRangeIndex(FileSet.mem(), factory, indexParams);
TupleMap tmap = TupleMap.create("SPO", description);
TupleIndexRecord index = new TupleIndexRecord(3, tmap, description, factory, rIdx);
return index;
}
use of org.apache.jena.dboe.index.RangeIndex in project jena by apache.
the class BPlusTreeFactory method makeBPlusTree.
public static RangeIndex makeBPlusTree(ComponentId cid, FileSet fs, int blkSize, int readCacheSize, int writeCacheSize, int dftKeyLength, int dftValueLength) {
RecordFactory recordFactory = makeRecordFactory(dftKeyLength, dftValueLength);
int order = BPlusTreeParams.calcOrder(blkSize, recordFactory.recordLength());
RangeIndex rIndex = createBPTree(cid, fs, order, blkSize, readCacheSize, writeCacheSize, recordFactory);
return rIndex;
}
Aggregations