Gao
Gao

Reputation: 932

Is jena's fuseki not compactible with tdb2.tdbloader?

I have a requirement that incremental update tdb files daily. So I'm using tdb2.tdbloader to do the job with a generated N-Triples file. But when the job is done, the data directory which contains tdb data have a new directory called "data-0001" or so. And when I restart fuseki server, it gives me this exception:

org.apache.jena.assembler.exceptions.AssemblerException: caught: 
Unable to check TDB lock owner as the lock file contains invalid data
    doing:
root: file:///opt/someDir/fuseki/fuseki/assembler.ttl#dataset with type: http://jena.hpl.hp.com/2008/tdb#DatasetTDB assembler class: class org.apache.jena.tdb.assembler.DatasetAssemblerTDB

    at org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:165)
    at org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:144)
    at org.apache.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:93)
    at org.apache.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:39)
    at org.apache.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:35)
    at org.apache.jena.sparql.core.assembler.AssemblerUtils.build(AssemblerUtils.java:126)
    at arq.cmdline.ModAssembler.create(ModAssembler.java:72)
    at arq.cmdline.ModDatasetAssembler.createDataset(ModDatasetAssembler.java:42)
    at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.processModulesAndArgs(FusekiCmd.java:285)
    at jena.cmd.CmdArgModule.process(CmdArgModule.java:52)
    at jena.cmd.CmdMain.mainMethod(CmdMain.java:92)
    at jena.cmd.CmdMain.mainRun(CmdMain.java:58)
    at jena.cmd.CmdMain.mainRun(CmdMain.java:45)
    at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.innerMain(FusekiCmd.java:103)
    at org.apache.jena.fuseki.cmd.FusekiCmd.main(FusekiCmd.java:67)
Caused by: org.apache.jena.tdb.base.file.FileException: Unable to check TDB lock owner as the lock file contains invalid data
    at org.apache.jena.tdb.base.file.LocationLock.getOwner(LocationLock.java:111)
    at org.apache.jena.tdb.base.file.LocationLock.canObtain(LocationLock.java:130)
    at org.apache.jena.tdb.StoreConnection._makeAndCache(StoreConnection.java:259)
    at org.apache.jena.tdb.StoreConnection.make(StoreConnection.java:231)
    at org.apache.jena.tdb.StoreConnection.make(StoreConnection.java:237)
    at org.apache.jena.tdb.transaction.DatasetGraphTransaction.<init>(DatasetGraphTransaction.java:73)
    at org.apache.jena.tdb.sys.TDBMaker._create(TDBMaker.java:55)
    at org.apache.jena.tdb.sys.TDBMaker.createDatasetGraphTransaction(TDBMaker.java:42)
    at org.apache.jena.tdb.TDBFactory._createDatasetGraph(TDBFactory.java:89)
    at org.apache.jena.tdb.TDBFactory.createDatasetGraph(TDBFactory.java:71)
    at org.apache.jena.tdb.assembler.DatasetAssemblerTDB.make(DatasetAssemblerTDB.java:57)
    at org.apache.jena.tdb.assembler.DatasetAssemblerTDB.createDataset(DatasetAssemblerTDB.java:48)
    at org.apache.jena.sparql.core.assembler.DatasetAssembler.open(DatasetAssembler.java:43)
    at org.apache.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.openBySpecificType(AssemblerGroup.java:157)
    ... 14 more
Caused by: java.lang.NumberFormatException: For input string: "6893
"
    at   
 java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:580)
    at java.lang.Integer.parseInt(Integer.java:615)
    at org.apache.jena.tdb.base.file.LocationLock.getOwner(LocationLock.java:106)
    ... 27 more

My question is: How can I use fuseki with tdb2.tdbloader, and more importantly, if I do a daily update, is the directory in data folder increase daily? Is there anyway for me to merge them?

Upvotes: 1

Views: 477

Answers (1)

Gao
Gao

Reputation: 932

I know what's the problem: tdb2.xxx only works on tdb2. And my configuration in fuseki is tdb1 not tdb2.

By the way, tdb2.tdbloader does not support incremental update on dataset. It only adds spo upon the old ones.

Upvotes: 0

Related Questions