Search in sources :

Example 1 with Index

use of org.apache.jena.tdb.index.Index in project jena by apache.

the class IndexTestLib method testInsert.

public static Index testInsert(IndexMaker maker, int[] keys) {
    Index index = maker.makeIndex();
    testInsert(index, keys);
    return index;
}
Also used : Index(org.apache.jena.tdb.index.Index) RangeIndex(org.apache.jena.tdb.index.RangeIndex)

Example 2 with Index

use of org.apache.jena.tdb.index.Index in project jena by apache.

the class DebugTDB method dumpNodeIndex.

// public static RangeIndex makeRangeIndex(Location location, String indexName,
// int dftKeyLength, int dftValueLength,
// int readCacheSize,int writeCacheSize)
public static void dumpNodeIndex(String dir) {
    Location location = Location.create(dir);
    Index nodeToId = SetupTDB.makeIndex(location, Names.indexNode2Id, SystemTDB.BlockSize, SystemTDB.LenNodeHash, SystemTDB.SizeOfNodeId, -1, -1);
    for (Record aNodeToId : nodeToId) {
        System.out.println(aNodeToId);
    }
}
Also used : Index(org.apache.jena.tdb.index.Index) TupleIndex(org.apache.jena.tdb.store.tupletable.TupleIndex) RangeIndex(org.apache.jena.tdb.index.RangeIndex) Record(org.apache.jena.tdb.base.record.Record) TupleIndexRecord(org.apache.jena.tdb.store.tupletable.TupleIndexRecord) Location(org.apache.jena.tdb.base.file.Location)

Example 3 with Index

use of org.apache.jena.tdb.index.Index in project jena by apache.

the class IndexTestLib method buildIndex.

// ---------- Utilities
//    public static RangeIndex buildRangeIndex(RangeIndexMaker maker, int[] keys)
//    {
//        RangeIndex index = maker.make() ;
//        IndexTestLib.add(index, keys) ;
//        return index ;
//    }
public static Index buildIndex(IndexMaker maker, int[] keys) {
    Index index = maker.makeIndex();
    IndexTestLib.add(index, keys);
    return index;
}
Also used : Index(org.apache.jena.tdb.index.Index) RangeIndex(org.apache.jena.tdb.index.RangeIndex)

Example 4 with Index

use of org.apache.jena.tdb.index.Index in project jena by apache.

the class AbstractTestNodeTableTrans method create.

private NodeTableTrans create(Transaction txn, NodeTable base) {
    RecordFactory recordFactory = new RecordFactory(SystemTDB.LenNodeHash, SystemTDB.SizeOfNodeId);
    Index idx = new IndexMap(recordFactory);
    ObjectFile objectFile = createObjectFile();
    NodeTableTrans ntt = new NodeTableTrans(txn, "test", base, idx, objectFile);
    return ntt;
}
Also used : NodeTableTrans(org.apache.jena.tdb.transaction.NodeTableTrans) RecordFactory(org.apache.jena.tdb.base.record.RecordFactory) IndexMap(org.apache.jena.tdb.index.IndexMap) ObjectFile(org.apache.jena.tdb.base.objectfile.ObjectFile) Index(org.apache.jena.tdb.index.Index)

Example 5 with Index

use of org.apache.jena.tdb.index.Index in project jena by apache.

the class DatasetBuilderStd method buildNodeTable.

// -------------
private NodeTable buildNodeTable(FileSet fsIndex, FileSet fsObjectFile, StoreParams params) {
    RecordFactory recordFactory = new RecordFactory(SystemTDB.LenNodeHash, SystemTDB.SizeOfNodeId);
    Index idx = /*indexBuilder.*/
    buildIndex(fsIndex, recordFactory, params);
    ObjectFile objectFile = objectFileBuilder.buildObjectFile(fsObjectFile, Names.extNodeData);
    NodeTable nodeTable = new NodeTableNative(idx, objectFile);
    nodeTable = NodeTableCache.create(nodeTable, params.getNode2NodeIdCacheSize(), params.getNodeId2NodeCacheSize(), params.getNodeMissCacheSize());
    nodeTable = NodeTableInline.create(nodeTable);
    return nodeTable;
}
Also used : RecordFactory(org.apache.jena.tdb.base.record.RecordFactory) NodeTableNative(org.apache.jena.tdb.store.nodetable.NodeTableNative) ObjectFile(org.apache.jena.tdb.base.objectfile.ObjectFile) BuilderStdIndex(org.apache.jena.tdb.index.BuilderStdIndex) RangeIndex(org.apache.jena.tdb.index.RangeIndex) Index(org.apache.jena.tdb.index.Index) TupleIndex(org.apache.jena.tdb.store.tupletable.TupleIndex) NodeTable(org.apache.jena.tdb.store.nodetable.NodeTable)

Aggregations

Index (org.apache.jena.tdb.index.Index)5 RangeIndex (org.apache.jena.tdb.index.RangeIndex)4 ObjectFile (org.apache.jena.tdb.base.objectfile.ObjectFile)2 RecordFactory (org.apache.jena.tdb.base.record.RecordFactory)2 TupleIndex (org.apache.jena.tdb.store.tupletable.TupleIndex)2 Location (org.apache.jena.tdb.base.file.Location)1 Record (org.apache.jena.tdb.base.record.Record)1 BuilderStdIndex (org.apache.jena.tdb.index.BuilderStdIndex)1 IndexMap (org.apache.jena.tdb.index.IndexMap)1 NodeTable (org.apache.jena.tdb.store.nodetable.NodeTable)1 NodeTableNative (org.apache.jena.tdb.store.nodetable.NodeTableNative)1 TupleIndexRecord (org.apache.jena.tdb.store.tupletable.TupleIndexRecord)1 NodeTableTrans (org.apache.jena.tdb.transaction.NodeTableTrans)1