我要求每天增量更新tdb文件。所以我使用tdb2.tdbloader来生成生成的N-Triples文件。但是当作业完成时,包含tdb数据的数据目录有一个名为" data-0001"的新目录。或者。当我重新启动fuseki服务器时,它给了我这个例外:
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
我的问题是:如何将fuseki与tdb2.tdbloader一起使用,更重要的是,如果我每天都进行更新,那么数据文件夹中的目录是否每天都在增加?无论如何,我有合并它们吗?
答案 0 :(得分:0)
我知道问题是什么:tdb2.xxx仅适用于tdb2。而我在fuseki中的配置是tdb1而不是tdb2。
顺便说一句,tdb2.tdbloader不支持对数据集进行增量更新。它只会添加旧的。