@Override public void call(MasterObserver observer) throws IOException { observer.postModifyTable(this, tableName, oldDescriptor, currentDescriptor); } });
/** * Called after the modifyTable operation has been requested. Called as part * of modify table RPC call. * @param ctx the environment to interact with the framework and master * @param tableName the name of the table * @param oldDescriptor descriptor of table before modify operation happened * @param currentDescriptor current TableDescriptor of the table */ default void postModifyTable(final ObserverContext<MasterCoprocessorEnvironment> ctx, final TableName tableName, TableDescriptor oldDescriptor, TableDescriptor currentDescriptor) throws IOException { postModifyTable(ctx, tableName, currentDescriptor); }
@Override public void call(MasterObserver oserver, ObserverContext<MasterCoprocessorEnvironment> ctx) throws IOException { oserver.postModifyTable(ctx, tableName, htd); } });
@Override public void postModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx, TableName tableName, HTableDescriptor htd) throws IOException { if(LOG.isDebugEnabled()) { LOG.debug("==> HBaseAtlasCoprocessor.postModifyTable()"); } try { activatePluginClassLoader(); implMasterObserver.postModifyTable(ctx, tableName, htd); } finally { deactivatePluginClassLoader(); } if(LOG.isDebugEnabled()) { LOG.debug("<== HBaseAtlasCoprocessor.postModifyTable()"); } }
void postModifyTable(final byte[] tableName, HTableDescriptor htd) throws IOException { ObserverContext<MasterCoprocessorEnvironment> ctx = null; for (MasterEnvironment env: coprocessors) { if (env.getInstance() instanceof MasterObserver) { ctx = ObserverContext.createAndPrepare(env, ctx); try { ((MasterObserver)env.getInstance()).postModifyTable(ctx, tableName, htd); } catch (Throwable e) { handleCoprocessorThrowable(env, e); } if (ctx.shouldComplete()) { break; } } } }