Low Orbit Flux Logo 2 F

Where are HBase tables stored?

HBase stores its data from the bottom layer in HDFS. This can be across multiple HRegions. The data will be spread across multiple DataNodes. The data will be placed into specific directories in HDFS which you can configure and which follow a set pattern.

You can define part of your directory layout in this configuration file:

hbase-site.xml
<property> <name>hbase.rootdir</name> <value>hdfs://hadoop:8020/apps/hbase</value> </property>

Namespace and table subdirectories can be found under this directory:

${base.rootdir}/data

It is also worth being aware of this directory:

${hbase.tmp.dir}/hbase

We have subdirectories created under this dir for namespaces and tables. Here are some examples of what they might look like.

/apps/hbase/data/NameSpace1/Table1
/apps/hbase/data/NameSpace1/Table2
/apps/hbase/data/NameSpace2/TableA
/apps/hbase/data/NameSpace2/TableB
/apps/hbase/data/NameSpace2/TableC
/apps/hbase/data/Project5/Subject1

It is always good to know how things work behind the scenes or under the hood. This is especially true when working with anything related to Hadoop. Hopefully this is helpful.