The row key is in the following format:
UserID-ResourceID
I know that the rows in Hbase are sorted, which is why I have the row key format shown above. Resources belonging to the same user will be stacked together. Lets say that the UserID is random, but ResourceID is a simple counter and is incremented each time a new resource is added.
Now to get resources, I do not want to scan the whole table which is why I want to provide a start row and an end row. I can provide the start row since I know the UserID and I know that ResourceID starts at 0, but I do not know how many resources there are,(or I do not want to store that information). Can I provide a condition, which if is not valid, should stop the scan? Something like if the UserID changes then stop scanning.
Essentially, I want it to find the first resource belonging to that person and then walk down the list, since all resources are stacked together, and finish after all the resources have been found.
Follow-on-question: is it possible to provide a condition so that it only returns a subset of the resources such as the last 10 resources belonging to that person in the list.