accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Tubbs (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-1666) Provide a way to declare iterator dependencies on other iterators
Date Thu, 05 Sep 2013 20:57:51 GMT

    [ https://issues.apache.org/jira/browse/ACCUMULO-1666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13759444#comment-13759444
] 

Christopher Tubbs commented on ACCUMULO-1666:
---------------------------------------------

It seems relatively trivial to achieve this functionality by setting up a small chain of iterators
inside a larger iterator.

{code:java}
public class MyIterator extends WrappingIterator {

  @Override
  public void init(final SortedKeyValueIterator<Key,Value> source, final Map<String,String>
options, final IteratorEnvironment env) throws IOException {
    MyDepIter1 dep1 = new MyDepIter1();
    MyDepIter2 dep2 = new MyDepIter2();
    dep1.init(source, getOptsForDep1(options), env);
    dep2.init(dep1, getOptsForDep2(options), env);
    setSource(dep2);
  }

}
{code}
                
> Provide a way to declare iterator dependencies on other iterators
> -----------------------------------------------------------------
>
>                 Key: ACCUMULO-1666
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-1666
>             Project: Accumulo
>          Issue Type: Improvement
>            Reporter: Brian Loss
>
> Sometimes iterators really only make sense when they are used in conjunction with other
iterators, but it doesn't make sense to implement the functionality in a single iterator.
 It would be nice if Accumulo had a way to declare that an iterator depends on another iterator
or iterators.
> Perhaps this could be done by annotating the iterator class, and then when the tablet
server adds an iterator to the stack, it could ensure that the dependent iterators are already
on the stack and throw an error if not.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message