@Override public Boolean call(RegionObserver observer) throws IOException { return observer.preExists(this, get, getResult()); } });
@Override public boolean preExists(ObserverContext<RegionCoprocessorEnvironment> c, Get get, boolean exists) throws IOException { return delegate.preExists(c, get, exists); }
@Override public boolean preExists(ObserverContext<RegionCoprocessorEnvironment> c, Get get, boolean exists) throws IOException { return delegate.preExists(c, get, exists); }
@Override public boolean preExists(ObserverContext<RegionCoprocessorEnvironment> c, Get get, boolean exists) throws IOException { return delegate.preExists(c, get, exists); }
@Override public boolean preExists(ObserverContext<RegionCoprocessorEnvironment> c, Get get, boolean exists) throws IOException { if(LOG.isDebugEnabled()) { LOG.debug("==> HBaseAtlasCoprocessor.preExists()"); } final boolean ret; try { activatePluginClassLoader(); ret = implRegionObserver.preExists(c, get, exists); } finally { deactivatePluginClassLoader(); } if(LOG.isDebugEnabled()) { LOG.debug("<== HBaseAtlasCoprocessor.preExists()"); } return ret; }
@Override public void call(RegionObserver oserver, ObserverContext<RegionCoprocessorEnvironment> ctx) throws IOException { setResult(oserver.preExists(ctx, get, getResult())); } });
/** * @param get the Get request * @return true or false to return to client if bypassing normal operation, * or null otherwise * @exception IOException Exception */ public Boolean preExists(final Get get) throws IOException { boolean bypass = false; boolean exists = false; ObserverContext<RegionCoprocessorEnvironment> ctx = null; for (RegionEnvironment env: coprocessors) { if (env.getInstance() instanceof RegionObserver) { ctx = ObserverContext.createAndPrepare(env, ctx); try { exists = ((RegionObserver)env.getInstance()).preExists(ctx, get, exists); } catch (Throwable e) { handleCoprocessorThrowable(env, e); } bypass |= ctx.shouldBypass(); if (ctx.shouldComplete()) { break; } } } return bypass ? exists : null; }