@Override public void modifyTable(final byte[] tableName, HTableDescriptor htd) throws IOException { checkInitialized(); if (cpHost != null) { cpHost.preModifyTable(tableName, htd); } TableEventHandler tblHandler = new ModifyTableHandler(tableName, htd, this, this); this.executorService.submit(tblHandler); // prevent client from querying status even before the event is being handled. tblHandler.waitForEventBeingHandled(); if (cpHost != null) { cpHost.postModifyTable(tableName, htd); } }
@Override public void modifyTable(final byte[] tableName, final HTableDescriptor descriptor) throws IOException { checkInitialized(); checkCompression(descriptor); if (cpHost != null) { cpHost.preModifyTable(tableName, descriptor); } TableEventHandler tblHandle = new ModifyTableHandler(tableName, descriptor, this, this); this.executorService.submit(tblHandle); tblHandle.waitForPersist(); if (cpHost != null) { cpHost.postModifyTable(tableName, descriptor); } }