use of org.apache.jena.tdb2.params.StoreParams in project jena by apache.
the class TestStoreParamsChoose method params_choose_new_persist_3.
@Test
public void params_choose_new_persist_3() {
// new database, location defined, application modified.
Location loc = Location.create(DIR);
FileOps.clearAll(loc.getDirectoryPath());
StoreParamsCodec.write(loc, pLoc);
// Clear.
StoreParams p = StoreParamsFactory.decideStoreParams(loc, true, pApp, pLoc, pDft);
// Check location still has a pLoc.
String fn = loc.getPath(Names.TDB_CONFIG_FILE);
assertTrue(FileOps.exists(fn));
StoreParams pLoc2 = StoreParamsCodec.read(loc);
assertFalse(StoreParams.sameValues(pLoc, p));
// Location
assertEquals(0, p.getBlockSize().intValue());
// Application
assertEquals(12, p.getNodeMissCacheSize().intValue());
}
use of org.apache.jena.tdb2.params.StoreParams in project jena by apache.
the class BuildTestLib method makeNodeTableBase.
public static NodeTable makeNodeTableBase(Location location, String basename, StoreParams params) {
RecordFactory recordFactory = new RecordFactory(SystemTDB.LenNodeHash, SystemTDB.SizeOfNodeId);
FileSet fs = new FileSet(location, basename);
Index index = buildRangeIndex(fs, recordFactory, params);
BinaryDataFile bdf = createBinaryDataFile(location, basename + "-data");
NodeTable nt = new NodeTableTRDF(index, bdf);
return nt;
}
use of org.apache.jena.tdb2.params.StoreParams in project jena by apache.
the class BuildTestLib method makeNodeTable.
public static NodeTable makeNodeTable(Location location, String basename, StoreParams params) {
NodeTable nt = makeNodeTableBase(location, basename, params);
nt = NodeTableCache.create(nt, params);
nt = NodeTableInline.create(nt);
return nt;
}
use of org.apache.jena.tdb2.params.StoreParams in project jena by apache.
the class TestNodeTableStoredBase method createEmptyNodeTable.
@Override
protected NodeTable createEmptyNodeTable() {
FileOps.ensureDir(location.getDirectoryPath());
FileOps.clearDirectory(location.getDirectoryPath());
StoreParams params = StoreParamsBuilder.create().nodeId2NodeCacheSize(-1).node2NodeIdCacheSize(-1).nodeMissCacheSize(-1).build();
return BuildTestLib.makeNodeTableBase(location, "test", params);
}
use of org.apache.jena.tdb2.params.StoreParams in project jena by apache.
the class TestNodeTableStored method createEmptyNodeTable.
@Override
protected NodeTable createEmptyNodeTable() {
FileOps.ensureDir(location.getDirectoryPath());
FileOps.clearDirectory(location.getDirectoryPath());
StoreParams params = StoreParamsBuilder.create().nodeId2NodeCacheSize(10).node2NodeIdCacheSize(10).nodeMissCacheSize(10).build();
return BuildTestLib.makeNodeTable(location, "test", params);
}
Aggregations