我正在从命令行运行 Blazegraph 2.1.1。Web 界面工作正常,许多 GET 操作也是如此。我想通过 REST API 创建一个新的命名空间。我用这个命令运行 Blazegraph:
java -server -Xmx4g -Dbigdata.propertyFile=RWStore.properties -jar blazegraph.jar
这是帖子:
http://localhost:9999/bigdata/namespace
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<entry key="com.bigdata.rdf.sail.namespace">MY_NAMESPACE</entry>
<entry key="com.bigdata.rdf.store.AbstractTripleStore.quads">false</entry>
<entry key="com.bigdata.rdf.store.AbstractTripleStore.axiomsClass">com.bigdata.rdf.axioms.OwlAxioms</entry>
<entry key="com.bigdata.rdf.sail.truthMaintenance">true</entry>
</properties>
每当我运行它时,我都会得到现有命名空间列表(与 GET 相同)作为响应,Postman 将响应标头显示为:
Content-Type →application/rdf+xml
Server →Jetty(9.2.z-SNAPSHOT)
Transfer-Encoding →chunked
当我对部署在 Tomcat 上的 Blazegraph 实例运行相同的 POST 时,它按预期工作并创建了命名空间。
我是否需要在命令行版本中启用允许创建命名空间的功能?我使用与 Tomcat 实例相同的属性文件(虽然不同的日志)。我也尝试过覆盖 web.xml,但这也没有什么不同。
这是我的属性文件:
com.bigdata.journal.AbstractJournal.file=C:/Development/Ontology/BlazegraphServer/bigdata.jnl
com.bigdata.journal.AbstractJournal.bufferMode=DiskRW
com.bigdata.service.AbstractTransactionService.minReleaseAge=1
com.bigdata.btree.writeRetentionQueue.capacity=4000
com.bigdata.btree.BTree.branchingFactor=128
com.bigdata.journal.AbstractJournal.initialExtent=209715200
com.bigdata.journal.AbstractJournal.maximumExtent=209715200
com.bigdata.rwstore.RWStore.readBlobsAsync=false
com.bigdata.rdf.store.DataLoader.closure=None
com.bigdata.rdf.sail.truthMaintenance=true
com.bigdata.rdf.store.AbstractTripleStore.quads=false
com.bigdata.rdf.store.AbstractTripleStore.statementIdentifiers=true
com.bigdata.rdf.store.AbstractTripleStore.textIndex=true
com.bigdata.rdf.store.AbstractTripleStore.axiomsClass=com.bigdata.rdf.axioms.OwlAxioms
com.bigdata.namespace.kb.lex.com.bigdata.btree.BTree.branchingFactor=400
com.bigdata.namespace.kb.spo.com.bigdata.btree.BTree.branchingFactor=1024