Ah! I need run admin.modifyTable(tableNameBytes, tableDescriptor)
Will try it soon... Jianshi On Tue, Jan 6, 2015 at 11:12 PM, Ted Yu <[email protected]> wrote: > 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 <[email protected]> > 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/ > > > -- Jianshi Huang LinkedIn: jianshi Twitter: @jshuang Github & Blog: http://huangjs.github.com/
