accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Elser (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-2758) LocalityGroupUtil.encodeColumnFamily() ignores offset parameter
Date Fri, 16 May 2014 20:51:15 GMT

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

Josh Elser commented on ACCUMULO-2758:
--------------------------------------

bq. my preference would be an IllegalArgumentException instead of throwing AccumuloException.
I like it because its unchecked and more meaningful. The message passed in to AccumuloException
makes it meaningful, but its checked.

Agreed.

Also, the third patch is as we would like it (a git patch, not just at diff), so that looks
good. If you're using Eclipse for your development, please take a look at [the code formatters|http://accumulo.apache.org/source.html#eclipse].
It looks like you're using tabs instead of 2 spaces for indentation which would be nice to
get cleaned up. Otherwise, you can just make sure it matches by eye for such a small change.

> LocalityGroupUtil.encodeColumnFamily() ignores offset parameter
> ---------------------------------------------------------------
>
>                 Key: ACCUMULO-2758
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-2758
>             Project: Accumulo
>          Issue Type: Bug
>    Affects Versions: 1.4.5, 1.5.1
>            Reporter: Bill Havanki
>            Assignee: Gary Singh
>            Priority: Minor
>              Labels: newbie
>             Fix For: 1.5.2, 1.6.1, 1.7.0
>
>         Attachments: ACCUMULO-2758-2.patch, ACCUMULO-2758-3.patch, ACCUMULO-2758.patch
>
>
> The method {{LocalityGroupUtil.encodeColumnFamily(ByteSequence)}} heeds the current offset
and length of the byte sequence, passing them to an private method that does the encoding.
However, the private method ignores its offset parameter, and always starts from the beginning
of the byte array.
> Fortunately, it appears that there are no callers for the public method, and the other
caller of the private method always passes an offset of zero. So, the bug is probably not
expressed. The method with the bug should probably just be eliminated.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message