It seems my question is not clear: does this call:
scan.setStartRow(Bytes.toBytes(lastDoc)) .. have any effect on rows returned for anyone else? Thanks, Kelvin ________________________________________ From: Kelvin Rawls [[email protected]] Sent: Monday, August 30, 2010 11:25 AM To: [email protected] Subject: Scan startRow seems to be broke in HBase 0.20.2 No matter what I tell it, this seems to return Row IDs from the beginning of the table. code public List<String> getKeys(String lastDoc, int N) { List<String> results = new ArrayList<String>(); try { Scan scan = new Scan(); scan.setStartRow(Bytes.toBytes(lastDoc)); StringBuilder regExp = new StringBuilder(); regExp.append("MYROWFLAGTRUE"); SingleColumnValueFilter scvf = new SingleColumnValueFilter("MYROW".getBytes(), "FLAG".getBytes(), CompareFilter.CompareOp.EQUAL, new RegexStringComparator(regExp.toString())); scvf.setFilterIfMissing(true); scan.setFilter(scvf); ResultScanner scanner = table.getScanner(scan); for (Result rr : scanner.next(N)) { String next_str = Bytes.toString(rr.getRow()); results.add(next_str); } scanner.close(); } catch (IOException ex) { m_log.error("Error getting keys", ex); } m_log.debug("Returning " + results.size() + " ids"); return results; } Thanks for any help. Kelvin L. Rawls 410-290-6240, office 301-221-1308, cell 703 741-3120, fax www.iswcorp.com
