You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jingcheng Du (JIRA)" <ji...@apache.org> on 2017/02/24 07:56:44 UTC

[jira] [Commented] (HBASE-17688) MultiRowRangeFilter not working correctly if given same start and stop RowKey

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

Jingcheng Du commented on HBASE-17688:
--------------------------------------

This issue exists in other branches too. It is caused by the issue in {{RowRange.contains}} by wrongly using isScan.
Hi [~ahujaravi1], do you want provide the patch? Or I can do it as well. Thanks.

> MultiRowRangeFilter not working correctly if given same start and stop RowKey
> -----------------------------------------------------------------------------
>
>                 Key: HBASE-17688
>                 URL: https://issues.apache.org/jira/browse/HBASE-17688
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 1.1.2
>            Reporter: Ravi Ahuj
>            Priority: Minor
>
> 		
>     		
>         try (final Connection conn = ConnectionFactory.createConnection(conf);
> 	    		 final Table scanTable = conn.getTable(table)){
>         	ArrayList<MultiRowRangeFilter.RowRange> rowRangesList = new ArrayList<>();	
>         	 
>    	    	  String startRowkey="abc";
>    	    	  String stopRowkey="abc";
>    	    	rowRangesList.add(new MultiRowRangeFilter.RowRange(startRowkey, true, stopRowkey, true));
>    	 	Scan scan = new Scan();
> 		scan.setFilter(new MultiRowRangeFilter(rowRangesList));
>    			
>    	     ResultScanner scanner=scanTable.getScanner(scan);
>    	     
>    	  for (Result result : scanner) {
> 	    	  String rowkey=new String(result.getRow());
> 	    	 System.out.println(rowkey);
> 	    	 
>    	  } 
>         }
> 		
> In Hbase API of Java, we want to do multiple scans in the table using MultiRowRangeFilter.
> When we give multiple filters of startRowKey and stopRowKey, it is not working Properly with same StartRowKey and StopRowkey.
> Ideally, it should give only one Row with that Rowkey, but instead it is giving all the rows starting from that Rowkey in that Hbase Table



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)