hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoni (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (HBASE-686) MemcacheScanner didn't return the first row(if it exists), cause HScannerInterface's output incorrect
Date Mon, 16 Jun 2008 21:29:45 GMT

    [ https://issues.apache.org/jira/browse/HBASE-686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12605415#action_12605415
] 

acure edited comment on HBASE-686 at 6/16/08 2:28 PM:
-------------------------------------------------------

    My test case :

        you have to create table 'aaa' with a column family 'xxx'


		HTable htable = new HTable("aaa");
		  BatchUpdate batch = new BatchUpdate("123456".getBytes());
		  batch.put("xxx", "some value".getBytes());
		  htable.commit(batch);
		
		  byte[][] cols = new byte[][]{ "xxx".getBytes() };		  		   
		  RowResult row = htable.getRow("123456".getBytes(), cols, new Date().getTime());
		  System.out.println("there is a row = " + row.get("xxx".getBytes()).toString());
		
		  cols = new byte[][]{ "xxx:".getBytes() };		  
		  Scanner scanner = htable.getScanner(cols);
		  
		  if (scanner.iterator().hasNext()) {
			  System.out.println(" GOOD !!!! - scanner returns some rows ");
		  } else {
			  System.out.println(" WRONG !!!! - scanner didn't found any rows");
		  }		  



      was (Author: acure):
        yes - of course, i will post it as soon as possible.

        Thanks - Acure


  
> MemcacheScanner didn't return the first row(if it exists), cause HScannerInterface's
output incorrect
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-686
>                 URL: https://issues.apache.org/jira/browse/HBASE-686
>             Project: Hadoop HBase
>          Issue Type: Bug
>    Affects Versions: 0.1.2
>            Reporter: LN
>            Assignee: Jim Kellerman
>
> HTable.obtainScanner methods should return the start row if it exists, although HTable's
javadoc didn't clearly desc. but i found the result of htable scanners sometimes contain the
start row, sometimes not.
> after more testing and code review, i found it should be a bug in HStore.Memcache.MemcacheScanner.
in the constructor it set this.currentRow = firstRow, but when doing next(), there's a this.currentRow
= getNextRow(this.currentRow) before fetch result.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message