“HBase”
fujohnwang
2011-12-20
HBase的前世今生
Born from the idea of Google Bigtable
HBase的配置
依赖前提
- Java 6 or above
- SSH - using passwordless login (Google “ssh passwordless login”)
- DNS
- NTP
- ulimit and nproc
- base需要很多文件句柄,所以系统默认的文件句柄数基本上不够,一般需要设置为1w以上
- “upping the file descriptors and nproc for the user who is running the HBase process is an operating system configuration, not an HBase configuration.”
分布式部署
Hbase的配置需要在所有结点之间同步, 可以在一台机器上编辑完,然后用rsync同步,或者,专门搞一台发布机,集中管理配置, 然后分发(puppet之类的软件应该是干这个事情的)。
配置hbase的时候, 最基本的需要通过override默认的配置,告知hbase:
- 使用什么FileSystem,是local的还是HDFS等;
- 要使用的zookeeper部署位置是什么;
Cautions
HBase will lose data unless it is running on an HDFS that has a durable sync.
HBase Replication
8.6.4. Write Ahead Log (WAL)
The WAL is in HDFS in /hbase/.logs/ with subdirectories per region.
应该需要了解region server在zk里的ephemeral node,以便在region server failover之后,eromanga也可以转到新的region server上从新的hlog开始抓取变更。
Once a HRegionServer starts and is opening the regions it hosts it checks if there are some left over log files and applies those all the way down in Store.doReconstructionLog(). Replaying a log is simply done by reading the log and adding the contained edits to the current MemStore. At the end an explicit flush of the MemStore (note, this is not the flush of the log!) helps writing those changes out to disk.
|—-HLog Replay
HBase Replication Ref
- http://hbase.apache.org/replication.html
- http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/regionserver/wal/HLog.html
- http://blog.sematext.com/2011/03/11/hbase-backup-options/ - HBase Backup Options > You might want to check out at MapR’s distro for Apache Hadoop (www.mapr.com). It has consistent point-in-time snapshots, as well the ability to mirror the snapshots to another data-center for disaster-recovery.
- https://github.com/mozilla-metrics/akela/blob/master/src/main/java/com/mozilla/hadoop/Backup.java | http://blog.mozilla.com/data/2011/02/04/migrating-hbase-in-the-trenches/ - Mozilla Backup tool
- http://javamaster.wordpress.com/2010/03/19/replication-architecture-in-cassandra-and-hbase/
- http://koven2049.iteye.com/blog/983633
- How Google Serves Data From Multiple Datacenters
- Hbase的log管理(一)
- Hbase的log管理(二)
- HBase异常——当RegionServer Crash之后
-
Issues
- When hbase.hlog.split.skip.errors is set to false, we fail the split but thats it
- Figure how to deal with eof splitting logs
- Multi data center replication
-
Schema Design
in general its best to avoid using a timestamp or a sequence (e.g. 1, 2, 3) as the row-key.
http://ikaisays.com/2011/01/25/app-engine-datastore-tip-monotonically-increasing-values-are-bad/
Distributions
- Apache HBase
- Cloudera
- Others
原理
References
- http://www.pigi-project.org/ - Powerful, Invincible, Great Indexing for HBase
- ** Bigtable: A Distributed Storage System for Structured Data **
- HBase Schema Design - Things you need to know
- HBase Architecture 101 - Storage
- HBase Architecture 101 - Write-ahead-Log
- HBase Schema Design - Things you need to know
- http://www.spnguru.com/tag/hbase/ - 趋势科技中国研发中心SPN研发团队hbase tag
- Coprocessors: Support aggregate functions
- HBase在淘宝的应用和优化小结
- http://www.meetup.com/hbaseusergroup/files/
- https://www.guru99.com/hbase-architecture-data-flow-usecases.html - Guru99 HBase Tutorial
「福强私学」来一个?
「福强私学」, 一部沉淀了个人成长、技术与架构、组织与管理以及商业上的方法与心法的百科全书。
开天窗,拉认知,订阅「福报」,即刻拥有自己的全模态人工智能。