# hbase Check hbase size HDFs dfs-du-h/hbase/data/default/[root@zhjt machtalk]# HDFs dfs-du-h/hbase/data/default 197.4 m 197.4 M/hbase/data/default/api_access_record 1.0 M 1.0 m/hbase/data/default/dev_opt 38.6 m 38.6 m/h Base/data/default/log_record 333 333/hbase/data/default/dev_fault 13.4 M 13.4 m/hbase/data/default/value_d ATA describe ' api_access_record ' alter ' tablename′, NAME = ' Api_access_record ', TTL = 2592000 alter ' api_access _record ', NAME = ' values ', TTL = 259200 [machtalk@zhjt ~]$ df Filesystem 1k-blocks used Available Use% mounted on/dev/mapper/vg_test-lv_root 51606140 24709820 24274880 51%/TMPFS 30692756 8 30692748 1%/dev/shm/dev/sda1 495844 32422 437822 7%/BOOT/DEV/MAPPER/VG _test-lv_home 461914096 33595976 404854184 8%/data cm_processes 30692756 10616 3068 2140 1%/opt/cm-5.5.0/run/cloudera-scm-agent/process Disable ' table ' Enable ' Test_ttl ' get ' api_access_record ', ' values ' # modify alter ' API _access_record ', name = ' Values ', TTL = 2592000 # modification Process hbase (main):005:0> alter ' Api_access_record ', name =&G T
' Values ', TTL = 259200 Updating All regions with the new schema ...
0/1 regions updated.
1/1 regions updated.
Done. 0 row (s) in 2.5270 seconds # view describe ' Api_access_record ' describe ' api_access_record ' [MACHTALK@ZHJT ~]$ DF Files Ystem 1k-blocks used Available use% mounted on/dev/mapper/vg_test-lv_root 51606140 24713260 24271440 51%/tmpfs 30692756 8 30692748 1%/dev/shm/dev/sda1 495844 32422 437822 7%/boot/dev/mapper/vg_test-lv_home 461914096 33581168 404868992 8%/data C M_processes 30692756 10616 30682140 1%/opt/cm-5.5.0/run/cloudera-scm-agent/process [Machtalk@ZHJT ~]$ H DFS dfs-du-h/hbase/data/default/197.4 m 197.4 M/hbase/data/default/api_access_record 1.0 M 1.0 m/hbase/data/default/dev_opt 38.6 m 38.6 M/hbase/data/default/log_record 333 333/hbase/data/default/dev_fault 13.4 M 13.4 m/hbase/data/de Fault/value_data T1 = get_table ' Api_access_record ' hbase (main):017:0> t1._count_internal = 86556 # Modify the default size of the table al ter ' T1 ', METHOD = ' Table_att ', *max_filesize* = ' 134217728 ' Maximum hstorefile size.
If any one of a column families ' hstorefiles have grown to exceed this value, the hosting hregion are split in. # reference http://blog.csdn.net/mrtitan/article/details/8292041 1480521600000 1483200000000 # before January 3 no data scan ' Api_access_r Ecord ', {timerange =>[1480521600000,1483372800000]} # Save 10 days try Alter ' api_access_record ', NAME = ' values ', TTL = 864000 # After the deletion is complete, see HBase (main):006:0> t1._count_internal = 4148 [machtalk@zhjt ~]$ DF Filesystem 1k-blo Cks used Available use% mounted On/dev/mapper/vg_teSt-lv_root 51606140 24721924 24262776 51%/TMPFS 30692756 8 30692748
1%/dev/shm/dev/sda1 495844 32422 437822 7%/boot/dev/mapper/vg_test-lv_home 461914096 33614808 404835352 8%/data cm_processes 30692756 10616 30682140 1%/opt/cm-5.5.0/run/cloude Ra-scm-agent/process 24721924-24709820 = 12104 byte # only after a large merge will the space be released https://dxer.github.io/2016/03/18/hbase/http:// book.51cto.com/art/201312/420269.htm # Big Merge, free space hbase shell major_compact [machtalk@zhjt ~]$ DF Filesystem 1K -blocks used Available use% mounted on/dev/mapper/vg_test-lv_root 51606140 24730240 24254460 51%/TMPFS 30692756 8 30692748 1%/dev/shm/dev/sda1 495844 32422 43782 2 7%/boot/dev/mapper/vg_test-lv_home 461914096 33607744 404842416 8%/data cm_processes 30692756 10616 30682140 1%/opt/cm-5.5.0/run/cloudera-scm-agent/process http://www.cnblogs.com/nexiyi/p/hbase_shell.html # Should Hadoop this block does not release HDFs HDFs dfs-du-h/hbase/. Trash