accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Turner (JIRA)" <>
Subject [jira] [Commented] (ACCUMULO-759) remove priority setting for scan-time iterators
Date Mon, 10 Sep 2012 16:30:07 GMT


Keith Turner commented on ACCUMULO-759:

We do need to make this easier for users.  Currently if the user wants scan time iterators
to come after iterators configured for the table, they must guess and choose some "large"
priority that should make this happen.  I think we should try to make achieving this goal
easier while preserving the current API.  One possible way to achieve is to add a getMaxIteratorPriority()
method to table operations.   So a user could then do something like the following.

//assume conn and scanner are initialized somewhow, just want to show their type
   Connector conn;
   Scanner scanner;

   int tableMax = conn.tableOperations().getMaxIteratorPriority();
   scanner.addScanIterator(new IteratorSetting(tableMax++, "foo1", ";
   scanner.addScanIterator(new IteratorSetting(tableMax++, "foo2", ";


If tableMax overflows, I think the code above will throw an exception because IteratorSetting's
constructor ensure the prio is positive.
> remove priority setting for scan-time iterators
> -----------------------------------------------
>                 Key: ACCUMULO-759
>                 URL:
>             Project: Accumulo
>          Issue Type: Improvement
>            Reporter: Adam Fuchs
>              Labels: newbie
> Iterators have a priority setting that allows a user to order iterators arbitrarily.
However that priority is an integer that doesn't directly convey the iterator's relationship
to other iterators. I would postulate that nobody has ever needed to sneak in a scan-time
iterator underneath a configured table iterator (please let me know if I'm wrong about this),
and the effect of doing so is not easy to calculate. Many people have chosen a bad iterator
priority and seen commutativity problems with previously configured iterators.
> I propose that we use more of an agglomerative approach to configuring scan-time iterators,
in which the order of the iterator tree is the same order in which the addScanIterator method
is called, and all scan-time iterators apply after the configured iterators apply. The change
to the API should just be to remove the priority number, and the existing IteratorSetting
constructor and accessors should be deprecated.
> With this change, we can think of an iterator as more of a functional modification to
a data set, as in T' = f(T) or T'' = g(f(T)). This should make it easier for developers to
use iterators correctly.

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:

View raw message