@Override public Result call(RegionObserver observer) throws IOException { return observer.postAppend(this, append, result); } });
@Override public Result postAppend(ObserverContext<RegionCoprocessorEnvironment> c, Append append, Result result) throws IOException { return delegate.postAppend(c, append, result); }
@Override public Result postAppend(ObserverContext<RegionCoprocessorEnvironment> c, Append append, Result result) throws IOException { return delegate.postAppend(c, append, result); }
@Override public Result postAppend(ObserverContext<RegionCoprocessorEnvironment> c, Append append, Result result) throws IOException { return delegate.postAppend(c, append, result); }
@Override public void call(RegionObserver oserver, ObserverContext<RegionCoprocessorEnvironment> ctx) throws IOException { oserver.postAppend(ctx, append, result); } });
@Override public Result postAppend(ObserverContext<RegionCoprocessorEnvironment> c, Append append, Result result) throws IOException { if(LOG.isDebugEnabled()) { LOG.debug("==> HBaseAtlasCoprocessor.postAppend()"); } final Result ret; try { activatePluginClassLoader(); ret = implRegionObserver.postAppend(c, append, result); } finally { deactivatePluginClassLoader(); } if(LOG.isDebugEnabled()) { LOG.debug("<== HBaseAtlasCoprocessor.postAppend()"); } return ret; }
/** * @param append Append object * @param result the result returned by postAppend * @throws IOException if an error occurred on the coprocessor */ public void postAppend(final Append append, Result result) throws IOException { ObserverContext<RegionCoprocessorEnvironment> ctx = null; for (RegionEnvironment env: coprocessors) { if (env.getInstance() instanceof RegionObserver) { ctx = ObserverContext.createAndPrepare(env, ctx); try { ((RegionObserver)env.getInstance()).postAppend(ctx, append, result); } catch (Throwable e) { handleCoprocessorThrowable(env, e); } if (ctx.shouldComplete()) { break; } } } }