SPARQLthon45/blazegraph

提供:TogoWiki

移動: 案内, 検索

目次

概要

Virtuosoで運用しているTogoGenomeのRDFを他のRDFストアで動作できるかの検証を開始。

  • 旧製品名はBigdata(R)で、2015にBlazegraphへ改名
  • Wikidataで使用されている
  • 商用ライセンスでもトリプル数の制限がない
  • 2009年の時点で120億のロード実績があり、1T(1兆トリプル)以上のスケールアウトを謳っているProduct

ライセンス

オープンソース版(GPLv2)と商用版があり、差異はGPU Accelerationが使用できるか否か。Product Features

インストール

参考ページ(Quick Start)
※ 動作環境 Java7 以上
Quick Startのページにある[Download the latest blazegraph.jar file]のリンクをクリックして"blazegraph.jar"をダウンロードする

起動確認

java -server -Xmx4g -jar blazegraph.jar

http://localhost:9999/blazegraph/ にアクセスできたら起動成功

設定ファイル

設定ファイルは任意の名前で作成でき(拡張子は.properties)、起動時やロード実行時に指定する。
Configuring Blazegraph ページには使用用途に合わせていくつかのモードの設定ファイル例が記されている。
設定項目が多すぎるので内容は未調査。

TripleモードとQuadモード

デフォルトの設定ではグラフが使えないトリプルモードになっており、このモードでFROM句やGRAPH句を使用したSPARQLを投げるとエラーになるため、Quads Mode のように設定したほうがよい。
Tripleモードの設定ファイルでロードした後に設定ファイルをQuadモードに書き換えてロードしてもFROM句でエラーが出るので、ロード時にQuadモードにする必要がありそう。
Quadsモードにすると「inference or provenance」がサポートされないと記述があるが詳細は不明。

TogoGenome用設定ファイル

トリプル件数が多くパフォーマンスのために以下のような設定ファイルの例を参考にして記述。(詳細未調査)


設定ファイル名: blazegraph_togogenome.properties

# enable quads
com.bigdata.rdf.store.AbstractTripleStore.axiomsClass=com.bigdata.rdf.axioms.NoAxioms
com.bigdata.rdf.store.AbstractTripleStore.quads=true

# set the initial and maximum extent of the journal
com.bigdata.journal.AbstractJournal.initialExtent=2097152000
com.bigdata.journal.AbstractJournal.maximumExtent=2097152000

# turn off automatic inference in the SAIL
com.bigdata.rdf.sail.truthMaintenance=false
com.bigdata.rdf.sail.bufferCapacity=1000000

# direct sesame to bop translation.
com.bigdata.rdf.sail.newEvalStrategy=true

# don't store justification chains, meaning retraction requires full manual 
# re-closure of the database
com.bigdata.rdf.store.AbstractTripleStore.justify=false

# turn off the statement identifiers feature for provenance
com.bigdata.rdf.store.AbstractTripleStore.statementIdentifiers=false

# RWStore (scalable single machine backend)
com.bigdata.journal.AbstractJournal.bufferMode=DiskRW

com.bigdata.btree.writeRetentionQueue.capacity=4000
com.bigdata.btree.BTree.branchingFactor=128

# Bump up the branching factor for the statement indices on the default kb.
com.bigdata.namespace.kb.spo.com.bigdata.btree.BTree.branchingFactor=400
# Bump up the branching factor for the lexicon indices on the default kb.
com.bigdata.namespace.kb.lex.com.bigdata.btree.BTree.branchingFactor=1024

# database file
com.bigdata.journal.AbstractJournal.file=/data/store/blazegraph/blazegraph.togogenome.jnl

com.bigdata.journal.AbstractJournal.fileでデータベースファイルを指定できる。

起動

停止

Ctrl + cで停止

データロード

実績:33億トリプル(重複なしで18億) = 約31時間

/mw/SPARQLthon45/blazegraph」より作成