# hbase-2.3.2-src **Repository Path**: w749/hbase-2.3.2-src ## Basic Information - **Project Name**: hbase-2.3.2-src - **Description**: hbase-2.3.2源码,本地调试和源码阅读 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-02-25 - **Last Updated**: 2022-06-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README Apache HBase [1] is an open-source, distributed, versioned, column-oriented store modeled after Google' Bigtable: A Distributed Storage System for Structured Data by Chang et al.[2] Just as Bigtable leverages the distributed data storage provided by the Google File System, HBase provides Bigtable-like capabilities on top of Apache Hadoop [3]. To get started using HBase, the full documentation for this release can be found under the doc/ directory that accompanies this README. Using a browser, open the docs/index.html to view the project home page (or browse to [1]). The hbase 'book' at http://hbase.apache.org/book.html has a 'quick start' section and is where you should being your exploration of the hbase project. The latest HBase can be downloaded from an Apache Mirror [4]. The source code can be found at [5] The HBase issue tracker is at [6] Apache HBase is made available under the Apache License, version 2.0 [7] The HBase mailing lists and archives are listed here [8]. The HBase distribution includes cryptographic software. See the export control notice here [9]. 1. http://hbase.apache.org 2. http://research.google.com/archive/bigtable.html 3. http://hadoop.apache.org 4. http://www.apache.org/dyn/closer.cgi/hbase/ 5. https://hbase.apache.org/source-repository.html 6. https://hbase.apache.org/issue-tracking.html 7. http://hbase.apache.org/license.html 8. http://hbase.apache.org/mail-lists.html 9. https://hbase.apache.org/export_control.html ## 源码阅读 ### 本地环境准备 本地调试之前需要先在Project Structure把Java环境配置好,然后直接打包源码`mvn clean install -DskipTests`,我用的这个版本在最后几个模块打包的时候会报错,不过不影响HMaster这些组件的启动和本地调试,不用理会。 打包完成后是Configurations环境的设置,需要分别设置HMaster启动环境和Shell环境,截图在flowchart文件夹。 接下来还需要把conf文件夹复制到hbase-server/src/main文件夹中,并且简单的配置一下hbase-site.xml文件,然后需要把hbase-server目录下的pom.xml`test`全部替换为`compile`。最后就可以选择HMaster启动调试了。 ### 源码阅读过程 分别看了HMaster的启动流程、HRegionServer的启动流程和Put流程,流程图也在flowchart文件夹中 HMaster和HRegionServer的启动直接从它们各自类的main方法进去,Put则是从HTable的put方法开始,也就是客户端提交Put的入口,源码中的涉及到的关键步骤已经做了标记,使用的是自定义的TODO_MY 有些操作还不是很理解,还有Get的流程本来也是要看的,但最后实在找不到怎么从内存和HFile中取出Cell的,暂时放弃了