accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Busbey (JIRA)" <>
Subject [jira] [Commented] (ACCUMULO-2039) Authorizations.getAuthorizationsBB is inefficient
Date Mon, 13 Jan 2014 19:39:59 GMT


Sean Busbey commented on ACCUMULO-2039:

ByteBufferUtil is not in our public API, so ti should be fine. We've been known to leak that
abstraction, so I'd recommend checking the Accumulo contrib repos to make sure something else
isn't impacted.

I noticed this defensively copies the actual byte arrays. Do we have some quick way to check
for a performance regression on this? I'm not sure how extensively we use getAuthorizationsBB,
so I don't know how much overhead we're talking about adding.

An alternative would be to use the byte arrays in place but call [asReadOnlyBuffer|]
to make sure the generated BB's can't be modified. This won't work if whomever is using the
BB needs to grab the underlying byte array, because read only buffer's don't allow access
to them (I think Avro's serialization code does this).

> Authorizations.getAuthorizationsBB is inefficient
> -------------------------------------------------
>                 Key: ACCUMULO-2039
>                 URL:
>             Project: Accumulo
>          Issue Type: Improvement
>    Affects Versions: 1.6.0
>            Reporter: Bill Havanki
>            Assignee: Vikram Srivastava
>            Priority: Trivial
>              Labels: PatchAvailable
>         Attachments: ACCUMULO-2039.v1.patch.txt
> Authorizations.getAuthorizations was reworked for 1.6.0 to build an immutable list of
copies of contained authorizations. The Authorizations.getAuthorizationsBB method then takes
that list and makes another immutable list of copies. The latter method could be made much
more efficient by eliminating the extra copies and (possibly) list construction.

This message was sent by Atlassian JIRA

View raw message