@Override public void call(MasterObserver observer) throws IOException { observer.postBalanceSwitch(this, oldValue, newValue); } });
@Override public void call(MasterObserver oserver, ObserverContext<MasterCoprocessorEnvironment> ctx) throws IOException { oserver.postBalanceSwitch(ctx, oldValue, newValue); } });
@Override public void postBalanceSwitch(ObserverContext<MasterCoprocessorEnvironment> ctx, boolean oldValue, boolean newValue) throws IOException { if(LOG.isDebugEnabled()) { LOG.debug("==> HBaseAtlasCoprocessor.postBalanceSwitch()"); } try { activatePluginClassLoader(); implMasterObserver.postBalanceSwitch(ctx, oldValue, newValue); } finally { deactivatePluginClassLoader(); } if(LOG.isDebugEnabled()) { LOG.debug("<== HBaseAtlasCoprocessor.postBalanceSwitch()"); } }
void postBalanceSwitch(final boolean oldValue, final boolean newValue) throws IOException { ObserverContext<MasterCoprocessorEnvironment> ctx = null; for (MasterEnvironment env: coprocessors) { if (env.getInstance() instanceof MasterObserver) { ctx = ObserverContext.createAndPrepare(env, ctx); try { ((MasterObserver)env.getInstance()).postBalanceSwitch( ctx, oldValue, newValue); } catch (Throwable e) { handleCoprocessorThrowable(env, e); } if (ctx.shouldComplete()) { break; } } } }