- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to compress existing hBase data using Snappy
- Labels:
-
Apache HBase
Created 09-09-2016 05:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Rajesh
Created 10-25-2018 07:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
major_compact is not compressing existing data after altering the table to change compression from NONE to SNAPPY
