Search in sources :

Example 11 with ColumnMap

use of org.apache.jena.tdb.lib.ColumnMap in project jena by apache.

the class SetupTDB method makeTupleIndex.

public static TupleIndex makeTupleIndex(Location location, String primary, String indexOrder, String indexName, int keyLength) {
    FileSet fs = new FileSet(location, indexName);
    int readCacheSize = params.getBlockReadCacheSize();
    int writeCacheSize = params.getBlockWriteCacheSize();
    // Value part is null (zero length)
    RangeIndex rIndex = SetupIndex.makeRangeIndex(location, indexName, params.getBlockSize(), keyLength, 0, readCacheSize, writeCacheSize);
    TupleIndex tupleIndex = new TupleIndexRecord(primary.length(), new ColumnMap(primary, indexOrder), indexOrder, rIndex.getRecordFactory(), rIndex);
    return tupleIndex;
}
Also used : ColumnMap(org.apache.jena.tdb.lib.ColumnMap) TupleIndexRecord(org.apache.jena.tdb.store.tupletable.TupleIndexRecord) FileSet(org.apache.jena.tdb.base.file.FileSet) RangeIndex(org.apache.jena.tdb.index.RangeIndex) TupleIndex(org.apache.jena.tdb.store.tupletable.TupleIndex)

Example 12 with ColumnMap

use of org.apache.jena.tdb.lib.ColumnMap in project jena by apache.

the class TestTupleIndexRecord method createIndex.

@Override
protected TupleIndexRecord createIndex(String description) {
    IndexParams indexParams = StoreParams.getDftStoreParams();
    RangeIndex rIdx = IndexFactory.buildRangeIndex(FileSet.mem(), factory, indexParams);
    ColumnMap cmap = new ColumnMap("SPO", description);
    TupleIndexRecord index = new TupleIndexRecord(3, cmap, description, factory, rIdx);
    return index;
}
Also used : ColumnMap(org.apache.jena.tdb.lib.ColumnMap) TupleIndexRecord(org.apache.jena.tdb.store.tupletable.TupleIndexRecord) IndexParams(org.apache.jena.tdb.index.IndexParams) RangeIndex(org.apache.jena.tdb.index.RangeIndex)

Example 13 with ColumnMap

use of org.apache.jena.tdb.lib.ColumnMap in project jena by apache.

the class TestTupleIndexRecordDirect method create.

static TupleIndexRecord create(String description) {
    IndexParams indexParams = StoreParams.getDftStoreParams();
    RangeIndex rIdx = IndexFactory.buildRangeIndex(FileSet.mem(), factory, indexParams);
    ColumnMap cmap = new ColumnMap("SPO", description);
    TupleIndexRecord index = new TupleIndexRecord(3, cmap, description, factory, rIdx);
    return index;
}
Also used : ColumnMap(org.apache.jena.tdb.lib.ColumnMap) IndexParams(org.apache.jena.tdb.index.IndexParams) RangeIndex(org.apache.jena.tdb.index.RangeIndex)

Aggregations

ColumnMap (org.apache.jena.tdb.lib.ColumnMap)13 BaseTest (org.apache.jena.atlas.junit.BaseTest)6 Test (org.junit.Test)6 RangeIndex (org.apache.jena.tdb.index.RangeIndex)5 FileSet (org.apache.jena.tdb.base.file.FileSet)4 TupleIndexRecord (org.apache.jena.tdb.store.tupletable.TupleIndexRecord)4 RecordFactory (org.apache.jena.tdb.base.record.RecordFactory)3 IndexParams (org.apache.jena.tdb.index.IndexParams)3 Location (org.apache.jena.tdb.base.file.Location)2 Record (org.apache.jena.tdb.base.record.Record)2 BPlusTree (org.apache.jena.tdb.index.bplustree.BPlusTree)2 TupleIndex (org.apache.jena.tdb.store.tupletable.TupleIndex)2 InputStream (java.io.InputStream)1 AtlasException (org.apache.jena.atlas.AtlasException)1 Tuple (org.apache.jena.atlas.lib.tuple.Tuple)1 TDBException (org.apache.jena.tdb.TDBException)1 BlockMgr (org.apache.jena.tdb.base.block.BlockMgr)1 BPlusTreeParams (org.apache.jena.tdb.index.bplustree.BPlusTreeParams)1 NodeId (org.apache.jena.tdb.store.NodeId)1 ModLocation (tdb.cmdline.ModLocation)1