This is what setCompactionEnabled() does:
public HTableDescriptor setCompactionEnabled(final boolean isEnable) {
setValue(COMPACTION_ENABLED_KEY, isEnable ? TRUE : FALSE);
return this;
FYI
On Mon, Jan 5, 2015 at 11:00 PM, Jianshi Huang <jianshi.huang@gmail.com>
wrote:
> Hi,
>
> Firstly, I found it strange that when I added a new split to a table and do
> admin.move, it will trigger a MAJOR compaction for the whole table.
>
> So I tried to disable compaction before adding splits,
>
>
> admin.getTableDescriptor(tableNameBytes).setCompactionEnabled(false)
>
> However, MAJOR compaction is still triggered, looks like the flag is
> ignored by HBase? Do I need to (have to) disable the table first?
>
> Cheers,
> --
> Jianshi Huang
>
> LinkedIn: jianshi
> Twitter: @jshuang
> Github & Blog: http://huangjs.github.com/
>
|