[
https://issues.apache.org/jira/browse/ACCUMULO-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13131827#comment-13131827
]
Jesse Yates commented on ACCUMULO-53:
-------------------------------------
{quote}
You don't want to clear all iterators, because that will also wipe out any that
the user has added.
{quote}
We could go in by hand an delete the iterator after each use of the delete, but
that just seems excessive.
I like the idea of just setting the iterator at object creation - its clean and
solves the problem.
bq. We could discuss adding some new methods to the ScannerBase interface that
would let you see if an iterator name is already in use and clear a specific
named iterator.
This could be interesting, but don't know how often this would be used. There
are some cases where I've done some nested, automated scanning and you get
around that by just having random names for the iterators and rely on the
improbability of overlap - mathematically it should work :)
So yeah, adding something like that would be cool.
I'll work on patches for both.
> Multiple deletes cause a RuntimeException
> -----------------------------------------
>
> Key: ACCUMULO-53
> URL: https://issues.apache.org/jira/browse/ACCUMULO-53
> Project: Accumulo
> Issue Type: Bug
> Components: client
> Affects Versions: 1.3.5, 1.4.0
> Reporter: Jesse Yates
> Assignee: Jesse Yates
>
> Pretty sure this affects 1.3.5, though it may also on 1.4.0 (haven't tested
> on the latter, but the code looks the same).
> When a BatchDeleter is used multiple times on the same time, it doesn't reset
> the scan iterators, leading to runtime exceptions when there are multiple
> calls to delete().
> Below, we can see that it adds a scan iterator to get the list of values in
> the table. Since it just sets the name of the deleter to
> "org.apache.accumulo.core.client.BatchDeleter.NOVALUE" every time. So when
> you go to run the scan a second time, it attempts set the same scan iterator
> again.
> {code}
> public void delete() throws MutationsRejectedException,
> TableNotFoundException {
> super.addScanIterator(new IteratorSetting(Integer.MAX_VALUE,
> BatchDeleter.class.getName() + ".NOVALUE", SortedKeyIterator.class));
> {code}
> This results in a RuntimeException telling you that the 'Iterator name is
> already in use'.
> After doing the delete, the BatchDeleter should remove that iterator
> (possibly just clear all iterators) when done with the delete.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira