@Override public void startRegionOperation() throws IOException { region.startRegionOperation(Operation.REPLAY_BATCH_MUTATE); }
@Override public void startRegionOperation() throws IOException { startRegionOperation(Operation.ANY); }
@Override public void startRegionOperation() throws IOException { region.startRegionOperation(Operation.BATCH_MUTATE); }
@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 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.startRegionOperation(Operation.SNAPSHOT); try { if (skipFlush) {
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); } }
startRegionOperation(); // obtain region close lock try { Map<HStore, Long> map = new HashMap<>();
startRegionOperation(); try { Get get = new Get(row);
public ClientSideRegionScanner(Configuration conf, FileSystem fs, Path rootDir, TableDescriptor htd, RegionInfo hri, Scan scan, ScanMetrics scanMetrics) throws IOException { // region is immutable, set isolation level scan.setIsolationLevel(IsolationLevel.READ_UNCOMMITTED); htd = TableDescriptorBuilder.newBuilder(htd).setReadOnly(true).build(); // open region from the snapshot directory region = HRegion.newHRegion(FSUtils.getTableDir(rootDir, htd.getTableName()), null, fs, conf, hri, htd, null); // we won't initialize the MobFileCache when not running in RS process. so provided an // initialized cache. Consider the case: an CF was set from an mob to non-mob. if we only // initialize cache for MOB region, NPE from HMobStore will still happen. So Initialize the // cache for every region although it may hasn't any mob CF, BTW the cache is very light-weight. region.setMobFileCache(new MobFileCache(conf)); region.initialize(); // create an internal region scanner this.scanner = region.getScanner(scan); values = new ArrayList<>(); if (scanMetrics == null) { initScanMetrics(scan); } else { this.scanMetrics = scanMetrics; } region.startRegionOperation(); }
startRegionOperation(Operation.REPLAY_EVENT); // use region close lock to guard against close try { FlushAction action = flush.getAction();
startRegionOperation(Operation.REPLAY_EVENT); try { HStore store = this.getStore(compaction.getFamilyName().toByteArray());
"Compactions on this region are " + "disabled due to a space quota violation."); region.startRegionOperation(Operation.COMPACT_REGION); LOG.info("Compacting " + region.getRegionInfo().getRegionNameAsString()); boolean major = request.hasMajor() && request.getMajor();
startRegionOperation(); WALEdit walEdit = new WALEdit();
this.writeRequestsCount.increment(); WriteEntry writeEntry = null; startRegionOperation(op); List<Cell> results = returnResults? new ArrayList<>(mutation.size()): null; RowLock rowLock = null;
"RegionEvent marker from WAL ", regionEvent); startRegionOperation(Operation.REPLAY_EVENT); try { if (ServerRegionReplicaUtil.isDefaultReplica(this.getRegionInfo())) {
if (request.hasBestSplitRow() && request.getBestSplitRow()) { HRegion r = region; region.startRegionOperation(Operation.SPLIT_REGION); r.forceSplit(null);