Re: multi-index native sail in Sesame

From: Stefano Mazzocchi <stefanom_at_mit.edu>
Date: Fri, 23 Sep 2005 17:10:22 -0700

Arjohn Kampman wrote:
> Vineet Sinha wrote:
>> Arjohn Kampman wrote:
>>
>>>
>>> We're aiming for a Sesame 1.2.2 release in the middle of next week. Does
>>> this fit your schedule?
>>
>>
>> Sure (for Relo). I might make a dev release before then, but it should
>> allow for time for the first stable release.
>
> Sesame's native sail now supports multiple indexes. Instead of the fixed
> scheme with two indexes (SPO and OPS) that was tried here earlier, the
> indexes to use can now be configured through the "triple-indexes"
> parameter. More detailed info about the implementation can be found in
> OpenRDF's issue tracker:
>
> http://www.openrdf.org/issues/browse/SES-192
>
> A public release of Sesame containing this code will follow in a few
> days. For now, the new code can be retrieved from CVS (module=openrdf,
> branch=R1-2):
>
> http://cvs.sourceforge.net/viewcvs.py/sesame/openrdf/src/org/openrdf/sesame/sailimpl/nativerdf/?only_with_tag=R1-2
>
>
> It would be great if you guys could have a go at it to make sure that
> the code is free from any serious bugs. We already tested a lot of the
> upgrade- and usage scenarios, but you never what comes up "in the wild",
> can you? :-)

Arjohn,

first of all, thanks so much for your work, we are really hoping to
release Piggy Bank 2.1.0 with the standard Sesame as we don't want to
ship our own patched version.

Unfortunately, "the wild" is telling you that Sesame reIndexing is, in
fact, far from being free of some serious bugs (or I'm not using it
correctly!)

So, here is what I did:

  1) updated all the jars with the latest one shipped from sesame 1.2.2
(and removed the old ones, of course)

  2) changed the way we initialize the SAIL to

static public LocalRepository createNativeRepository(
        String id, File dir
)
throws ConfigurationException, IOException {

    RepositoryConfig config = new RepositoryConfig(id);

    SailConfig sail = new NativeRdfRepositoryConfig(dir.getCanonicalPath());
    sail.setParameter("triple-indexes","spo, pos, osp");

    config.addSail(sail);
    config.setWorldReadable(true);
    config.setWorldWriteable(true);

    LocalService service = Sesame.getService();

    return service.createRepository(config);
}

  3) installed piggy bank 2.1.0 (which Sesame 1.2.2) on top of Piggy
Bank 2.0.4 (with Sesame 1.1.2)

  4) and I get this exception when Sesame loads the SAIL:

java.lang.NoSuchMethodError:
org.openrdf.util.ByteArrayUtil.compareRegion([BI[BII)I
         at
org.openrdf.sesame.sailimpl.nativerdf.TripleStore$TripleComparator.compareBTreeValues(TripleStore.java:573)
         at
org.openrdf.sesame.sailimpl.nativerdf.btree.BTree$Node.search(BTree.java:940)
         at
org.openrdf.sesame.sailimpl.nativerdf.btree.BTree._insertInTree(BTree.java:374)
         at
org.openrdf.sesame.sailimpl.nativerdf.btree.BTree.insert(BTree.java:350)
         at
org.openrdf.sesame.sailimpl.nativerdf.TripleStore._reindex(TripleStore.java:243)
         at
org.openrdf.sesame.sailimpl.nativerdf.TripleStore.<init>(TripleStore.java:147)
         at
org.openrdf.sesame.sailimpl.nativerdf.NativeRdfRepository.initialize(NativeRdfRepository.java:203)
         at
org.openrdf.sesame.sailimpl.nativerdf.NativeRdfRepository.initialize(NativeRdfRepository.java:153)
         at
org.openrdf.sesame.repository.local.LocalService._createRepository(LocalService.java:376)
         at
org.openrdf.sesame.repository.local.LocalService.getRepository(LocalService.java:238)
         at
org.openrdf.sesame.repository.local.LocalService.createRepository(LocalService.java:298)
         at
edu.mit.simile.longwell.LongwellUtilities.createNativeRepository(LongwellUtilities.java:74)
         at
edu.mit.simile.longwell.corpus.NativeSesameConnector$NativeSesameCorpus.createModel(NativeSesameConnector.java:83)
         at
edu.mit.simile.longwell.corpus.Corpus.internalInitialize(Corpus.java:73)
         at
edu.mit.simile.longwell.corpus.Corpus.getRepository(Corpus.java:44)
         at edu.mit.simile.longwell.Profile.getRepository(Profile.java:70)
         at
edu.mit.simile.longwell.SystemModel.trustAllOfSystemicTypes(SystemModel.java:178)
         at edu.mit.simile.longwell.Profile.addData(Profile.java:162)
         at
edu.mit.simile.longwell.LongwellUtilities.loadDataFromFile(LongwellUtilities.java:115)
         at
edu.mit.simile.longwell.LongwellUtilities.loadDataFromDir(LongwellUtilities.java:93)
         at
edu.mit.simile.longwell.LongwellUtilities.loadDataFromDir(LongwellUtilities.java:89)
         at edu.mit.simile.longwell.Profile.addData(Profile.java:192)

Am I doing something wrong or is there something wrong in the
re-indexing code?

-- 
Stefano Mazzocchi
Research Scientist                 Digital Libraries Research Group
Massachusetts Institute of Technology            location: E25-131C
77 Massachusetts Ave                   telephone: +1 (617) 253-1096
Cambridge, MA  02139-4307              email: stefanom at mit . edu
-------------------------------------------------------------------
Received on Sat Sep 24 2005 - 00:05:43 EDT

This archive was generated by hypermail 2.3.0 : Thu Aug 09 2012 - 16:39:18 EDT