0

I have a huge database of products(about 300 Million Products) and about 1 million users. I want to suggest products to this users depending on some criterias ( gender, country, age, interests ...) i wrote an algorithm suggesting this products and I can suggest up to 100000 product for each user. My question is how to store all this data in Hbase before displaying it on my website?

4

1 回答 1

0

您可以使用 userID 作为 rowKey 并将 productIds 集(您可以将其视为页面)存储为列。该值将包含 productId 的序列化列表。

您可能可以将第一页分成单独的列族,以防止加载所有列(页面)。请注意 Apache HBase 在超过 2-3 个 CF 时表现不佳(http://hbase.apache.org/book/number.of.cfs.html)。MapR Tables 商业产品通过将每个表的限制增加到 64 个列族来克服这个问题。

如果用户接触到第一页的产品,您可以将它们与其他列族一起循环。

于 2014-05-21T01:27:07.967 回答