惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
T
Threatpost
Latest news
Latest news
N
News | PayPal Newsroom
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
AI
AI
Simon Willison's Weblog
Simon Willison's Weblog
TaoSecurity Blog
TaoSecurity Blog
The Last Watchdog
The Last Watchdog
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
T
Threat Research - Cisco Blogs
O
OpenAI News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
The Exploit Database - CXSecurity.com
NISL@THU
NISL@THU
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
Securelist
小众软件
小众软件
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Martin Fowler
Martin Fowler
S
SegmentFault 最新的问题
Cisco Talos Blog
Cisco Talos Blog
云风的 BLOG
云风的 BLOG
AWS News Blog
AWS News Blog
GbyAI
GbyAI
N
News and Events Feed by Topic
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
美团技术团队
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
S
Schneier on Security
博客园 - 聂微东
V2EX - 技术
V2EX - 技术
T
Troy Hunt's Blog
SecWiki News
SecWiki News
S
Secure Thoughts
B
Blog RSS Feed
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
腾讯CDC
H
Heimdal Security Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed

HBase

HBase 属於數據倉庫嗎? - V2EX 上百亿的数据,如果需要支持多种查询条件支持,是不是只能建多个 hbase 表? - V2EX 使用 happybase 调用 put 方法时出错,别的都不会报错 - V2EX 虚拟机里 hbase shell 中使用 list 命令报错 - V2EX 求问一个 hbase 的基本问题 - V2EX 关于表设计的问题 - V2EX LINE App 的研发故事 - V2EX HappyBase - V2EX
关于 hbase 的一个消息中心表的 rowkey 设计 - V2EX
mikej · 2014-07-03 · via HBase

公司准备将消息中心由原先的mysql储存改为hbase,主要需求如下:

1.消息分为系统公告和个人消息,个人消息有不同的类别,每条消息有已读和未读状态。
2.查看消息时可以分别查看全部消息、系统公告和个人消息,其中个人消息可以分类别查看。也可以分已读和未读查看(按照时间排序)。

现在的消息表的设计是这样的:

rowkey = uid+is_read+msg_type+递减的timestamp,比如:22222222,1,3,8595702279104
column family只有一个message,用于存储消息内容

根据hbase的数据存储特性,数据按照rowkey的字典序排列,这样很容易按分类别查看数据,但查看全部消息就不能按照时间排序了,因为不同类别的消息都聚集在一起,如果把timestamp放到is_read前面,所有消息按时间排列,但不同类别的消息又分散了。都不能满足需求。(同一条数据分不同的rowkey存两次可以解决问题,但是增加了一倍的储存空间不太可取啊)

前端是通过thrift用php访问的,提供的接口真的很不灵活,请问有什么好的解决方案吗?还有就是hbase的存储性能怎么样,希望有使用经验的朋友们能介绍一下 :)