accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vikram Srivastava (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-2039) Authorizations.getAuthorizationsBB is inefficient
Date Mon, 13 Jan 2014 20:56:57 GMT

    [ https://issues.apache.org/jira/browse/ACCUMULO-2039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13869972#comment-13869972
] 

Vikram Srivastava commented on ACCUMULO-2039:
---------------------------------------------

[~busbey]  I don't think there is any performance regression because of copying the byte array
since the previous code was also doing the same thing by calling getAuthorizations() which
also makes a copy of the byte array.

Also, note that if I didn't do the defensive copy, AuthorizationsTest.testReadOnlyByteBuffer
was breaking. So please let me know if I am wrong, but I believe we do want to protect against
the underlying byte arrays getting modified.

I'm also checking the accumulo-contrib repos to see if the removed method was getting called
anywhere.



> Authorizations.getAuthorizationsBB is inefficient
> -------------------------------------------------
>
>                 Key: ACCUMULO-2039
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-2039
>             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
(v6.1.5#6160)

Mime
View raw message