Return-Path: X-Original-To: apmail-accumulo-dev-archive@www.apache.org Delivered-To: apmail-accumulo-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 85DB1D208 for ; Fri, 29 Jun 2012 17:58:45 +0000 (UTC) Received: (qmail 32501 invoked by uid 500); 29 Jun 2012 17:58:45 -0000 Delivered-To: apmail-accumulo-dev-archive@accumulo.apache.org Received: (qmail 32419 invoked by uid 500); 29 Jun 2012 17:58:45 -0000 Mailing-List: contact dev-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list dev@accumulo.apache.org Received: (qmail 32204 invoked by uid 99); 29 Jun 2012 17:58:44 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jun 2012 17:58:44 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id D461E141E10 for ; Fri, 29 Jun 2012 17:58:43 +0000 (UTC) Date: Fri, 29 Jun 2012 17:58:43 +0000 (UTC) From: "John Vines (JIRA)" To: dev@accumulo.apache.org Message-ID: <2141566454.72554.1340992723873.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Created] (ACCUMULO-664) Mock does not properly emulate object reuse MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 John Vines created ACCUMULO-664: ----------------------------------- Summary: Mock does not properly emulate object reuse Key: ACCUMULO-664 URL: https://issues.apache.org/jira/browse/ACCUMULO-664 Project: Accumulo Issue Type: Improvement Components: test Affects Versions: 1.4.1, 1.3.6 Reporter: John Vines Assignee: John Vines Fix For: 1.5.0, 1.4.2 Currently our MockAccumulo uses a Key,Value Map to emulate the back end. And next() calls just get the Key and Value from the map, with no object reuse. This can cause users to create iterators which use an object that succeed in Mock but fail on the real system. We should have some sort of system to better emulate the appropriate behavior. I talked to Adam offline about this, and there were a few initial ideas, which basically involve reusing an object and reading in the Value from the Map. However, we think it would be a better idea to create a special Key and Value extension which Mock uses. This special class would have a flag that gets set by the internal Mock next() method to 'invalidate' the old Key and Value, so if there are any indications of reuse, they throw an exception with a description of their misuse. There still may be an issue with that implementation if users are messing with internal byte arrays, so we may need to make an additional step to either overwrite that data with an informative message and/or have some sort of output when people get the byte array to warn them. Additionally, Key use may not be an actual issue, since I think only RelativeKeys are reused under the hood. However, this may not be the case for using MapFiles. Keith can probably quickly answer this question. -- 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