com.bigdata.rdf.load
Class VerifyStatementBuffer

java.lang.Object
  extended by com.bigdata.rdf.rio.StatementBuffer
      extended by com.bigdata.rdf.load.VerifyStatementBuffer
All Implemented Interfaces:
IStatementBuffer, IBuffer

public class VerifyStatementBuffer
extends StatementBuffer

Statements inserted into the buffer are verified against the database. No new Values or Statements will be written on the database by this class. The #of URI, Literal, and told triples not found in the database are reported by various counters.

Version:
$Id: VerifyStatementBuffer.java 4548 2011-05-25 19:36:34Z thompsonbry $
Author:
Bryan Thompson
TODO:
The counters are being updated on each incremental write rather than tracked on a per-task basis and then updated iff the task as a whole succeeds. This causes double-counting of both found and not found totals when a task errors and then retries. The counters need to be attached to the task and the task logic extended to capture them rather than to the statement buffer (a bit of a mess).

Field Summary
 
Fields inherited from class com.bigdata.rdf.rio.StatementBuffer
capacity, database, distinct, numBNodes, numLiterals, numSIDs, numStmts, numURIs, numValues, stmts, valueFactory, values
 
Constructor Summary
VerifyStatementBuffer(AbstractTripleStore database, int capacity, AtomicLong nterms, AtomicLong ntermsNotFound, AtomicLong ntriples, AtomicLong ntriplesNotFound)
           
 
Method Summary
protected  void incrementalWrite()
          Overriden to batch verify the terms and statements in the buffer.
 
Methods inherited from class com.bigdata.rdf.rio.StatementBuffer
_clear, add, add, add, add, addStatements, addTerms, flush, getDatabase, getDistinctTerm, getStatementStore, handleStatement, isEmpty, nearCapacity, processDeferredStatements, reset, setBNodeMap, setChangeLog, setReadOnly, size, writeSPOs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VerifyStatementBuffer

public VerifyStatementBuffer(AbstractTripleStore database,
                             int capacity,
                             AtomicLong nterms,
                             AtomicLong ntermsNotFound,
                             AtomicLong ntriples,
                             AtomicLong ntriplesNotFound)
Parameters:
database -
capacity -
Method Detail

incrementalWrite

protected void incrementalWrite()
Overriden to batch verify the terms and statements in the buffer. FIXME Verify that StatementBuffer.flush() is doing the right thing for this case (esp, how it handles bnodes when appearing as {s,p,o} or when appearing as the statement identifier).

Overrides:
incrementalWrite in class StatementBuffer


Copyright © 2006-2011 SYSTAP, LLC. All Rights Reserved.