Skip to content

Instantly share code, notes, and snippets.

Created June 11, 2012 21:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/2912730 to your computer and use it in GitHub Desktop.
Save anonymous/2912730 to your computer and use it in GitHub Desktop.
scanByUserId
HTable fTable;
public Iterator<Result> scanByUserId(long userId)
{
Scan scan = new Scan();
scan.setStartRow(new ExampleRowKey(userId, "").getBytes());
scan.setStopRow(new ExampleRowKey(userId+1, "").getBytes());
ResultScanner scanner = fTable.getScanner(scan);
return scanner.iterator();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment