com.bigdata.bop.solutions
Class JVMDistinctBindingSetsOp

java.lang.Object
  extended by com.bigdata.bop.CoreBaseBOp
      extended by com.bigdata.bop.BOpBase
          extended by com.bigdata.bop.PipelineOp
              extended by com.bigdata.bop.solutions.JVMDistinctBindingSetsOp
All Implemented Interfaces:
BOp, IPropertySet, Serializable, Cloneable

public class JVMDistinctBindingSetsOp
extends PipelineOp

A pipelined DISTINCT operator based on a hash table.

Note: This implementation is a pipelined operator which inspects each chunk of solutions as they arrive and those solutions which are distinct for each chunk are passed on. It uses a ConcurrentMap and is thread-safe. TODO Look into reconciling this class with JVMHashJoinUtility. However, note that this implementation is thread-safe and uses a ConcurrentMap. It may be better to leave things as they are since this implementation may be more efficient for the special case which it handles.

Version:
$Id: DistinctElementFilter.java 3466 2010-08-27 14:28:04Z thompsonbry $
Author:
Bryan Thompson
See Also:
Serialized Form

Nested Class Summary
static interface JVMDistinctBindingSetsOp.Annotations
           
 
Field Summary
 
Fields inherited from class com.bigdata.bop.CoreBaseBOp
DEFAULT_INITIAL_CAPACITY
 
Fields inherited from interface com.bigdata.bop.BOp
NOANNS, NOARGS
 
Constructor Summary
JVMDistinctBindingSetsOp(BOp[] args, Map<String,Object> annotations)
          Required shallow copy constructor.
JVMDistinctBindingSetsOp(BOp[] args, NV... annotations)
           
JVMDistinctBindingSetsOp(JVMDistinctBindingSetsOp op)
          Required deep copy constructor.
 
Method Summary
 FutureTask<Void> eval(BOpContext<IBindingSet> context)
          Return a FutureTask which computes the operator against the evaluation context.
 int getConcurrencyLevel()
           
 int getInitialCapacity()
           
 float getLoadFactor()
           
 IVariable<?>[] getVariables()
           
 
Methods inherited from class com.bigdata.bop.PipelineOp
assertAtOnceJavaHeapOp, getChunkCapacity, getChunkOfChunksCapacity, getChunkTimeout, getMaxMemory, getMaxParallel, isAtOnceEvaluation, isBlockedEvaluation, isLastPassRequested, isPipelinedEvaluation, isSharedState, newStats
 
Methods inherited from class com.bigdata.bop.BOpBase
_clearProperty, _set, _setProperty, annotations, annotationsCopy, annotationsEqual, annotationsRef, argIterator, args, argsCopy, arity, clearAnnotations, clearProperty, deepCopy, deepCopy, get, getProperty, setArg, setProperty, setUnboundProperty, toArray, toArray
 
Methods inherited from class com.bigdata.bop.CoreBaseBOp
annotationsEqual, annotationsToString, checkArgs, clone, equals, getEvaluationContext, getId, getProperty, getRequiredProperty, hashCode, indent, isController, toShortString, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JVMDistinctBindingSetsOp

public JVMDistinctBindingSetsOp(JVMDistinctBindingSetsOp op)
Required deep copy constructor.


JVMDistinctBindingSetsOp

public JVMDistinctBindingSetsOp(BOp[] args,
                                Map<String,Object> annotations)
Required shallow copy constructor.


JVMDistinctBindingSetsOp

public JVMDistinctBindingSetsOp(BOp[] args,
                                NV... annotations)
Method Detail

getInitialCapacity

public int getInitialCapacity()
See Also:
HashMapAnnotations.INITIAL_CAPACITY

getLoadFactor

public float getLoadFactor()
See Also:
HashMapAnnotations.LOAD_FACTOR

getConcurrencyLevel

public int getConcurrencyLevel()
See Also:
ConcurrentHashMapAnnotations.CONCURRENCY_LEVEL

getVariables

public IVariable<?>[] getVariables()
See Also:
DistinctAnnotations.VARIABLES

eval

public FutureTask<Void> eval(BOpContext<IBindingSet> context)
Description copied from class: PipelineOp
Return a FutureTask which computes the operator against the evaluation context. The caller is responsible for executing the FutureTask (this gives them the ability to hook the completion of the computation).

Specified by:
eval in class PipelineOp
Parameters:
context - The evaluation context.
Returns:
The FutureTask which will compute the operator's evaluation.


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