Hi Serega, Yes, you need to set start row when using Prefix filter.
Another smart trick for prefix filter: Set the prefix as start-row of scan and set the next byteorder successor(next bigger byte array with same number of bytes) as stop row of your scan. For example(using chars for simplicity): if Prefix= abc, then startRow will be: abc and stopRow:abd I have been using this trick for prefix based on alphanumeric string for many years. Thanks, Anil Gupta On Mon, Apr 6, 2015 at 2:18 PM, Serega Sheypak <[email protected]> wrote: > >Yes, scan goes through entire table unless start row is set. > > > does this explain the error though? > > > Prefix filter should work even with scan beginning from 1st record, no? > It would only take longer. > > > Yes, it's explains. My table has 70M rows, and prefix filter should scan > just for 10 starting from exact place, it takes millis to get response. > > 2015-04-06 22:54 GMT+02:00 Serega Sheypak <[email protected]>: > > > I forgot to set firstRow for Scanner. Looks like HBase tried to scan the > > whole table. Value from FilterPrefix wasn't used. I supposed that prefix > > value could be pushed to scanner as a starting point, but not. > > > > 2015-04-06 18:45 GMT+02:00 Imants Cekusins <[email protected]>: > > > >> may this be related: > >> > >> https://issues.apache.org/jira/browse/HBASE-11295 > >> > >> ? > >> > > > > > > > -- Thanks & Regards, Anil Gupta
