accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Turner (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ACCUMULO-226) BatchScanner iterator implementation erroneously returns true for hasNext upon subsequent hasNext calls
Date Fri, 23 Dec 2011 16:00:30 GMT

     [ https://issues.apache.org/jira/browse/ACCUMULO-226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Keith Turner updated ACCUMULO-226:
----------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)
    
> BatchScanner iterator implementation erroneously returns true for hasNext upon subsequent
hasNext calls
> -------------------------------------------------------------------------------------------------------
>
>                 Key: ACCUMULO-226
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-226
>             Project: Accumulo
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 1.3.5
>         Environment: Platform independent 
>            Reporter: Matthew Kirkley
>            Assignee: Keith Turner
>              Labels: accumulo, batchscanner
>             Fix For: 1.4.0, 1.5.0
>
>         Attachments: accumulo_TabletServerBatchReaderIterator.patch
>
>
> If you open a batch scanner and iterate through its contents, after hasNext has returned
false, subsequent calls to hasNext will return true. Below is a testcase which shows the issue.
>         Connector conn = new Connector(new ZooKeeperInstance("accumulo","localhost"),"root","password".getBytes());
>         BatchScanner scanner = conn.createBatchScanner("test", Constants.NO_AUTHS, 1);
>         scanner.setRanges(Collections.singletonList(new Range()));
>         
>         //exhaust the iterator
>         Iterator it = scanner.iterator();
>         while (it.hasNext()){
>             it.next();
>         }
>         assertFalse("hasNext should be false", it.hasNext());
> I found this issue when wrapping a BatchScanner in a IteratorChain which subsequently
seems to call hasNext twice in it's hasNext method.  I will attach a patch which resolves
the issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message