简体   繁体   中英

HBase hierarchical key scan

I want to have hierarchical keys like: app:page:user:item = value (where : indicates concatenating with a delimiter). I understand that I can quickly find all the items that that user modified in the given app:page domain.

But now suppose I just want a list of all the pages in an app (ignoring the stuff at lower levels of the hierarchy). Will I need to scan through every thing in the lower levels of the hierarchy to get what I need?

Yes, unless you also generate records keyed on just the app with values indicating which pages exist in that app. You could do something like that in HBase itself if you have a build with coprocessors, otherwise you need to do it in your application or as a batch process.

Another alternative is to create those records the first time (by scanning all rows in the app) you can the results and save them in the same or another table.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM