HBASE-12137 Alter table add cf doesn't do compression test (Virag Kothari)

This commit is contained in:
Ted Yu 2014-10-04 00:40:22 +00:00
parent ef35182f1f
commit 7972ae764b
1 changed files with 5 additions and 4 deletions

View File

@ -1376,18 +1376,19 @@ public class HMaster extends HRegionServer implements MasterServices, Server {
} }
@Override @Override
public void addColumn(final TableName tableName, final HColumnDescriptor column) public void addColumn(final TableName tableName, final HColumnDescriptor columnDescriptor)
throws IOException { throws IOException {
checkInitialized(); checkInitialized();
checkCompression(columnDescriptor);
if (cpHost != null) { if (cpHost != null) {
if (cpHost.preAddColumn(tableName, column)) { if (cpHost.preAddColumn(tableName, columnDescriptor)) {
return; return;
} }
} }
//TODO: we should process this (and some others) in an executor //TODO: we should process this (and some others) in an executor
new TableAddFamilyHandler(tableName, column, this, this).prepare().process(); new TableAddFamilyHandler(tableName, columnDescriptor, this, this).prepare().process();
if (cpHost != null) { if (cpHost != null) {
cpHost.postAddColumn(tableName, column); cpHost.postAddColumn(tableName, columnDescriptor);
} }
} }