com.bigdata.sparse
Class AtomicRowFilter

java.lang.Object
  extended by com.bigdata.btree.filter.TupleTransformer<TPS.TPV,TPS>
      extended by com.bigdata.sparse.AtomicRowFilter
All Implemented Interfaces:
ITupleFilter<TPS>, IRowStoreConstants, cutthecrap.utils.striterators.IFilter, Serializable

public class AtomicRowFilter
extends TupleTransformer<TPS.TPV,TPS>
implements IRowStoreConstants

Transforms an ITupleIterator reading directly on an IIndex backing a SparseRowStore into an ITupleIterator visiting logical ITPS rows.

Version:
$Id: AtomicRowFilter.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson
See Also:
Serialized Form
TODO:
Look at the remove semantics for the sparse row store. This would have to delete the logical row, or at least all property values that were materialized from the logical row. in fact, since this is a many:one transform, we must override the remove() impl for the inner class on TupleTransformer., You could replace the AtomicRowRead with this iterator by setting the capacity to ONE (1). However, that will do more work when we are only trying to read a single row on a local index since we will have to serialize and then de-serialize the TPS for that logical row. (For a remote read the effort should be the same).

Field Summary
protected static boolean DEBUG
           
protected static boolean INFO
           
protected static org.apache.log4j.Logger log
           
 
Fields inherited from class com.bigdata.btree.filter.TupleTransformer
tupleSer
 
Fields inherited from interface com.bigdata.sparse.IRowStoreConstants
AUTO_TIMESTAMP, AUTO_TIMESTAMP_UNIQUE, CURRENT_ROW, MAX_TIMESTAMP, MIN_TIMESTAMP
 
Constructor Summary
protected AtomicRowFilter(Schema schema, long fromTime, long toTime, INameFilter nameFilter)
           
 
Method Summary
protected  ITupleIterator<TPS> newTransformer(LookaheadTupleFilter.ILookaheadTupleIterator<TPS.TPV> src)
          Method responsible for creating a new instance of the iterator that reads from the lookahead source whose tuples are of the source type and visits the transformed tuples.
 
Methods inherited from class com.bigdata.btree.filter.TupleTransformer
filter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final transient org.apache.log4j.Logger log

INFO

protected static final transient boolean INFO

DEBUG

protected static final transient boolean DEBUG
Constructor Detail

AtomicRowFilter

protected AtomicRowFilter(Schema schema,
                          long fromTime,
                          long toTime,
                          INameFilter nameFilter)
Parameters:
schema - The schema governing the row.
fromTime - The first timestamp for which timestamped property values will be accepted.
toTime - The first timestamp for which timestamped property values will NOT be accepted -or- IRowStoreConstants.CURRENT_ROW to accept only the most current binding whose timestamp is GTE fromTime.
nameFilter - An optional filter used to select the values for property names accepted by that filter.
Method Detail

newTransformer

protected ITupleIterator<TPS> newTransformer(LookaheadTupleFilter.ILookaheadTupleIterator<TPS.TPV> src)
Description copied from class: TupleTransformer
Method responsible for creating a new instance of the iterator that reads from the lookahead source whose tuples are of the source type and visits the transformed tuples.

Specified by:
newTransformer in class TupleTransformer<TPS.TPV,TPS>


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