(a) Looks right to me. (b) Your expected behavior is to return just the single startRow, correct? Then all you need are start/stop rows, no other filtering necessary.
JG > -----Original Message----- > From: John Sichi [mailto:[email protected]] > Sent: Monday, September 13, 2010 10:07 AM > To: [email protected] > Subject: question on Scan.setStopRow > > Hey hbasers, > > I'm working on pushing predicates down from Hive, and starting with a > very basic case (equality on a simple key). This ends up looking like > a get, but for now it still uses TableInputFormatBase since later we'll > be extending it to range scans as well. > > After converting the key to byte [] startRow, I do the following, since > stopRow is exclusive rather than inclusive: > > byte [] stopRow = new byte[startRow.length + 1]; > System.arraycopy(startRow, 0, stopRow, 0, startRow.length); > scan.setStartRow(startRow); > scan.setStopRow(stopRow); > > I just wanted to confirm > > (a) Is this the correct way to create a stopRow for a point lookup > (appending a single zero byte to make the successor lexical value)? > > (b) Do I also need a WhileMatchFilter, or is setStartRow+setStopRow > guaranteed to do all the filtering directly? > > Thanks, > JVS
