我有一个data.nq
包含以下行的文件:
<http://example.org/a> <http://example.org/b> <http://example.org/c> .
<http://example.org/d> <http://example.org/e> <http://example.org/f> <http://example.org/g> .
在同一目录下,有blazegraph.jar
(使用版本 2.1.0)和一个文件p.properties
,内容如下:
com.bigdata.btree.BTree.branchingFactor=512
com.bigdata.btree.writeRetentionQueue.capacity=4000
com.bigdata.journal.AbstractJournal.bufferMode=DiskRW
com.bigdata.journal.AbstractJournal.file=blazegraph.jnl
com.bigdata.journal.AbstractJournal.initialExtent=209715200
com.bigdata.journal.AbstractJournal.maximumExtent=209715200
com.bigdata.namespace.kb.spo.com.bigdata.btree.BTree.branchingFactor=1024
com.bigdata.rdf.sail.truthMaintenance=false
com.bigdata.rdf.store.AbstractTripleStore.axiomsClass=com.bigdata.rdf.axioms.NoAxioms
com.bigdata.rdf.store.AbstractTripleStore.justify=false
com.bigdata.rdf.store.AbstractTripleStore.quads=true
com.bigdata.rdf.store.AbstractTripleStore.statementIdentifiers=false
com.bigdata.rdf.store.AbstractTripleStore.textIndex=false
com.bigdata.rdf.store.DataLoader.commit=Incremental
com.bigdata.service.AbstractTransactionService.minReleaseAge=1
然后,我使用以下命令运行批量加载程序:
java -cp blazegraph.jar com.bigdata.rdf.store.DataLoader p.properties data.nq
但是,我收到以下错误:
Reading properties: p.properties
Will load from: data.nq
Journal file: blazegraph.jnl
ERROR: SPORelation.java:2303: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: context not bound: < TermId(1U), TermId(2U), TermId(3U) : Expli
cit >
java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: context not bound: < TermId(1U), TermId(2U), TermId(3U) : Explicit >
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at com.bigdata.rdf.spo.SPORelation.logFuture(SPORelation.java:2298)
at com.bigdata.rdf.spo.SPORelation.insert(SPORelation.java:2253)
at com.bigdata.rdf.store.AbstractTripleStore.addStatements(AbstractTripleStore.java:4392)
at com.bigdata.rdf.rio.StatementBuffer$Batch.writeSPOs(StatementBuffer.java:2126)
at com.bigdata.rdf.rio.StatementBuffer$Batch.addStatements(StatementBuffer.java:1975)
at com.bigdata.rdf.rio.StatementBuffer$Batch.writeNow(StatementBuffer.java:1860)
at com.bigdata.rdf.rio.StatementBuffer$Batch.access$1000(StatementBuffer.java:1654)
at com.bigdata.rdf.rio.StatementBuffer$DrainQueueCallable.call(StatementBuffer.java:818)
at com.bigdata.rdf.rio.StatementBuffer$DrainQueueCallable.call(StatementBuffer.java:794)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at com.bigdata.util.concurrent.LatchedExecutor$1.run(LatchedExecutor.java:121)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: context not bound: < TermId(1U), TermId(2U), TermId(3U) : Explicit >
at com.bigdata.rdf.spo.SPOIndexWriter.call(SPOIndexWriter.java:266)
at com.bigdata.rdf.spo.SPOIndexWriter.call(SPOIndexWriter.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
... 3 more
ERROR: Banner.java:160: Uncaught exception in thread
java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: context not bound: < TermId(1U), TermId(2U), TermId(3U) : Explicit >
at com.bigdata.rdf.rio.StatementBuffer.flush(StatementBuffer.java:954)
at com.bigdata.rdf.rio.PresortRioLoader.success(PresortRioLoader.java:108)
at com.bigdata.rdf.rio.BasicRioLoader.loadRdf2(BasicRioLoader.java:251)
at com.bigdata.rdf.rio.BasicRioLoader.loadRdf(BasicRioLoader.java:176)
at com.bigdata.rdf.store.DataLoader.loadData4_ParserErrors_Not_Trapped(DataLoader.java:1595)
at com.bigdata.rdf.store.DataLoader.loadFiles(DataLoader.java:1359)
at com.bigdata.rdf.store.DataLoader.main(DataLoader.java:2085)
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: context not bound: < TermId(1U), TermId(2U), TermId(3U) : Explicit >
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at com.bigdata.rdf.rio.StatementBuffer.flush(StatementBuffer.java:940)
... 6 more
Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: context not bound: < TermId(1U), TermId(2U), TermId(3U) : Explicit >
at com.bigdata.rdf.spo.SPORelation.insert(SPORelation.java:2272)
at com.bigdata.rdf.store.AbstractTripleStore.addStatements(AbstractTripleStore.java:4392)
at com.bigdata.rdf.rio.StatementBuffer$Batch.writeSPOs(StatementBuffer.java:2126)
at com.bigdata.rdf.rio.StatementBuffer$Batch.addStatements(StatementBuffer.java:1975)
at com.bigdata.rdf.rio.StatementBuffer$Batch.writeNow(StatementBuffer.java:1860)
at com.bigdata.rdf.rio.StatementBuffer$Batch.access$1000(StatementBuffer.java:1654)
at com.bigdata.rdf.rio.StatementBuffer$DrainQueueCallable.call(StatementBuffer.java:818)
at com.bigdata.rdf.rio.StatementBuffer$DrainQueueCallable.call(StatementBuffer.java:794)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at com.bigdata.util.concurrent.LatchedExecutor$1.run(LatchedExecutor.java:121)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: context not bound: < TermId(1U), TermId(2U), TermId(3U) : Explicit >
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:188)
at com.bigdata.rdf.spo.SPORelation.logFuture(SPORelation.java:2298)
at com.bigdata.rdf.spo.SPORelation.insert(SPORelation.java:2253)
... 12 more
Caused by: java.lang.IllegalArgumentException: context not bound: < TermId(1U), TermId(2U), TermId(3U) : Explicit >
at com.bigdata.rdf.spo.SPOIndexWriter.call(SPOIndexWriter.java:266)
at com.bigdata.rdf.spo.SPOIndexWriter.call(SPOIndexWriter.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
... 3 more
我也这样做,但将四边形模式设置为关闭。也就是说,在 中设置以下属性p.properties
:
com.bigdata.rdf.store.AbstractTripleStore.quads=false
在这种情况下,我没有收到错误,但数据集中也没有命名图。
如何使用批量加载程序加载四边形?
更新:我在Blazegraph 文档中找到了对此错误的解释。它说我必须defaultGraph
在属性文件中设置属性。因此,我在属性文件中添加了以下行:
defaultGraph=http://example.org
但是,我得到了同样的错误。