@Override public void call(RegionObserver observer) throws IOException { observer.postBulkLoadHFile(this, familyPaths, map); } });
@Override public void postBulkLoadHFile(ObserverContext<RegionCoprocessorEnvironment> ctx, List<Pair<byte[], String>> stagingFamilyPaths, Map<byte[], List<Path>> finalPaths) throws IOException { delegate.postBulkLoadHFile(ctx, stagingFamilyPaths, finalPaths); }
@Override public void postBulkLoadHFile(ObserverContext<RegionCoprocessorEnvironment> ctx, List<Pair<byte[], String>> stagingFamilyPaths, Map<byte[], List<Path>> finalPaths) throws IOException { delegate.postBulkLoadHFile(ctx, stagingFamilyPaths, finalPaths); }
@Override public void postBulkLoadHFile(ObserverContext<RegionCoprocessorEnvironment> ctx, List<Pair<byte[], String>> stagingFamilyPaths, Map<byte[], List<Path>> finalPaths) throws IOException { delegate.postBulkLoadHFile(ctx, stagingFamilyPaths, finalPaths); }
@Override public boolean postBulkLoadHFile(ObserverContext<RegionCoprocessorEnvironment> ctx, List<Pair<byte[], String>> familyPaths, boolean hasLoaded) throws IOException { if(LOG.isDebugEnabled()) { LOG.debug("==> HBaseAtlasCoprocessor.postBulkLoadHFile()"); } final boolean ret; try { activatePluginClassLoader(); ret = implRegionObserver.postBulkLoadHFile(ctx, familyPaths, hasLoaded); } finally { deactivatePluginClassLoader(); } if(LOG.isDebugEnabled()) { LOG.debug("<== HBaseAtlasCoprocessor.postBulkLoadHFile()"); } return ret; }
@Override public void call(RegionObserver oserver, ObserverContext<RegionCoprocessorEnvironment> ctx) throws IOException { setResult(oserver.postBulkLoadHFile(ctx, familyPaths, getResult())); } });
/** * @param familyPaths pairs of { CF, file path } submitted for bulk load * @param hasLoaded whether load was successful or not * @return the possibly modified value of hasLoaded * @throws IOException */ public boolean postBulkLoadHFile(List<Pair<byte[], String>> familyPaths, boolean hasLoaded) throws IOException { ObserverContext<RegionCoprocessorEnvironment> ctx = null; for (RegionEnvironment env: coprocessors) { if (env.getInstance() instanceof RegionObserver) { ctx = ObserverContext.createAndPrepare(env, ctx); try { hasLoaded = ((RegionObserver)env.getInstance()).postBulkLoadHFile(ctx, familyPaths, hasLoaded); } catch (Throwable e) { handleCoprocessorThrowable(env, e); } if (ctx.shouldComplete()) { break; } } } return hasLoaded; }