Created 09-09-2016 05:08 AM
Hi, I understand to compress existing HBase table we can use below technique..
disable 'SNAPPY_TABLE'
alter 'SNAPPY_TABLE',{NAME=>'cf1',COMPRESSION=>'snappy'}
enable 'SNAPPY_TABLE'
However did you find a way how to compress existing data, as only new data is getting compressed. Your help is much appreciated.
TIA,
Dheeraj Madan
Created 09-09-2016 05:48 AM
After altering the table you can run major compaction on the table from hbase shell so that existing data will be automatically compressed.
> major_compact 'SNAPPY_TABLE'
Created 09-09-2016 05:48 AM
After altering the table you can run major compaction on the table from hbase shell so that existing data will be automatically compressed.
> major_compact 'SNAPPY_TABLE'
Created 09-09-2016 01:10 PM
Thanks Rajesh
Created 10-25-2018 07:30 PM
major_compact is not compressing existing data after altering the table to change compression from NONE to SNAPPY