I wrote the following code to build only one type of triple and quad index but
it is still creating all indexes 😞
package ldbqPack;
import org.apache.jena.query.Dataset;
import org.apache.jena.tdb2.TDB2Factory;
import org.apache.jena.tdb2.setup.StoreParams;
import org.apache.jena.tdb2.sys.DatabaseConnection;
import org.apache.jena.dboe.base.block.FileMode;
import org.apache.jena.dboe.base.file.Location;
import org.apache.jena.tdb2.setup.StoreParamsFactory;
public class StrPrms {
static String[] tindexes= {"SPO"};
static String[] qindexes= {"GSPO"};
static String[] pindexes= {"GPU"};
static final StoreParams pApp = StoreParams.builder()
.blockSize(12) // Not dynamic
.nodeMissCacheSize(12) // Dynamic
.build();
static final StoreParams pLoc = StoreParams.builder()
.blockSize(0)
.nodeMissCacheSize(0).build();
static final StoreParams pDft = StoreParams.builder()
.fileMode(FileMode.mapped)
.blockSize(8192)
.blockReadCacheSize(5000)
.blockWriteCacheSize(1000)
.node2NodeIdCacheSize(200000)
.nodeId2NodeCacheSize(750000)
.nodeMissCacheSize(1000)
.nodeTableBaseName("nodes")
.primaryIndexTriples("SPO")
.tripleIndexes(tindexes)
.primaryIndexQuads("GSPO")
.quadIndexes(qindexes)
.prefixTableBaseName("prefixes")
.primaryIndexPrefix("GPU")
.prefixIndexes(pindexes)
.build();
public static void main(String[] args) {
// TODO Auto-generated method stub
final String DATASET_DIR_NAME = "DyLDO100";
Dataset dataset = TDB2Factory.connectDataset ( DATASET_DIR_NAME );
Location location = Location.create(DATASET_DIR_NAME);
StoreParams custom_params =
StoreParamsFactory.decideStoreParams(location, true, pApp, pLoc, pDft);
DatabaseConnection.connectCreate(location, custom_params);
StoreParams params = StoreParams.getSmallStoreParams();
System.out.println(params);
}
}
Please help.
Regards,
Samita Bai
________________________________
P : Please consider the environment before printing this e-mail
________________________________
CONFIDENTIALITY / DISCLAIMER NOTICE: This e-mail and any attachments may
contain confidential and privileged information. If you are not the intended
recipient, please notify the sender immediately by return e-mail, delete this
e-mail and destroy any copies. Any dissemination or use of this information by
a person other than the intended recipient is unauthorized and may be illegal.
________________________________