@Override public boolean nextRaw(List<KeyValue> result, String metric) throws IOException { try { return s.nextRaw(result, metric); } catch (Throwable t) { ServerUtil.throwIOException(c.getEnvironment().getRegion().getRegionNameAsString(), t); return false; // impossible } }
@Override public boolean next(List<KeyValue> results) throws IOException { try { return s.next(results); } catch (Throwable t) { ServerUtil.throwIOException(c.getEnvironment().getRegion().getRegionNameAsString(), t); return false; // impossible } }
@Override public boolean next(List<KeyValue> results, String metric) throws IOException { try { return s.next(results, metric); } catch (Throwable t) { ServerUtil.throwIOException(c.getEnvironment().getRegion().getRegionNameAsString(), t); return false; // impossible } }
@Override public boolean next(List<KeyValue> result, int limit, String metric) throws IOException { try { return s.next(result, limit, metric); } catch (Throwable t) { ServerUtil.throwIOException(c.getEnvironment().getRegion().getRegionNameAsString(), t); return false; // impossible } }
@Override public boolean nextRaw(List<KeyValue> result, int limit, String metric) throws IOException { try { return s.nextRaw(result, limit, metric); } catch (Throwable t) { ServerUtil.throwIOException(c.getEnvironment().getRegion().getRegionNameAsString(), t); return false; // impossible } } };
@Override public boolean next(List<KeyValue> result, int limit) throws IOException { try { return s.next(result, limit); } catch (Throwable t) { ServerUtil.throwIOException(c.getEnvironment().getRegion().getRegionNameAsString(), t); return false; // impossible } }
/** * Wrapper for {@link #postScannerOpen(ObserverContext, Scan, RegionScanner)} that ensures no non IOException is thrown, * to prevent the coprocessor from becoming blacklisted. * */ @Override public final RegionScanner postScannerOpen(final ObserverContext<RegionCoprocessorEnvironment> c, final Scan scan, final RegionScanner s) throws IOException { try { return doPostScannerOpen(c, scan, s); } catch (Throwable t) { ServerUtil.throwIOException(c.getEnvironment().getRegion().getRegionNameAsString(), t); return null; // impossible } } }
@Override public boolean next(List<KeyValue> results) throws IOException { try { if (isFilterDone()) { return false; } for (int i = 0; i < tuple.size(); i++) { results.add(tuple.getValue(i)); } tuple = iterator.next(); return !isFilterDone(); } catch (Throwable t) { ServerUtil.throwIOException(region.getRegionNameAsString(), t); return false; } }
@Override public void addToOnlineRegions(HRegion r) { regions.put(r.getRegionNameAsString(), r); }
@Override public void addToOnlineRegions(HRegion r) { regions.put(r.getRegionNameAsString(), r); }
@Override public void addToOnlineRegions(HRegion r) { regions.put(r.getRegionNameAsString(), r); }
logger.error("Failed to create row in " + region.getRegionNameAsString() + " with values " + SchemaUtil.toString(values), e); continue;
public synchronized void requestSplit(final HRegion r, byte[] midKey) { if (midKey == null) { LOG.debug("Region " + r.getRegionNameAsString() + " not splittable because midkey=null"); return; } try { this.splits.execute(new SplitRequest(r, midKey, this.server)); if (LOG.isDebugEnabled()) { LOG.debug("Split requested for " + r + ". " + this); } } catch (RejectedExecutionException ree) { LOG.info("Could not execute split for " + r, ree); } }
chunk.resize(actualSize); } catch (Throwable t) { ServerUtil.throwIOException(region.getRegionNameAsString(), t); return null; } finally {
@Override public void close() throws IOException { LOG.info("Region " + env.getRegion().getRegionNameAsString() + " " + triggeringAction + ", rows evicted: " + rowsEvicted + " / " + totalRows + ", skipped incomplete: " + skippedIncomplete); scanner.close(); }
/** * <pre> * Region-unittest * ,\x82\xB4\x85\xC2\x7F\xFF\xFE\xB6\xC9jNG\xEE!\x5C3\xBB\xAE\xA1 * :\x05\xA5\xA9x\xB0\xA1"8\x05\xFB(\xD2VY\xDB\x9A\x06\x09\xA9\x98\xC2\xE3\x8D=,1413960230654.aaf2a6c9f2c87c196f43497243bb2424. * * RegionID-unittest,1413960230654 * </pre> */ protected String getLogHeader() { HRegion region = this.getCurrentRegion(); return LOG.isDebugEnabled() ? String.format("Region-%s", region.getRegionNameAsString()) : String.format("Region-%s,%d", region.getTableDesc().getNameAsString(), region.getRegionId()); }
/** * <pre> * Region-unittest,\x82\xB4\x85\xC2\x7F\xFF\xFE\xB6\xC9jNG\xEE!\x5C3\xBB\xAE\xA1:\x05\xA5\xA9x\xB0\xA1"8\x05\xFB(\xD2VY\xDB\x9A\x06\x09\xA9\x98\xC2\xE3\x8D=,1413960230654.aaf2a6c9f2c87c196f43497243bb2424. * RegionID-unittest,1413960230654 * </pre> */ protected String getLogHeader(){ HRegion region = this.getCurrentRegion(); return LOG.isDebugEnabled() ? String.format("Region-%s",region.getRegionNameAsString()): String.format("Region-%s,%d",region.getTableDesc().getNameAsString(),region.getRegionId()); }
private void compactRegion(final HTableDescriptor htd, final Path regionDir, final boolean compactOnce) throws IOException { HRegion region = loadRegion(fs, conf, htd, regionDir); LOG.info("Compact table=" + htd.getNameAsString() + " region=" + region.getRegionNameAsString()); for (Path familyDir: FSUtils.getFamilyDirs(fs, regionDir)) { compactStoreFiles(region, familyDir, compactOnce); } }
public CompactionState(final RegionCoprocessorEnvironment env, final TableName stateTable, long pruneFlushInterval) { this.regionName = env.getRegion().getRegionName(); this.regionNameAsString = env.getRegion().getRegionNameAsString(); DataJanitorState dataJanitorState = new DataJanitorState(new DataJanitorState.TableSupplier() { @Override public HTableInterface get() throws IOException { return env.getTable(stateTable); } }); this.pruneUpperBoundWriterSupplier = new PruneUpperBoundWriterSupplier(stateTable, dataJanitorState, pruneFlushInterval); this.pruneUpperBoundWriter = pruneUpperBoundWriterSupplier.get(); }
public CompactionState(final RegionCoprocessorEnvironment env, final TableName stateTable, long pruneFlushInterval) { this.regionName = env.getRegion().getRegionName(); this.regionNameAsString = env.getRegion().getRegionNameAsString(); DataJanitorState dataJanitorState = new DataJanitorState(new DataJanitorState.TableSupplier() { @Override public HTableInterface get() throws IOException { return env.getTable(stateTable); } }); this.pruneUpperBoundWriterSupplier = new PruneUpperBoundWriterSupplier(stateTable, dataJanitorState, pruneFlushInterval); this.pruneUpperBoundWriter = pruneUpperBoundWriterSupplier.get(); }