accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Tubbs (JIRA)" <>
Subject [jira] [Resolved] (ACCUMULO-664) Mock does not properly emulate object reuse
Date Wed, 20 Jun 2018 23:07:00 GMT


Christopher Tubbs resolved ACCUMULO-664.
    Resolution: Won't Fix

Mock is deprecated and will be removed in a future version.

> Mock does not properly emulate object reuse
> -------------------------------------------
>                 Key: ACCUMULO-664
>                 URL:
>             Project: Accumulo
>          Issue Type: Improvement
>          Components: test
>            Reporter: John Vines
>            Assignee: John Vines
>            Priority: Major
>              Labels: newbie
> 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
> 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 was sent by Atlassian JIRA

View raw message