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

Hadoop QA commented on HADOOP-11327:
------------------------------------

{color:green}+1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12692064/HADOOP-11327.v1.txt
  against trunk revision 10ac5ab.

    {color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

    {color:green}+1 tests included{color}.  The patch appears to include 1 new 
or modified test files.

    {color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

    {color:green}+1 javadoc{color}.  There were no new javadoc warning messages.

    {color:green}+1 eclipse:eclipse{color}.  The patch built with 
eclipse:eclipse.

    {color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 2.0.3) warnings.

    {color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

    {color:green}+1 core tests{color}.  The patch passed unit tests in 
hadoop-common-project/hadoop-common.

Test results: 
https://builds.apache.org/job/PreCommit-HADOOP-Build/5396//testReport/
Console output: 
https://builds.apache.org/job/PreCommit-HADOOP-Build/5396//console

This message is automatically generated.

> BloomFilter#not() omits the last bit, resulting in an incorrect filter
> ----------------------------------------------------------------------
>
>                 Key: HADOOP-11327
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11327
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 2.5.1
>            Reporter: Tim Luo
>            Assignee: Eric Payne
>            Priority: Minor
>         Attachments: HADOOP-11327.v1.txt
>
>
> There's an off-by-one error in {{BloomFilter#not()}}:
> {{BloomFilter#not}} calls {{BitSet#flip(0, vectorSize - 1)}}, but according 
> to the javadoc for that method, {{toIndex}} is end-_exclusive_:
> {noformat}
> * @param  toIndex index after the last bit to flip
> {noformat}
> This means that the last bit in the bit array is not flipped.
> Specifically, this was discovered in the following scenario:
> 1. A new/empty {{BloomFilter}} was created with vectorSize=7.
> 2. Invoke {{bloomFilter.not()}}; now expecting a bloom filter with all 7 bits 
> (0 through 6) flipped to 1 and membershipTest(...) to always return true.
> 3. However, membershipTest(...) was found to often not return true, and upon 
> inspection, the BitSet only had bits 0 through 5 flipped.
> The fix should be simple: remove the "- 1" from the call to {{BitSet#flip}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to