Storm-HBase,该项目是Twitter Storm和Apache HBase的结合,它使用HBase cluster作为Storm的Spout数据源,目前只是初步实现,后续会进一步完善。
HBaseSpout根据时间戳范围[start_timestamp, stop_timestamp],持续不间断地从HBase cluster读取流数据:
- 如果start_timestamp = 0,HBaseSpout将默认从3分钟前的数据开始读取并发送到Storm cluster;否则从用户指定的start_timestamp开始读取数据。
- 如果stop_timestamp = 0, HBaseSpout将默认读取到当前时间的数据,并随着时间流动持续地读取新的数据并发送到Storm cluster;否则读取到用户指定的stop_timestamp后停止读取。
以上有关[start_timestamp, stop_timestamp]的设计,是为了适应不同的运行模式:
- 最典型情况下,start_timestamp = 0 and stop_timestamp = 0,则从3分钟前开始读取发送数据,然后会同步扫描HBase cluster中的新数据,并发送给Storm cluster,适合用户实时计算的情景。
- 出现问题的情况下,例如Storm cluster重启,计算任务状态被丢失,此时可能需要能够Spout进行数据的回传(data rewind),通过指定[start_timestamp, stop_timestamp]可以满足这一需求。
Storm-HBase力求尽可能做到通用化,因此提取了Storm和HBase的配置信息。有关Storm-HBase的配置选项,可以在 GitHub工程的src/main/resources/storm.properties以及src/main/resources /hbase.properties文件中找到。如果你的HBase表的Schema结构与上述类似,那么只需要进行简单的配置即可使用Storm- HBase。
目前的HBaseSpout实现基于以下假设:
- HBase表的rowkey形式为[shardingkey, timestamp, ...];
- shardingkey占据第1个byte,表示表中数据的分区数,一般是100以内,所以这里使用了short类型存储;
- timestamp占据第2~5个byte,表示数据中的时间戳信息,这里timestamp是秒级的UNIX时间戳值,使用了int型存储。
更多关于Storm-HBase的介绍及进展,请参加项目的GitHub链接:https://github.com/ypf412/storm-hbase
相关推荐
基于java的开发源码-github-Java-api.zip 基于java的开发源码-github-Java-api.zip 基于java的开发源码-github-Java-api.zip 基于java的开发源码-github-Java-api.zip 基于java的开发源码-github-Java-api.zip 基于...
HBase 元数据修复工具包。 ①修改 jar 包中的application.properties,重点是 zookeeper.address、zookeeper.nodeParent、hdfs....③开始修复 `java -jar -Drepair.tableName=表名 hbase-meta-repair-hbase-2.0.2.jar`
GitHub项目stylized-neural-painting训练模型
github-copilot-intellij-1.1.15.1115 IDEA的插件: copilot 版本:1.1.15.1115
GitHub.github-vscode-theme-6.3.4.vsix
github-git-cheat-sheet (官方文档汉化版)
开源项目-github-git-lfs.zip,git大文件存储是用go编写的
github-issue-mover 是能快速迁移 github 上问题的工具。功能如下:Copy the issue in the destination repoAdd references between the issuesClose the original issue在linux操作系统中,repo=repository, 表示...
learn-github-from-zero是初级入门github和git的电子书,作者是stormzhang,Android界一位无私的大神,顺便阅读该书所做的笔记加几个优秀的开源项目。希望对关注github资源的人有些帮助。
HBase(hbase-2.4.9-bin.tar.gz)是一个分布式的、...HBase是Apache的Hadoop项目的子项目。HBase不同于一般的关系数据库,它是一个适合于非结构化数据存储的数据库。另一个不同的是HBase基于列的而不是基于行的模式。
github-git-cheat-sheet Git手册github-git-cheat-sheet Git手册
开源项目-github-git-sizer.zip,git-sizer — compute various size metrics for a Git repository