Difference between revisions of " Configuring Blazegraph"

From Blazegraph
Jump to: navigation, search
 
Line 5: Line 5:
 
If none of those modes seem right for you, let us help you devise the mode that is right for your particular problem.  We offer development support, production support, and custom services around the platform.
 
If none of those modes seem right for you, let us help you devise the mode that is right for your particular problem.  We offer development support, production support, and custom services around the platform.
  
==="Full Feature Mode"===
+
===Full Feature Mode===
 
This turns on all of Blazegraph’s goodies - statement identifiers, free-text index, incremental inference and truth maintenance. The following is how you would use Blazegraph in a system that requires statement-level provenance, free-text search, and incremental load and retraction.<br>
 
This turns on all of Blazegraph’s goodies - statement identifiers, free-text index, incremental inference and truth maintenance. The following is how you would use Blazegraph in a system that requires statement-level provenance, free-text search, and incremental load and retraction.<br>
 
[https://github.com/blazegraph/database/blob/master/bigdata-sails/src/samples/com/bigdata/samples/fullfeature.properties fullfeature.properties]:
 
[https://github.com/blazegraph/database/blob/master/bigdata-sails/src/samples/com/bigdata/samples/fullfeature.properties fullfeature.properties]:
Line 17: Line 17:
 
</pre>
 
</pre>
  
==="RDF-Only Mode"===
+
===RDF-Only Mode===
 
This mode turns off all inference and truth maintenance, for when you just need to store triples.<br>
 
This mode turns off all inference and truth maintenance, for when you just need to store triples.<br>
 
[https://github.com/blazegraph/database/blob/master/bigdata-sails/src/samples/com/bigdata/samples/rdfonly.properties rdfonly.properties]:
 
[https://github.com/blazegraph/database/blob/master/bigdata-sails/src/samples/com/bigdata/samples/rdfonly.properties rdfonly.properties]:
Line 29: Line 29:
 
</pre>
 
</pre>
  
==="Fast Load Mode"===
+
===Fast Load Mode===
 
We run Blazegraph in Fast Load Mode when we are evaluating load and query performance, for example with the LUBM harness. This turns off some features that are unnecessary for this type of evaluation (statement identifiers and the free text index), which increases throughput. This mode still does inference, but it is database-at-once instead of incremental. It also turns off the recording of justification chains, meaning it is an extremely inefficient mode if you need to retract statements (all inferences would have to be wiped and re-computed). This is a highly specialized mode for highly specialized problem sets.
 
We run Blazegraph in Fast Load Mode when we are evaluating load and query performance, for example with the LUBM harness. This turns off some features that are unnecessary for this type of evaluation (statement identifiers and the free text index), which increases throughput. This mode still does inference, but it is database-at-once instead of incremental. It also turns off the recording of justification chains, meaning it is an extremely inefficient mode if you need to retract statements (all inferences would have to be wiped and re-computed). This is a highly specialized mode for highly specialized problem sets.
  
 +
[https://github.com/blazegraph/database/blob/master/bigdata-sails/src/samples/com/bigdata/samples/fastload.properties fastload.properties]
 +
 +
<pre>
 +
# This configuration turns off incremental inference for load and retract, so
 +
# you must explicitly force these operations if you want to compute the closure
 +
# of the knowledge base.  Forcing the closure requires punching through the SAIL
 +
# layer.  Of course, if you are not using inference then this configuration is
 +
# just the ticket and is quite fast.
 +
 +
# set the initial and maximum extent of the journal
 +
com.bigdata.journal.AbstractJournal.initialExtent=209715200
 +
com.bigdata.journal.AbstractJournal.maximumExtent=209715200
 +
 +
# turn off automatic inference in the SAIL
 +
com.bigdata.rdf.sail.truthMaintenance=false
 +
 +
# 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
 +
 +
# turn off the free text index
 +
com.bigdata.rdf.store.AbstractTripleStore.textIndex=false
 +
 +
# RWStore (scalable single machine backend)
 +
com.bigdata.journal.AbstractJournal.bufferMode=DiskRW
 +
</pre>
 +
 +
===Quads Mode===
 +
To enable quads mode, use the example below.  Currently, Blazegraph does not support inference or provenance for quads, so those features are automatically turned off in QUADS_MODE.
 +
 +
[https://github.com/blazegraph/database/blob/master/bigdata-sails/src/samples/com/bigdata/samples/quads.properties quads.properties]
 +
 +
<pre>
 +
 +
# changing the axiom model to none essentially disables all inference
 +
com.bigdata.rdf.store.AbstractTripleStore.axiomsClass=com.bigdata.rdf.axioms.NoAxioms
 +
com.bigdata.rdf.store.AbstractTripleStore.quads=true
 +
com.bigdata.rdf.store.AbstractTripleStore.statementIdentifiers=false
 +
 +
# turn off automatic inference in the SAIL
 +
com.bigdata.rdf.sail.truthMaintenance=false
 +
 +
com.bigdata.journal.AbstractJournal.bufferMode=DiskRW
 +
</pre>
 +
=== Enabling Text Indexing ===
 +
To enable text indexing, add the property below when creating your namespace.  It may be combined with any of the configurations.
 +
 +
com.bigdata.rdf.store.AbstractTripleStore.textIndex=true
  
  
Line 37: Line 88:
  
 
We've set up three modes for Blazegraph that configure the store properly for triples, triples with provenance, and quads.  Look for the TRIPLES_MODE, TRIPLES_MODE_WITH_PROVENANCE, and QUADS_MODE on AbstractTripleStore.Options and BigdataSail.Options.
 
We've set up three modes for Blazegraph that configure the store properly for triples, triples with provenance, and quads.  Look for the TRIPLES_MODE, TRIPLES_MODE_WITH_PROVENANCE, and QUADS_MODE on AbstractTripleStore.Options and BigdataSail.Options.
 
Currently Blazegraph does not support inference or provenance for quads, so those features are automatically turned off in QUADS_MODE.
 

Latest revision as of 21:37, 10 March 2016

We’ve created some configuration files that represent various common “modes” with which you might want to run Blazegraph. You can find these and other modes in the form of properties files in the Blazegraph source tree, in the “bigdata-sails” module, at:

bigdata-sails/src/samples/com/bigdata/samples [1]

If none of those modes seem right for you, let us help you devise the mode that is right for your particular problem. We offer development support, production support, and custom services around the platform.

Full Feature Mode

This turns on all of Blazegraph’s goodies - statement identifiers, free-text index, incremental inference and truth maintenance. The following is how you would use Blazegraph in a system that requires statement-level provenance, free-text search, and incremental load and retraction.
fullfeature.properties:

# As you can see, bigdata is nearly in full-feature mode by default.
# All we do here is turn on the provenance mode.
com.bigdata.rdf.store.AbstractTripleStore.statementIdentifiers=true

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

RDF-Only Mode

This mode turns off all inference and truth maintenance, for when you just need to store triples.
rdfonly.properties:

# changing the axiom model to none essentially disables all inference
com.bigdata.rdf.store.AbstractTripleStore.axiomsClass=com.bigdata.rdf.axioms.NoAxioms

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

Fast Load Mode

We run Blazegraph in Fast Load Mode when we are evaluating load and query performance, for example with the LUBM harness. This turns off some features that are unnecessary for this type of evaluation (statement identifiers and the free text index), which increases throughput. This mode still does inference, but it is database-at-once instead of incremental. It also turns off the recording of justification chains, meaning it is an extremely inefficient mode if you need to retract statements (all inferences would have to be wiped and re-computed). This is a highly specialized mode for highly specialized problem sets.

fastload.properties

# This configuration turns off incremental inference for load and retract, so
# you must explicitly force these operations if you want to compute the closure
# of the knowledge base.  Forcing the closure requires punching through the SAIL
# layer.  Of course, if you are not using inference then this configuration is
# just the ticket and is quite fast.

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

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

# 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

# turn off the free text index
com.bigdata.rdf.store.AbstractTripleStore.textIndex=false

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

Quads Mode

To enable quads mode, use the example below. Currently, Blazegraph does not support inference or provenance for quads, so those features are automatically turned off in QUADS_MODE.

quads.properties


# changing the axiom model to none essentially disables all inference
com.bigdata.rdf.store.AbstractTripleStore.axiomsClass=com.bigdata.rdf.axioms.NoAxioms
com.bigdata.rdf.store.AbstractTripleStore.quads=true
com.bigdata.rdf.store.AbstractTripleStore.statementIdentifiers=false

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

com.bigdata.journal.AbstractJournal.bufferMode=DiskRW

Enabling Text Indexing

To enable text indexing, add the property below when creating your namespace. It may be combined with any of the configurations.

com.bigdata.rdf.store.AbstractTripleStore.textIndex=true


[1] https://github.com/blazegraph/database/blob/master/bigdata-sails/src/samples/com/bigdata/samples/

We've set up three modes for Blazegraph that configure the store properly for triples, triples with provenance, and quads. Look for the TRIPLES_MODE, TRIPLES_MODE_WITH_PROVENANCE, and QUADS_MODE on AbstractTripleStore.Options and BigdataSail.Options.