You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Mujtaba Chohan (JIRA)" <ji...@apache.org> on 2016/07/28 20:07:20 UTC

[jira] [Comment Edited] (HBASE-16296) Reverse scan performance degrades when scanner cache size matches page filter size

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

Mujtaba Chohan edited comment on HBASE-16296 at 7/28/16 8:06 PM:
-----------------------------------------------------------------

[~lhofhansl] please check with the following code. See a small difference of passing FilterList instead of Filter to scan. This is with both 0.98.20 and 0.98.17.

{code}
Scan scan = new Scan();
scan.setReversed(true);
byte[] stop = new byte[]{48, 48, 68, 120, 48, 48, 48, 48, 48, 48, 48, 71, 121, 89, 83, 48, 56, 109};
byte[] start = new byte[]{48, 48, 68, 120, 48, 48, 48, 48, 48, 48, 48, 71, 121, 89, 83, 48, 56, 110};
scan.setStartRow(start);
scan.setStopRow(stop);
FilterList filters = new FilterList(); 
PageFilter pagefilter = new PageFilter(5);	
filters.addFilter(pagefilter);
scan.setFilter(filters);
		
Configuration conf = new Configuration();
conf.set("hbase.zookeeper.quorum", "localhost");
conf.set("hbase.client.scanner.caching", "5");
HConnectionManager.createConnection(conf);
HTable table = new HTable(conf, TableName.valueOf("PLATFORM_ENTITY.PLATFORM_IMMUTABLE_ENTITY_DATA"));
ResultScanner resultScanner = table.getScanner(scan);
Result result = null;
while ((result = resultScanner.next()) != null) {
	System.out.println(result);
}
System.out.println("All Done");
table.close();
{code}


was (Author: mujtabachohan):
[~larsh] please check with the following code. See a small difference of passing FilterList instead of Filter to scan. This is with both 0.98.20 and 0.98.17.

{code}
Scan scan = new Scan();
scan.setReversed(true);
byte[] stop = new byte[]{48, 48, 68, 120, 48, 48, 48, 48, 48, 48, 48, 71, 121, 89, 83, 48, 56, 109};
byte[] start = new byte[]{48, 48, 68, 120, 48, 48, 48, 48, 48, 48, 48, 71, 121, 89, 83, 48, 56, 110};
scan.setStartRow(start);
scan.setStopRow(stop);
FilterList filters = new FilterList(); 
PageFilter pagefilter = new PageFilter(5);	
filters.addFilter(pagefilter);
scan.setFilter(filters);
		
Configuration conf = new Configuration();
conf.set("hbase.zookeeper.quorum", "localhost");
conf.set("hbase.client.scanner.caching", "5");
HConnectionManager.createConnection(conf);
HTable table = new HTable(conf, TableName.valueOf("PLATFORM_ENTITY.PLATFORM_IMMUTABLE_ENTITY_DATA"));
ResultScanner resultScanner = table.getScanner(scan);
Result result = null;
while ((result = resultScanner.next()) != null) {
	System.out.println(result);
}
System.out.println("All Done");
table.close();
{code}

> Reverse scan performance degrades when scanner cache size matches page filter size
> ----------------------------------------------------------------------------------
>
>                 Key: HBASE-16296
>                 URL: https://issues.apache.org/jira/browse/HBASE-16296
>             Project: HBase
>          Issue Type: Bug
>            Reporter: James Taylor
>         Attachments: generatedata-snippet.java, repro-snippet.java
>
>
> When a reverse scan is done, the server seems to not know it's done when the scanner cache size matches the number of rows in a PageFilter. See PHOENIX-3121 for how this manifests itself. We have a standalone, pure HBase API reproducer too that I'll attach (courtesy of [~churromorales] and [~mujtabachohan]).



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