Return-Path: X-Original-To: apmail-incubator-accumulo-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-accumulo-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BA6687C63 for ; Sat, 22 Oct 2011 22:52:54 +0000 (UTC) Received: (qmail 58003 invoked by uid 500); 22 Oct 2011 22:52:54 -0000 Delivered-To: apmail-incubator-accumulo-dev-archive@incubator.apache.org Received: (qmail 57980 invoked by uid 500); 22 Oct 2011 22:52:54 -0000 Mailing-List: contact accumulo-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: accumulo-dev@incubator.apache.org Delivered-To: mailing list accumulo-dev@incubator.apache.org Received: (qmail 57972 invoked by uid 99); 22 Oct 2011 22:52:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Oct 2011 22:52:54 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Oct 2011 22:52:52 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 0715C31732D for ; Sat, 22 Oct 2011 22:50:32 +0000 (UTC) Date: Sat, 22 Oct 2011 22:50:32 +0000 (UTC) From: "Jesse Yates (Updated) (JIRA)" To: accumulo-dev@incubator.apache.org Message-ID: <1314270758.5794.1319323832030.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1744139239.13580.1319073010650.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (ACCUMULO-53) Multiple deletes cause a RuntimeException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/ACCUMULO-53?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesse Yates updated ACCUMULO-53: -------------------------------- Attachment: java_ACCUMULO-53.patch Fixing BatchDeleterImpl and adding ScannerOptions.removeIterator() - Adding removeIterator() method - Moved adding the whole-row-iterator option to BatchDeleterImpl constructor - Added tests for the above - Added EasyMock and Powermock for testing. > 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 > Attachments: java_ACCUMULO-53.patch > > > 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