开发者

HBase hierarchical key scan

开发者 https://www.devze.com 2023-04-05 17:57 出处:网络
I want to have hie开发者_如何学编程rarchical 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

I want to have hie开发者_如何学编程rarchical 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号