Code Monkey home page Code Monkey logo

hbase-code's Introduction

hbase source code explaination

Author: Funky Gao <[email protected]>
Description:Let's study hbase from it's source code from scratch!

Test code excluded:

  • 452 java files
  • 146,616 java LOC

Enable log debug level and check out the log file and find the main routines.

conf/log4j.properties

Setup the following environ variables for other scripts:

  • JAVA_HOME
  • HBASE_HOME
  • HBASE_CONF_DIR
  • HBASE_REGIONSERVERS
  • HBASE_BACKUP_MASTERS
  • source ${HBASE_CONF_DIR}/hbase-env.sh

Invoker for other scripts!

Run a dedicated class. e,g:

bin/hbase org.apache.hadoop.hbase.zookeeper.ZooKeeperMainServerArg

Setup classpath and map command to class name and invoke class method:

  • shell

    org.jruby.Main ${HBASE_HOME}/bin/hirb.rb

  • master

    org.apache.hadoop.hbase.master.HMaster

  • regionserver

    org.apache.hadoop.hbase.regionserver.HRegionServer

  • thrift

    org.apache.hadoop.hbase.thrift.ThriftServer

  • rest

    org.apache.hadoop.hbase.rest.Main

  • avro

    org.apache.hadoop.hbase.avro.AvroServer

  • migrate

    org.apache.hadoop.hbase.util.Migrate

  • hbck

    org.apache.hadoop.hbase.util.HBaseFsck

  • zookeeper

    org.apache.hadoop.hbase.zookeeper.HQuorumPeer

  • zkcli

    org.apache.zookeeper.ZooKeeperMain

org.apache.hadoop.hbase
   |
   |- client
   |   |
   |   |- HConnection
   |   |- Get
   |   |- Put
   |   |- Delete
   |   |- Scan
   |   |- Increment
   |   |- Row
   |   |- RowLock
   |   |- HTable
   |   └─ HConnection
   |
   |- filter
   |
   |- io
   |   |
   |   |- hfile
   |   |   |
   |   |   |- HFile
   |   |   └─ BlockCache
   |   |
   |   └─ HeapSize
   |
   |- ipc
   |
   |- mapreduce(通过mapreduce实现运维工具)
   |
   |- master
   |   |
   |   |- HMaster
   |   └─ LoadBalancer
   |
   |- regionserver
   |   |
   |   |- HRegion
   |   |- HRegionServer
   |   |- MemStore
   |   |- Store
   |   └─ StoreFile
   |
   |- util
   |
   └─ zookeeper
       |
       |- ClusterStatusTracker
       |- MetaNodeTracker
       └─ RegionServerTracker

org.apache.hadoop.hbase.master.HMaster

org.apache.hadoop.hbase.regionserver.HRegionServer

org.apache.hadoop.hbase.regionserver.HRegion

org.apache.hadoop.hbase.client.HTable

org.apache.hadoop.hbase.HBaseConfiguration

It will read hbase-default.xml then hbase-site.xml using the current Java classpath.

  • master log
  • region server log
  • zookeeper log

hbase-code's People

Contributors

funkygao avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.