@Override public void closeRegionOperation() throws IOException { closeRegionOperation(Operation.ANY); }
@Override public void closeRegionOperation() throws IOException { region.closeRegionOperation(Operation.BATCH_MUTATE); }
@Override public void closeRegionOperation() throws IOException { region.closeRegionOperation(Operation.REPLAY_BATCH_MUTATE); }
private void preProcess(final RowProcessor<?,?> processor, final WALEdit walEdit) throws IOException { try { processor.preProcess(this, walEdit); } catch (IOException e) { closeRegionOperation(); throw e; } }
@Override public Void call() throws Exception { LOG.debug("Starting region operation on " + region); region.startRegionOperation(); try { LOG.debug("Flush region " + region.toString() + " started..."); region.flush(true); // TODO: flush result is not checked? } finally { LOG.debug("Closing region operation on " + region); region.closeRegionOperation(); } return null; } }
@Override public void close() { if (this.scanner != null) { try { this.scanner.close(); this.scanner = null; } catch (IOException ex) { LOG.warn("Exception while closing scanner", ex); } } if (this.region != null) { try { this.region.closeRegionOperation(); this.region.close(true); this.region = null; } catch (IOException ex) { LOG.warn("Exception while closing region", ex); } } }
@Override public synchronized boolean next(List<Cell> outResults, ScannerContext scannerContext) throws IOException { if (this.filterClosed) { throw new UnknownScannerException("Scanner was closed (timed out?) " + "after we renewed it. Could be caused by a very slow scanner " + "or a lengthy garbage collection"); } startRegionOperation(Operation.SCAN); try { return nextRaw(outResults, scannerContext); } finally { closeRegionOperation(Operation.SCAN); } }
@Override public synchronized boolean reseek(byte[] row) throws IOException { if (row == null) { throw new IllegalArgumentException("Row cannot be null."); } boolean result = false; startRegionOperation(); Cell kv = PrivateCellUtil.createFirstOnRow(row, 0, (short) row.length); try { // use request seek to make use of the lazy seek option. See HBASE-5520 result = this.storeHeap.requestSeek(kv, true, true); if (this.joinedHeap != null) { result = this.joinedHeap.requestSeek(kv, true, true) || result; } } finally { closeRegionOperation(); } return result; }
@Override public void delete(Delete delete) throws IOException { checkReadOnly(); checkResources(); startRegionOperation(Operation.DELETE); try { // All edits for the given row (across all column families) must happen atomically. doBatchMutate(delete); } finally { closeRegionOperation(Operation.DELETE); } }
@Override public void put(Put put) throws IOException { checkReadOnly(); // Do a rough check that we have resources to accept a write. The check is // 'rough' in that between the resource check and the call to obtain a // read lock, resources may run out. For now, the thought is that this // will be extremely rare; we'll deal with it when it happens. checkResources(); startRegionOperation(Operation.PUT); try { // All edits for the given row (across all column families) must happen atomically. doBatchMutate(put); } finally { closeRegionOperation(Operation.PUT); } }
region.closeRegionOperation(Operation.SNAPSHOT);
private RegionScannerImpl getScanner(Scan scan, List<KeyValueScanner> additionalScanners, long nonceGroup, long nonce) throws IOException { startRegionOperation(Operation.SCAN); try { // Verify families are all valid if (!scan.hasFamilies()) { // Adding all families to scanner for (byte[] family : this.htableDescriptor.getColumnFamilyNames()) { scan.addFamily(family); } } else { for (byte[] family : scan.getFamilyMap().keySet()) { checkFamily(family); } } return instantiateRegionScanner(scan, additionalScanners, nonceGroup, nonce); } finally { closeRegionOperation(Operation.SCAN); } }
closeRegionOperation(Operation.REPLAY_EVENT);
processor.postProcess(this, walEdit, true); } finally { closeRegionOperation(); closeRegionOperation(); if (!mutations.isEmpty()) { this.incMemStoreSize(memstoreAccounting.getMemStoreSize());
+ " doesn't exist any more. Skip loading the file(s)", ex); } finally { closeRegionOperation(Operation.REPLAY_EVENT);
closeRegionOperation(op); if (this.metricsRegion != null) { switch (op) {
closeRegionOperation(Operation.REPLAY_EVENT);
region.closeRegionOperation();