Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How can I force a major compaction on an already major compacted HBase table?

avatar
New Contributor

Dear all,

I modified the compression setting on an hbase table containing a MOB column - where I did not have any compression before.

hbase:/> disable 'MyTable'
hbase:/> alter 'MyTable' {NAME=> 'cfMOBContent', COMPRESSION=>'SNAPPY' }
hbase:/> enable 'MyTable'
hbase:/> compact 'MyTable','MOB'
hbase:/> major_compact 'MyTable'

I did test if SNAPPY is available before.

My understanding was, that this change will lead to a major re-compaction on all files - freeing space on HDFS.

Looking into the logs, it seems that compaction is run, but only on a view files, not all previously compacted files.

Now: Is there a way i can force major_compact on all files related to that table?

The only idea I have remaining is: Snapshot, Export, Truncate, Import - Would that work?

p.s.: The cluster is IDLE and not in production.

2 REPLIES 2

avatar
New Contributor

Hi there. Anyone in the community who could share an idea?

avatar

@Christian Wurbs, Ideally major compact command should compress the altered column. Can you please re-run the major_compact command and re-check it. Additionally you can try compacting the column family.

Compact a single column family within a table

hbase> major_compact ‘t1’, ‘c1’