Package org.teiid.translator.accumulo
Class EvaluatorIterator
- java.lang.Object
-
- org.apache.accumulo.core.iterators.WrappingIterator
-
- org.teiid.translator.accumulo.EvaluatorIterator
-
- All Implemented Interfaces:
org.apache.accumulo.core.iterators.SortedKeyValueIterator<org.apache.accumulo.core.data.Key,org.apache.accumulo.core.data.Value>
public class EvaluatorIterator extends org.apache.accumulo.core.iterators.WrappingIteratorThis iterator makes uses of Teiid engine for criteria evaluation. For this to work, the teiid libraries need to be copied over to the accumulo classpath. RowFilter based implemention fails with "java.lang.RuntimeException: Setting interrupt flag after calling deep copy not supported", this is copy of WholeRowIterator
-
-
Field Summary
Fields Modifier and Type Field Description static StringDDLstatic StringIMPLICIT_MODEL_NAMEstatic StringQUERYSTRINGstatic StringTABLE
-
Constructor Summary
Constructors Constructor Description EvaluatorIterator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.teiid.adminapi.impl.ModelMetaDatacreateModel(String name, boolean source)static org.teiid.query.metadata.TransformationMetadatacreateTransformationMetadata(String ddl)org.apache.accumulo.core.iterators.SortedKeyValueIterator<org.apache.accumulo.core.data.Key,org.apache.accumulo.core.data.Value>deepCopy(org.apache.accumulo.core.iterators.IteratorEnvironment env)protected booleanfilter(ArrayList<org.teiid.translator.accumulo.EvaluatorIterator.KeyValuePair> values)org.apache.accumulo.core.data.KeygetTopKey()org.apache.accumulo.core.data.ValuegetTopValue()booleanhasTop()voidinit(org.apache.accumulo.core.iterators.SortedKeyValueIterator<org.apache.accumulo.core.data.Key,org.apache.accumulo.core.data.Value> source, Map<String,String> options, org.apache.accumulo.core.iterators.IteratorEnvironment env)voidnext()voidseek(org.apache.accumulo.core.data.Range range, Collection<org.apache.accumulo.core.data.ByteSequence> columnFamilies, boolean inclusive)
-
-
-
Field Detail
-
QUERYSTRING
public static final String QUERYSTRING
- See Also:
- Constant Field Values
-
TABLE
public static final String TABLE
- See Also:
- Constant Field Values
-
DDL
public static final String DDL
- See Also:
- Constant Field Values
-
IMPLICIT_MODEL_NAME
public static final String IMPLICIT_MODEL_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(org.apache.accumulo.core.iterators.SortedKeyValueIterator<org.apache.accumulo.core.data.Key,org.apache.accumulo.core.data.Value> source, Map<String,String> options, org.apache.accumulo.core.iterators.IteratorEnvironment env) throws IOException- Specified by:
initin interfaceorg.apache.accumulo.core.iterators.SortedKeyValueIterator<org.apache.accumulo.core.data.Key,org.apache.accumulo.core.data.Value>- Overrides:
initin classorg.apache.accumulo.core.iterators.WrappingIterator- Throws:
IOException
-
createTransformationMetadata
public static org.teiid.query.metadata.TransformationMetadata createTransformationMetadata(String ddl)
-
createModel
public static org.teiid.adminapi.impl.ModelMetaData createModel(String name, boolean source)
-
deepCopy
public org.apache.accumulo.core.iterators.SortedKeyValueIterator<org.apache.accumulo.core.data.Key,org.apache.accumulo.core.data.Value> deepCopy(org.apache.accumulo.core.iterators.IteratorEnvironment env)
- Specified by:
deepCopyin interfaceorg.apache.accumulo.core.iterators.SortedKeyValueIterator<org.apache.accumulo.core.data.Key,org.apache.accumulo.core.data.Value>- Overrides:
deepCopyin classorg.apache.accumulo.core.iterators.WrappingIterator
-
seek
public void seek(org.apache.accumulo.core.data.Range range, Collection<org.apache.accumulo.core.data.ByteSequence> columnFamilies, boolean inclusive) throws IOException- Specified by:
seekin interfaceorg.apache.accumulo.core.iterators.SortedKeyValueIterator<org.apache.accumulo.core.data.Key,org.apache.accumulo.core.data.Value>- Overrides:
seekin classorg.apache.accumulo.core.iterators.WrappingIterator- Throws:
IOException
-
filter
protected boolean filter(ArrayList<org.teiid.translator.accumulo.EvaluatorIterator.KeyValuePair> values) throws IOException
- Throws:
IOException
-
getTopKey
public org.apache.accumulo.core.data.Key getTopKey()
- Specified by:
getTopKeyin interfaceorg.apache.accumulo.core.iterators.SortedKeyValueIterator<org.apache.accumulo.core.data.Key,org.apache.accumulo.core.data.Value>- Overrides:
getTopKeyin classorg.apache.accumulo.core.iterators.WrappingIterator
-
getTopValue
public org.apache.accumulo.core.data.Value getTopValue()
- Specified by:
getTopValuein interfaceorg.apache.accumulo.core.iterators.SortedKeyValueIterator<org.apache.accumulo.core.data.Key,org.apache.accumulo.core.data.Value>- Overrides:
getTopValuein classorg.apache.accumulo.core.iterators.WrappingIterator
-
hasTop
public boolean hasTop()
- Specified by:
hasTopin interfaceorg.apache.accumulo.core.iterators.SortedKeyValueIterator<org.apache.accumulo.core.data.Key,org.apache.accumulo.core.data.Value>- Overrides:
hasTopin classorg.apache.accumulo.core.iterators.WrappingIterator
-
next
public void next() throws IOException- Specified by:
nextin interfaceorg.apache.accumulo.core.iterators.SortedKeyValueIterator<org.apache.accumulo.core.data.Key,org.apache.accumulo.core.data.Value>- Overrides:
nextin classorg.apache.accumulo.core.iterators.WrappingIterator- Throws:
IOException
-
-