Created
June 11, 2012 21:12
-
-
Save anonymous/2912730 to your computer and use it in GitHub Desktop.
scanByUserId
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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