我有一个包含以下行的文件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
然后,我使用以下命令运行bulk loader:
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 documentation中找到了此错误的解释。它说我必须在属性文件中设置属性defaultGraph
。因此,我在属性文件中添加了以下行:
defaultGraph=http://example.org
然而,我也遇到了同样的错误。
答案 0 :(得分:2)
需要在命令行中添加defaultGraph
作为选项,而不是在属性文件中。
$ java -cp blazegraph.jar com.bigdata.rdf.store.DataLoader -defaultGraph http://example.org p.properties data.nq
(感谢有人帮我在Blazegraph邮件列表中回答这个问题)。