accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William Slacum (JIRA)" <>
Subject [jira] [Commented] (ACCUMULO-675) WrappingIterator's seenSeek should be protected
Date Mon, 09 Jul 2012 19:15:34 GMT


William Slacum commented on ACCUMULO-675:

Because the WrappingIterator just ends up calling there really isn't a use
case that excludes that. It was just a surprise for me to find that `getSource().seek(...)`
and `` are longer equivalent, so backwards compatibility with 1.3 was broken.

If WrappingIterator's seek will only ever delegate to the source's seek method, then you're
right, there really isn't an issue. But, the checks in place can be just as easily circumvented
by overriding any of the other methods. At the very least making seenSeek protected will allow
clients to make an effort to properly adhere to the contract, rather than simply avoiding
the checks by overriding methods.
> WrappingIterator's seenSeek should be protected
> -----------------------------------------------
>                 Key: ACCUMULO-675
>                 URL:
>             Project: Accumulo
>          Issue Type: Bug
>          Components: tserver
>    Affects Versions: 1.5.0, 1.4.1, 1.5.0-SNAPSHOT, 1.4.0
>         Environment: OSX, Linux
>            Reporter: William Slacum
>            Assignee: William Slacum
>            Priority: Trivial
>             Fix For: 1.5.0-SNAPSHOT
>         Attachments: wrapping-iterator-mod.patch
>   Original Estimate: 1m
>  Remaining Estimate: 1m
> In 1.3, the WrappingIterator was pretty much some boilerplate code. In 1.4 on, a package
private boolean called seenSeek was added to help enforce the iterator contract.
> This causes some issues with iterators written for 1.3 and before, because the seenSeek
property can't be set by an iterator outside of the core.iterators package, which is locked
down. This means that sub iterators must always delegate up to the WrappingIterator's seek()
method, even if implementors want to completely override seek().
> I would like to provide more documentation on the WrappingIterator and make the seenSeek
property protected so implementors don't need conditional logic to make the call to

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message