jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1811408 - in /jena/site/trunk/content/documentation: tdb/index.mdtext tdb2/ tdb2/index.md tdb2/tdb2_admin.md tdb2/tdb2_cmds.md tdb2/tdb2_fuseki.md tdb2/tdb2_migration.md
Date Sat, 07 Oct 2017 11:45:07 GMT
Author: andy
Date: Sat Oct  7 11:45:06 2017
New Revision: 1811408

URL: http://svn.apache.org/viewvc?rev=1811408&view=rev
Log:
TDB2 documentation

Added:
    jena/site/trunk/content/documentation/tdb2/
    jena/site/trunk/content/documentation/tdb2/index.md
    jena/site/trunk/content/documentation/tdb2/tdb2_admin.md
    jena/site/trunk/content/documentation/tdb2/tdb2_cmds.md
    jena/site/trunk/content/documentation/tdb2/tdb2_fuseki.md
    jena/site/trunk/content/documentation/tdb2/tdb2_migration.md
Modified:
    jena/site/trunk/content/documentation/tdb/index.mdtext

Modified: jena/site/trunk/content/documentation/tdb/index.mdtext
URL: http://svn.apache.org/viewvc/jena/site/trunk/content/documentation/tdb/index.mdtext?rev=1811408&r1=1811407&r2=1811408&view=diff
==============================================================================
--- jena/site/trunk/content/documentation/tdb/index.mdtext (original)
+++ jena/site/trunk/content/documentation/tdb/index.mdtext Sat Oct  7 11:45:06 2017
@@ -1,4 +1,4 @@
-Title: TDB
+Title: Apache Jena - TDB
 
 TDB is a component of
 [Jena](http://jena.apache.org) for RDF storage
@@ -7,6 +7,12 @@ TDB can be used as a high performance RD
 This documentation describes the latest version, unless
 otherwise noted.
 
+This is the documentation for the current standard version of TDB. 
+This is called TDB1 to distinguish it from the next generation version
+[TDB2](../tdb2/)
+
+*TDB1 and TDB2 databases are not compatible.*
+
 A TDB store can be accessed and managed with the provided command
 line scripts and via the Jena API.  When accessed using [transactions](tdb_transactions.html)
 a TDB dataset is protected against corruption, unexpected process terminations and system
crashes.

Added: jena/site/trunk/content/documentation/tdb2/index.md
URL: http://svn.apache.org/viewvc/jena/site/trunk/content/documentation/tdb2/index.md?rev=1811408&view=auto
==============================================================================
--- jena/site/trunk/content/documentation/tdb2/index.md (added)
+++ jena/site/trunk/content/documentation/tdb2/index.md Sat Oct  7 11:45:06 2017
@@ -0,0 +1,30 @@
+Title: Apache Jena - TDB2
+
+TDB2 is a component of
+[Apache Jena](http://jena.apache.org) for RDF storage
+and query.  It support the full range of Jena APIs.
+TDB2 can be used as a high performance RDF store on a single machine.
+TDB2 can be used with Apache Jena Fuseki.
+
+TDB1 is the previous generation native storage system for Jena.
+
+Comparsed to TDB1:
+
+- No size limits on transactions : bulk uploads into a live Fuseki can be 100's
+of millions of triples.
+- Models and Graphs can be passed across transactions
+- Transactional only (there is currently no "autocommit" mode).
+- Better transaction control
+    - No queue of delayed updates
+    - No backlog problems.
+    - "Writer pays" - readers don't
+- Datatypes of numerics preserved; `xsd:doubles` supported.
+
+*TDB2 is not compatible with TDB1*
+
+## Documentation
+
+-  [Migrating from TDB1](tdb2_migration.html)
+-  [Use with Fuseki2](tdb2_fuseki.html)
+-  [Command line tools](tdb2_cmds.html)
+-  [Database administration](tdb2_admin.html)

Added: jena/site/trunk/content/documentation/tdb2/tdb2_admin.md
URL: http://svn.apache.org/viewvc/jena/site/trunk/content/documentation/tdb2/tdb2_admin.md?rev=1811408&view=auto
==============================================================================
--- jena/site/trunk/content/documentation/tdb2/tdb2_admin.md (added)
+++ jena/site/trunk/content/documentation/tdb2/tdb2_admin.md Sat Oct  7 11:45:06 2017
@@ -0,0 +1,4 @@
+Title: Apache Jena TDB2 - Database Administration.
+
+@@backup
+@@admin

Added: jena/site/trunk/content/documentation/tdb2/tdb2_cmds.md
URL: http://svn.apache.org/viewvc/jena/site/trunk/content/documentation/tdb2/tdb2_cmds.md?rev=1811408&view=auto
==============================================================================
--- jena/site/trunk/content/documentation/tdb2/tdb2_cmds.md (added)
+++ jena/site/trunk/content/documentation/tdb2/tdb2_cmds.md Sat Oct  7 11:45:06 2017
@@ -0,0 +1,22 @@
+Title: Apache Jena TDB2 - Command line tools.
+
+*TDB2 is not compatible with TDB1*
+
+Do not run TDB1 tools on a TDB2 database, nor run TDB2 tools on a TDB1 database.
+
+* `tdb2.tdbbackup`
+* `tdb2.tdbdump`
+* `tdb2.tdbcompact`
+* `tdb2.tdbloader`
+* `tdb2.tdbquery`
+* `tdb2.tdbstats`
+* `tdb2.tdbupdate`
+
+Example usage:
+
+```
+java -cp JENA_HOME/lib/* tdb2.tdbloader --loc <DB location> file1 file2 ...
+```
+where "`JENA_HOME`" is the location of an unpacked Apache Jena binary
+distribution.
+

Added: jena/site/trunk/content/documentation/tdb2/tdb2_fuseki.md
URL: http://svn.apache.org/viewvc/jena/site/trunk/content/documentation/tdb2/tdb2_fuseki.md?rev=1811408&view=auto
==============================================================================
--- jena/site/trunk/content/documentation/tdb2/tdb2_fuseki.md (added)
+++ jena/site/trunk/content/documentation/tdb2/tdb2_fuseki.md Sat Oct  7 11:45:06 2017
@@ -0,0 +1,83 @@
+Title: Apache Jena TDB2 - Use with Fuseki2
+
+TDB2 is incorporated into Fuseki2, both in the full server, with UI, and
+[Fuseki2 basic server](../fuseki2/fuseki-embedded.html#fuseki-basic).
+
+In each case, the database needs to be defined in a configuration file,
+either a completw server configuration (see below) or as an entry in the
+`FUSEKI_BASE/configuration/` area of the full server.
+ 
+
+Example complete server configuration file for full or basic servers:
+The base URL will be of the form `http::/_host:port_/tdb2-database`.
+
+```
+PREFIX :        <#>
+PREFIX fuseki:  <http://jena.apache.org/fuseki#>
+PREFIX rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#>
+PREFIX tdb2:    <http://jena.apache.org/2016/tdb#>
+PREFIX ja:      <http://jena.hpl.hp.com/2005/11/Assembler#>
+
+[] rdf:type fuseki:Server ;
+   fuseki:services (
+     <#service_tdb2>
+   ) .
+
+<#service_tdb2> rdf:type fuseki:Service ;
+    rdfs:label                      "TDB2 Service (RW)" ;
+    fuseki:name                     "tdb2-database" ;
+    fuseki:serviceQuery             "query" ;
+    fuseki:serviceQuery             "sparql" ;
+    fuseki:serviceUpdate            "update" ;
+    fuseki:serviceUpload            "upload" ;
+    fuseki:serviceReadWriteGraphStore      "data" ;
+    # A separate read-only graph store endpoint:
+    fuseki:serviceReadGraphStore       "get" ;
+    fuseki:dataset           <#tdb_dataset_readwrite> ;
+    .
+
+<#tdb_dataset_readwrite> rdf:type      *tdb2:DatasetTDB2* ;
+    *tdb2:location* "TDB2" ;
+    ## This works: tdb2:unionDefaultGraph true ;
+     .
+```
+
+This example is available in [fuseki-tdb2.ttl](https://github.com/apache/jena/tree/master/jena-fuseki2/examples/fuseki-tdb2.ttl)
+
+The key difference is the declared `rdf:type` of the dataset.
+
+Note that the Fuseki UI does not provide a way to create TDB2 databases;
+a configuration file must be used. Once setup, upload, query and graph
+editting will be routed to the TDB2 database.
+
+For a service configuration in `FUSEKI_BASE/configuration/`:
+
+```
+PREFIX :        <#>
+PREFIX fuseki:  <http://jena.apache.org/fuseki#>
+PREFIX rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX rdfs:    <http://www.w3.org/2000/01/rdf-schema#>
+PREFIX tdb2:    <http://jena.apache.org/2016/tdb#>
+PREFIX ja:      <http://jena.hpl.hp.com/2005/11/Assembler#>
+
+<#service_tdb2> rdf:type fuseki:Service ;
+    rdfs:label                      "TDB2 Service (RW)" ;
+    fuseki:name                     "tdb2-database" ;
+    fuseki:serviceQuery             "query" ;
+    fuseki:serviceQuery             "sparql" ;
+    fuseki:serviceUpdate            "update" ;
+    fuseki:serviceUpload            "upload" ;
+    fuseki:serviceReadWriteGraphStore      "data" ;
+    # A separate read-only graph store endpoint:
+    fuseki:serviceReadGraphStore       "get" ;
+    fuseki:dataset           <#tdb_dataset_readwrite> ;
+    .
+
+
+<#tdb_dataset_readwrite> rdf:type      *tdb2:DatasetTDB2* ;
+    *tdb2:location* "TDB2" ;
+    ## This works: tdb2:unionDefaultGraph true ;
+     .
+
+```
\ No newline at end of file

Added: jena/site/trunk/content/documentation/tdb2/tdb2_migration.md
URL: http://svn.apache.org/viewvc/jena/site/trunk/content/documentation/tdb2/tdb2_migration.md?rev=1811408&view=auto
==============================================================================
--- jena/site/trunk/content/documentation/tdb2/tdb2_migration.md (added)
+++ jena/site/trunk/content/documentation/tdb2/tdb2_migration.md Sat Oct  7 11:45:06 2017
@@ -0,0 +1,24 @@
+Title: Apache Jena TDB2 - Migration from TDB1.
+
+Simple migration of code is to use `TDB2Factory` in place of TDBFactory to create
+datasets. `DatasetGraph` objects are now created via `DatabaseMgr`.
+
+Beware that many classes have the same name in TDB1 and TDB2 but are in
+different packages. The API package for TDB2 is `org.apache.jena.tdb2`.
+
+Example code: **`TDB2Factory`**
+
+```
+import org.apache.jena.tdb2.TDB2Factory;
+...
+
+    public static void main(String[] args) {
+         Dataset ds = TDB2Factory.createDataset() ;
+         Txn.execWrite(ds, ()->{
+              RDFDataMgr.read(ds, "SomeData.ttl");
+         }) ;
+          Txn.execRead(dsg, ()->{
+             RDFDataMgr.write(System.out, ds, Lang.TRIG) ;
+         }) ;
+    }
+```



Mime
View raw message