hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jingcheng Du (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-17688) MultiRowRangeFilter not working correctly if given same start and stop RowKey
Date Tue, 28 Feb 2017 02:58:45 GMT

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

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

bq. So if we have a Scan with includeStopRow is false and having this Filter with some ranges,
all with same start and stop keys, there will be NO results returned?
You are right, no results are returned.

> 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: 2.0.0, 1.3.0, 1.2.4, 0.98.24, 1.1.8
>            Reporter: Ravi Ahuj
>            Assignee: Jingcheng Du
>            Priority: Minor
>         Attachments: HBASE-17688.branch-1.x.patch, HBASE-17688.master.patch, HBASE-17688.master-v1.patch
>
>
> 		
>     		
>         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)

Mime
View raw message