HBase新建表后目录结构
2019-12-19 本文已影响0人
步闲
我们创建一个名为test_zpb的表,32个分区,一个列族 f,命名空间为 dalishen。
$ hdfs dfs -ls /apps/hbase/data/.hbase-snapshot
Found 2 items
drwxr-xr-x - hbase hdfs 0 2019-12-19 15:34 /apps/hbase/data/.hbase-snapshot/.tmp
$ hdfs dfs -ls /apps/hbase/data/data/dalishen/test_zpb/
Found 35 items
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/.tabledesc
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/.tmp
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/021e5d2c35e162dd1236faa3ebdbbe2d
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/06a01251cd219f7ce5aee0f5d023d34b
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/19220910fb73b53dfc54c235a40caebb
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/1efc6ba5e3b6a288870a33d27ea9dbd6
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/240ce10fb56f3ffb37817e318c7335ba
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/2ffbf5d65ef7953019f1f3fb7ef81eed
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/365e050fe084e44261af2bae63560430
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/40a31d0000dc868a8ee245fc8ec1c169
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/4adf2cc67feb4fccdfbacd8f7ab7fa81
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/4d65a4a2726c7f2244e9235788ea3ccf
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/7082755b63529b0a7564fdff0da6d223
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/8306618bdfa86cd8c2c3d07779727599
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/841750700e31d763774575c656ce3f3b
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/90b5c25b85e956c3409f32221c4e83dc
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/91dc650e35ee18156cd8a93f12d1f7c7
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/9b2ef0f660950c77598a71e6f55e27c1
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/a1144d4e78a6e4f7f3517e2b80e18657
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/a317fba337cdb663f304dee72692b863
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/a7633cbb9cb467bd716b18456074ae29
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/ac415f80e2effb552e62fe0822b2eb63
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/b0b5bca6ab08f564609e32cecdd3cbd0
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/b49e287e36a8c6e258c3d3ea9369a5d6
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/bd42e7e8441d11fd40496a0ad3698800
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/bf07d35ea6401602f67fa861918d4da7
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/c9f5d00e3ee83dbfd0905ee18347b9ae
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/cdea6000fa32caf7a0b263b13f9236f6
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/d192b9f086ec68f8eaea7862ddf14126
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/d197aec2097e671d272a70934b66d9f4
drwxr-xr-x - hbase hdfs 0 2019-09-10 11:53 /apps/hbase/data/data/dalishen/test_zpb/dc12fd61f4905fe26a83297e5929e486
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/e661f9db1d46eaf17041349832d9d708
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/ef0ba90ae07b0755ef672280f9135bf5
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/f7cd50881204a43de3ad2cd03449c561
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/fa7c5ff70f43a95de8f2ce64318aef53
查看根目录下各目录情况:
$ hdfs dfs -ls /apps/hbase/data/data/dalishen/test_zpb/.tabledesc
Found 1 items
-rw-r--r-- 3 hbase hdfs 293 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/.tabledesc/.tableinfo.0000000001
$ hdfs dfs -cat /apps/hbase/data/data/dalishen/test_zpb/.tabledesc/.tableinfo.0000000001
PBUF
dalishetest_zpb
IS_METAfalse
f
BLOOMFILTERROW VERSIONS1
IN_MEMORYfalse
EEP_DELETED_CELLSFALSE
DATA_BLOCK_ENCODING FAST_DIFF
TTL
2147483647
COMPRESSIONSNAPPY
MIN_VERSIONS0
BLOCKCACHEtrue
BLOCKSIZE65536
REPLICATION_SCOPE0
# 该目录下初建表时是空的
$ hdfs dfs -ls /apps/hbase/data/data/dalishen/test_zpb/.tmp
$ hdfs dfs -ls /apps/hbase/data/data/dalishen/test_zpb/021e5d2c35e162dd1236faa3ebdbbe2d
Found 3 items
-rw-r--r-- 3 hbase hdfs 48 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/021e5d2c35e162dd1236faa3ebdbbe2d/.regioninfo
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/021e5d2c35e162dd1236faa3ebdbbe2d/f
drwxr-xr-x - hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/021e5d2c35e162dd1236faa3ebdbbe2d/recovered.edits
hdfs dfs -cat /apps/hbase/data/data/dalishen/test_zpb/021e5d2c35e162dd1236faa3ebdbbe2d/.regioninfo
PBUF½侑˭ dalishetest_zpb14"15(08
$ hdfs dfs -ls /apps/hbase/data/data/dalishen/test_zpb/021e5d2c35e162dd1236faa3ebdbbe2d/recovered.edits
Found 1 items
-rw-r--r-- 3 hbase hdfs 0 2019-08-27 16:27 /apps/hbase/data/data/dalishen/test_zpb/021e5d2c35e162dd1236faa3ebdbbe2d/recovered.edits/2.seqid
# 该文件初建表时是空的
$ hdfs dfs -cat /apps/hbase/data/data/dalishen/test_zpb/021e5d2c35e162dd1236faa3ebdbbe2d/recovered.edits/2.seqid
# 该目录下初建表时是空的
$ hdfs dfs -ls /apps/hbase/data/data/dalishen/test_zpb/021e5d2c35e162dd1236faa3ebdbbe2d/f
写入一条数据后
hbase(main):015:0> scan 'dalishen:test_zpb'
ROW COLUMN+CELL
0f_123 column=f:day, timestamp=1568083989296, value=20190910
0f_123 column=f:id, timestamp=1568083989296, value=123
0f_123 column=f:name, timestamp=1568083989296, value=zhou123
0f_123 column=f:uploadtime, timestamp=1568083989296, value=2019-09-10 10:53:09
1 row(s) in 0.1360 seconds
hbase(main):014:0> locate_region 'dalishen:test_zpb', '0f_123'
HOST REGION
yhg-hadoop-54188.xcar.com.cn:16020 {ENCODED => dc12fd61f4905fe26a83297e5929e486, NAME => 'dalishen:test_zpb,0f,1566894436925.dc12fd61f4905fe26a83297e5929e486.', STARTKEY => '0
f', ENDKEY => '10'}
1 row(s) in 0.0080 seconds
$ hdfs dfs -ls /apps/hbase/data/data/dalishen/test_zpb/dc12fd61f4905fe26a83297e5929e486/f
Found 1 items
-rw-r--r-- 3 hbase hdfs 4916 2019-12-14 14:50 /apps/hbase/data/data/dalishen/test_zpb/dc12fd61f4905fe26a83297e5929e486/f/eb701646aa20492b812283272edaa636
$ hbase org.apache.hadoop.hbase.io.hfile.HFile -f /apps/hbase/data/data/dalishen/test_zpb/dc12fd61f4905fe26a83297e5929e486/f/eb701646aa20492b812283272edaa636 -p
2019-12-19 13:29:23,592 INFO [main] impl.MetricsConfig: loaded properties from hadoop-metrics2-hbase.properties
2019-12-19 13:29:23,747 INFO [main] impl.MetricsSystemImpl: Scheduled snapshot period at 10 second(s).
2019-12-19 13:29:23,747 INFO [main] impl.MetricsSystemImpl: HBase metrics system started
2019-12-19 13:29:25,120 INFO [main] hfile.CacheConfig: CacheConfig:disabled
2019-12-19 13:29:25,120 INFO [main] hfile.CacheConfig: CacheConfig:disabled
2019-12-19 13:29:25,421 INFO [main] compress.CodecPool: Got brand-new decompressor [.snappy]
K: 0f_123/f:day/1568083989296/Put/vlen=8/seqid=0 V: 20190910
K: 0f_123/f:id/1568083989296/Put/vlen=3/seqid=0 V: 123
K: 0f_123/f:name/1568083989296/Put/vlen=7/seqid=0 V: zhou123
K: 0f_123/f:uploadtime/1568083989296/Put/vlen=19/seqid=0 V: 2019-09-10 10:53:09
Scanned kv count -> 4