Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0028D200D20 for ; Mon, 2 Oct 2017 17:13:44 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id F2BAD160BCB; Mon, 2 Oct 2017 15:13:44 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 54B47160BD7 for ; Mon, 2 Oct 2017 17:13:43 +0200 (CEST) Received: (qmail 30853 invoked by uid 500); 2 Oct 2017 15:13:32 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 30063 invoked by uid 99); 2 Oct 2017 15:13:31 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Oct 2017 15:13:31 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 39F5CF5C23; Mon, 2 Oct 2017 15:13:31 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: git-site-role@apache.org To: commits@hbase.apache.org Date: Mon, 02 Oct 2017 15:13:55 -0000 Message-Id: <5332c7ec7d9e4303b68b08ab8967546b@git.apache.org> In-Reply-To: <99a49c8b60554e8fa040d02ce0bee5b3@git.apache.org> References: <99a49c8b60554e8fa040d02ce0bee5b3@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [26/51] [partial] hbase-site git commit: Published site at . archived-at: Mon, 02 Oct 2017 15:13:45 -0000 http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3332caca/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/DefaultHeapMemoryTuner.html ---------------------------------------------------------------------- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/DefaultHeapMemoryTuner.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/DefaultHeapMemoryTuner.html index 58c6ad7..939d24a 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/DefaultHeapMemoryTuner.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/DefaultHeapMemoryTuner.html @@ -150,7 +150,7 @@ 142 long blockedFlushCount = context.getBlockedFlushCount(); 143 long unblockedFlushCount = context.getUnblockedFlushCount(); 144 long totalOnheapFlushCount = blockedFlushCount + unblockedFlushCount; -145 boolean offheapMemstore = context.isOffheapMemstore(); +145 boolean offheapMemstore = context.isOffheapMemStore(); 146 float newMemstoreSize; 147 float newBlockCacheSize; 148 @@ -231,7 +231,7 @@ 223 newBlockCacheSize = blockCachePercentMinRange; 224 } 225 TUNER_RESULT.setBlockCacheSize(newBlockCacheSize); -226 TUNER_RESULT.setMemstoreSize(newMemstoreSize); +226 TUNER_RESULT.setMemStoreSize(newMemstoreSize); 227 prevTuneDirection = newTuneDirection; 228 return TUNER_RESULT; 229 } http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3332caca/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/DefaultMemStore.html ---------------------------------------------------------------------- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/DefaultMemStore.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/DefaultMemStore.html index a92b42e..5400ab5 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/DefaultMemStore.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/DefaultMemStore.html @@ -111,10 +111,10 @@ 103 * @return size of data that is going to be flushed from active set 104 */ 105 @Override -106 public MemstoreSize getFlushableSize() { -107 MemstoreSize snapshotSize = getSnapshotSize(); +106 public MemStoreSize getFlushableSize() { +107 MemStoreSize snapshotSize = getSnapshotSize(); 108 return snapshotSize.getDataSize() > 0 ? snapshotSize -109 : new MemstoreSize(keySize(), heapSize()); +109 : new MemStoreSize(keySize(), heapSize()); 110 } 111 112 @Override @@ -162,8 +162,8 @@ 154 } 155 156 @Override -157 public MemstoreSize size() { -158 return new MemstoreSize(this.active.keySize(), this.active.heapSize()); +157 public MemStoreSize size() { +158 return new MemStoreSize(this.active.keySize(), this.active.heapSize()); 159 } 160 161 /** @@ -202,7 +202,7 @@ 194 byte [] fam = Bytes.toBytes("col"); 195 byte [] qf = Bytes.toBytes("umn"); 196 byte [] empty = new byte[0]; -197 MemstoreSize memstoreSize = new MemstoreSize(); +197 MemStoreSize memstoreSize = new MemStoreSize(); 198 for (int i = 0; i < count; i++) { 199 // Give each its own ts 200 memstore1.add(new KeyValue(Bytes.toBytes(i), fam, qf, i, empty), memstoreSize); @@ -216,7 +216,7 @@ 208 + (memstoreSize.getDataSize() + memstoreSize.getHeapSize())); 209 // Make a variably sized memstore. 210 DefaultMemStore memstore2 = new DefaultMemStore(); -211 memstoreSize = new MemstoreSize(); +211 memstoreSize = new MemStoreSize(); 212 for (int i = 0; i < count; i++) { 213 memstore2.add(new KeyValue(Bytes.toBytes(i), fam, qf, i, new byte[i]), memstoreSize); 214 } http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3332caca/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/FlushLargeStoresPolicy.html ---------------------------------------------------------------------- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/FlushLargeStoresPolicy.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/FlushLargeStoresPolicy.html index c661130..62d811d 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/FlushLargeStoresPolicy.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/FlushLargeStoresPolicy.html @@ -54,7 +54,7 @@ 046 int familyNumber = region.getTableDescriptor().getColumnFamilyCount(); 047 // For multiple families, lower bound is the "average flush size" by default 048 // unless setting in configuration is larger. -049 long flushSizeLowerBound = region.getMemstoreFlushSize() / familyNumber; +049 long flushSizeLowerBound = region.getMemStoreFlushSize() / familyNumber; 050 long minimumLowerBound = 051 getConf().getLong(HREGION_COLUMNFAMILY_FLUSH_SIZE_LOWER_BOUND_MIN, 052 DEFAULT_HREGION_COLUMNFAMILY_FLUSH_SIZE_LOWER_BOUND_MIN); http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3332caca/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/FlushNonSloppyStoresFirstPolicy.html ---------------------------------------------------------------------- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/FlushNonSloppyStoresFirstPolicy.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/FlushNonSloppyStoresFirstPolicy.html index 2de1691..81ea8ea 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/FlushNonSloppyStoresFirstPolicy.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/FlushNonSloppyStoresFirstPolicy.html @@ -73,7 +73,7 @@ 065 super.configureForRegion(region); 066 this.flushSizeLowerBound = getFlushSizeLowerBound(region); 067 for (HStore store : region.stores.values()) { -068 if (store.isSloppyMemstore()) { +068 if (store.isSloppyMemStore()) { 069 sloppyStores.add(store); 070 } else { 071 regularStores.add(store); http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3332caca/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/FlushRequester.html ---------------------------------------------------------------------- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/FlushRequester.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/FlushRequester.html index 5e41c36..6104b1f 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/FlushRequester.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/FlushRequester.html @@ -73,7 +73,7 @@ 065 * 066 * @param globalMemStoreSize 067 */ -068 public void setGlobalMemstoreLimit(long globalMemStoreSize); +068 public void setGlobalMemStoreLimit(long globalMemStoreSize); 069} http://git-wip-us.apache.org/repos/asf/hbase-site/blob/3332caca/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.BatchOperation.html ---------------------------------------------------------------------- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.BatchOperation.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.BatchOperation.html index a0961f7..4a7f4ae 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.BatchOperation.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HRegion.BatchOperation.html @@ -526,23 +526,23 @@ 518 final FlushResultImpl result; // indicating a failure result from prepare 519 final TreeMap<byte[], StoreFlushContext> storeFlushCtxs; 520 final TreeMap<byte[], List<Path>> committedFiles; -521 final TreeMap<byte[], MemstoreSize> storeFlushableSize; +521 final TreeMap<byte[], MemStoreSize> storeFlushableSize; 522 final long startTime; 523 final long flushOpSeqId; 524 final long flushedSeqId; -525 final MemstoreSize totalFlushableSize; +525 final MemStoreSize totalFlushableSize; 526 527 /** Constructs an early exit case */ 528 PrepareFlushResult(FlushResultImpl result, long flushSeqId) { -529 this(result, null, null, null, Math.max(0, flushSeqId), 0, 0, new MemstoreSize()); +529 this(result, null, null, null, Math.max(0, flushSeqId), 0, 0, new MemStoreSize()); 530 } 531 532 /** Constructs a successful prepare flush result */ 533 PrepareFlushResult( 534 TreeMap<byte[], StoreFlushContext> storeFlushCtxs, 535 TreeMap<byte[], List<Path>> committedFiles, -536 TreeMap<byte[], MemstoreSize> storeFlushableSize, long startTime, long flushSeqId, -537 long flushedSeqId, MemstoreSize totalFlushableSize) { +536 TreeMap<byte[], MemStoreSize> storeFlushableSize, long startTime, long flushSeqId, +537 long flushedSeqId, MemStoreSize totalFlushableSize) { 538 this(null, storeFlushCtxs, committedFiles, storeFlushableSize, startTime, 539 flushSeqId, flushedSeqId, totalFlushableSize); 540 } @@ -551,8 +551,8 @@ 543 FlushResultImpl result, 544 TreeMap<byte[], StoreFlushContext> storeFlushCtxs, 545 TreeMap<byte[], List<Path>> committedFiles, -546 TreeMap<byte[], MemstoreSize> storeFlushableSize, long startTime, long flushSeqId, -547 long flushedSeqId, MemstoreSize totalFlushableSize) { +546 TreeMap<byte[], MemStoreSize> storeFlushableSize, long startTime, long flushSeqId, +547 long flushedSeqId, MemStoreSize totalFlushableSize) { 548 this.result = result; 549 this.storeFlushCtxs = storeFlushCtxs; 550 this.committedFiles = committedFiles; @@ -1015,7 +1015,7 @@ 1007 Future<HStore> future = completionService.take(); 1008 HStore store = future.get(); 1009 this.stores.put(store.getColumnFamilyDescriptor().getName(), store); -1010 if (store.isSloppyMemstore()) { +1010 if (store.isSloppyMemStore()) { 1011 hasSloppyStores = true; 1012 } 1013 @@ -1025,7 +1025,7 @@ 1017 if (maxSeqId == -1 || storeMaxSequenceId > maxSeqId) { 1018 maxSeqId = storeMaxSequenceId; 1019 } -1020 long maxStoreMemstoreTS = store.getMaxMemstoreTS().orElse(0L); +1020 long maxStoreMemstoreTS = store.getMaxMemStoreTS().orElse(0L); 1021 if (maxStoreMemstoreTS > maxMemstoreTS) { 1022 maxMemstoreTS = maxStoreMemstoreTS; 1023 } @@ -1202,24 +1202,24 @@ 1194 * store 1195 * @return the size of memstore in this region 1196 */ -1197 public long addAndGetMemstoreSize(MemstoreSize memstoreSize) { +1197 public long addAndGetMemStoreSize(MemStoreSize memstoreSize) { 1198 if (this.rsAccounting != null) { -1199 rsAccounting.incGlobalMemstoreSize(memstoreSize); +1199 rsAccounting.incGlobalMemStoreSize(memstoreSize); 1200 } 1201 long size = this.memstoreDataSize.addAndGet(memstoreSize.getDataSize()); -1202 checkNegativeMemstoreDataSize(size, memstoreSize.getDataSize()); +1202 checkNegativeMemStoreDataSize(size, memstoreSize.getDataSize()); 1203 return size; 1204 } 1205 -1206 public void decrMemstoreSize(MemstoreSize memstoreSize) { +1206 public void decrMemStoreSize(MemStoreSize memstoreSize) { 1207 if (this.rsAccounting != null) { -1208 rsAccounting.decGlobalMemstoreSize(memstoreSize); +1208 rsAccounting.decGlobalMemStoreSize(memstoreSize); 1209 } 1210 long size = this.memstoreDataSize.addAndGet(-memstoreSize.getDataSize()); -1211 checkNegativeMemstoreDataSize(size, -memstoreSize.getDataSize()); +1211 checkNegativeMemStoreDataSize(size, -memstoreSize.getDataSize()); 1212 } 1213 -1214 private void checkNegativeMemstoreDataSize(long memstoreDataSize, long delta) { +1214 private void checkNegativeMemStoreDataSize(long memstoreDataSize, long delta) { 1215 // This is extremely bad if we make memstoreSize negative. Log as much info on the offending 1216 // caller as possible. (memStoreSize might be a negative value already -- freeing memory) 1217 if (memstoreDataSize < 0) { @@ -1268,7 +1268,7 @@ 1260 } 1261 1262 @Override -1263 public long getMemstoreSize() { +1263 public long getMemStoreSize() { 1264 return memstoreDataSize.get(); 1265 } 1266 @@ -1653,13 +1653,13 @@ 1645 1646 // close each store in parallel 1647 for (HStore store : stores.values()) { -1648 MemstoreSize flushableSize = store.getFlushableSize(); +1648 MemStoreSize flushableSize = store.getFlushableSize(); 1649 if (!(abort || flushableSize.getDataSize() == 0 || writestate.readOnly)) { 1650 if (getRegionServerServices() != null) { 1651 getRegionServerServices().abort("Assertion failed while closing store " 1652 + getRegionInfo().getRegionNameAsString() + " " + store 1653 + ". flushableSize expected=0, actual= " + flushableSize -1654 + ". Current memstoreSize=" + getMemstoreSize() + ". Maybe a coprocessor " +1654 + ". Current memstoreSize=" + getMemStoreSize() + ". Maybe a coprocessor " 1655 + "operation failed and left the memstore in a partially updated state.", null); 1656 } 1657 } @@ -1702,7 +1702,7 @@ 1694 1695 this.closed.set(true); 1696 if (!canFlush) { -1697 this.decrMemstoreSize(new MemstoreSize(memstoreDataSize.get(), getMemstoreHeapSize())); +1697 this.decrMemStoreSize(new MemStoreSize(memstoreDataSize.get(), getMemStoreHeapSize())); 1698 } else if (memstoreDataSize.get() != 0) { 1699 LOG.error("Memstore size is " + memstoreDataSize.get()); 1700 } @@ -1724,7 +1724,7 @@ 1716 } 1717 } 1718 -1719 private long getMemstoreHeapSize() { +1719 private long getMemStoreHeapSize() { 1720 return stores.values().stream().mapToLong(s -> s.getMemStoreSize().getHeapSize()).sum(); 1721 } 1722 @@ -1914,7 +1914,7 @@ 1906 byte[] encodedRegionName = this.getRegionInfo().getEncodedNameAsBytes(); 1907 regionLoadBldr.clearStoreCompleteSequenceId(); 1908 for (byte[] familyName : this.stores.keySet()) { -1909 long earliest = this.wal.getEarliestMemstoreSeqNum(encodedRegionName, familyName); +1909 long earliest = this.wal.getEarliestMemStoreSeqNum(encodedRegionName, familyName); 1910 // Subtract - 1 to go earlier than the current oldest, unflushed edit in memstore; this will 1911 // give us a sequence id that is for sure flushed. We want edit replay to start after this 1912 // sequence id in this region. If NO_SEQNUM, use the regions maximum flush id. @@ -2277,7 +2277,7 @@ 2269 * returns true which will make a lot of flush requests. 2270 */ 2271 boolean shouldFlushStore(HStore store) { -2272 long earliest = this.wal.getEarliestMemstoreSeqNum(getRegionInfo().getEncodedNameAsBytes(), +2272 long earliest = this.wal.getEarliestMemStoreSeqNum(getRegionInfo().getEncodedNameAsBytes(), 2273 store.getColumnFamilyDescriptor().getName()) - 1; 2274 if (earliest > 0 && earliest + flushPerChanges < mvcc.getReadPoint()) { 2275 if (LOG.isDebugEnabled()) { @@ -2447,7 +2447,7 @@ 2439 // block waiting for the lock for internal flush 2440 this.updatesLock.writeLock().lock(); 2441 status.setStatus("Preparing flush snapshotting stores in " + getRegionInfo().getEncodedName()); -2442 MemstoreSize totalSizeOfFlushableStores = new MemstoreSize(); +2442 MemStoreSize totalSizeOfFlushableStores = new MemStoreSize(); 2443 2444 Map<byte[], Long> flushedFamilyNamesToSeq = new HashMap<>(); 2445 for (HStore store : storesToFlush) { @@ -2457,7 +2457,7 @@ 2449 2450 TreeMap<byte[], StoreFlushContext> storeFlushCtxs = new TreeMap<>(Bytes.BYTES_COMPARATOR); 2451 TreeMap<byte[], List<Path>> committedFiles = new TreeMap<>(Bytes.BYTES_COMPARATOR); -2452 TreeMap<byte[], MemstoreSize> storeFlushableSize = new TreeMap<>(Bytes.BYTES_COMPARATOR); +2452 TreeMap<byte[], MemStoreSize> storeFlushableSize = new TreeMap<>(Bytes.BYTES_COMPARATOR); 2453 // The sequence id of this flush operation which is used to log FlushMarker and pass to 2454 // createFlushContext to use as the store file's sequence id. It can be in advance of edits 2455 // still in the memstore, edits that are in other column families yet to be flushed. @@ -2489,8 +2489,8 @@ 2481 } 2482 2483 for (HStore s : storesToFlush) { -2484 MemstoreSize flushableSize = s.getFlushableSize(); -2485 totalSizeOfFlushableStores.incMemstoreSize(flushableSize); +2484 MemStoreSize flushableSize = s.getFlushableSize(); +2485 totalSizeOfFlushableStores.incMemStoreSize(flushableSize); 2486 storeFlushCtxs.put(s.getColumnFamilyDescriptor().getName(), s.createFlushContext(flushOpSeqId)); 2487 committedFiles.put(s.getColumnFamilyDescriptor().getName(), null); // for writing stores to WAL 2488 storeFlushableSize.put(s.getColumnFamilyDescriptor().getName(), flushableSize); @@ -2653,15 +2653,15 @@ 2645 committedFiles.put(storeName, storeCommittedFiles); 2646 // Flush committed no files, indicating flush is empty or flush was canceled 2647 if (storeCommittedFiles == null || storeCommittedFiles.isEmpty()) { -2648 MemstoreSize storeFlushableSize = prepareResult.storeFlushableSize.get(storeName); -2649 prepareResult.totalFlushableSize.decMemstoreSize(storeFlushableSize); +2648 MemStoreSize storeFlushableSize = prepareResult.storeFlushableSize.get(storeName); +2649 prepareResult.totalFlushableSize.decMemStoreSize(storeFlushableSize); 2650 } 2651 flushedOutputFileSize += flush.getOutputFileSize(); 2652 } 2653 storeFlushCtxs.clear(); 2654 2655 // Set down the memstore size by amount of flush. -2656 this.decrMemstoreSize(prepareResult.totalFlushableSize); +2656 this.decrMemStoreSize(prepareResult.totalFlushableSize); 2657 2658 if (wal != null) { 2659 // write flush marker to WAL. If fail, we should throw DroppedSnapshotException @@ -3118,7 +3118,7 @@ 3110 initialized = true; 3111 } 3112 doMiniBatchMutate(batchOp); -3113 long newSize = this.getMemstoreSize(); +3113 long newSize = this.getMemStoreSize(); 3114 requestFlushIfNeeded(newSize); 3115 } 3116 } finally { @@ -3190,7 +3190,7 @@ 3182 int cellCount = 0; 3183 /** Keep track of the locks we hold so we can release them in finally clause */ 3184 List<RowLock> acquiredRowLocks = Lists.newArrayListWithCapacity(batchOp.operations.length); -3185 MemstoreSize memstoreSize = new MemstoreSize(); +3185 MemStoreSize memstoreSize = new MemStoreSize(); 3186 final ObservedExceptionsInBatch observedExceptions = new ObservedExceptionsInBatch(); 3187 try { 3188 // STEP 1. Try to acquire as many locks as we can, and ensure we acquire at least one. @@ -3422,11 +3422,11 @@ 3414 this.updateSequenceId(familyMaps[i].values(), 3415 replay? batchOp.getReplaySequenceId(): writeEntry.getWriteNumber()); 3416 } -3417 applyFamilyMapToMemstore(familyMaps[i], memstoreSize); +3417 applyFamilyMapToMemStore(familyMaps[i], memstoreSize); 3418 } 3419 3420 // update memstore size -3421 this.addAndGetMemstoreSize(memstoreSize); +3421 this.addAndGetMemStoreSize(memstoreSize); 3422 3423 // calling the post CP hook for batch mutation 3424 if (!replay && coprocessorHost != null) { @@ -3960,13 +3960,13 @@ 3952 * @param familyMap Map of Cells by family 3953 * @param memstoreSize 3954 */ -3955 private void applyFamilyMapToMemstore(Map<byte[], List<Cell>> familyMap, -3956 MemstoreSize memstoreSize) throws IOException { +3955 private void applyFamilyMapToMemStore(Map<byte[], List<Cell>> familyMap, +3956 MemStoreSize memstoreSize) throws IOException { 3957 for (Map.Entry<byte[], List<Cell>> e : familyMap.entrySet()) { 3958 byte[] family = e.getKey(); 3959 List<Cell> cells = e.getValue(); 3960 assert cells instanceof RandomAccess; -3961 applyToMemstore(getStore(family), cells, false, memstoreSize); +3961 applyToMemStore(getStore(family), cells, false, memstoreSize); 3962 } 3963 } 3964 @@ -3974,11 +3974,11 @@ 3966 * @param delta If we are doing delta changes -- e.g. increment/append -- then this flag will be 3967 * set; when set we will run operations that make sense in the increment/append scenario 3968 * but that do not make sense otherwise. -3969 * @see #applyToMemstore(HStore, Cell, long) +3969 * @see #applyToMemStore(HStore, Cell, MemStoreSize) 3970 */ -3971 private void applyToMemstore(HStore store, List<Cell> cells, boolean delta, -3972 MemstoreSize memstoreSize) throws IOException { -3973 // Any change in how we update Store/MemStore needs to also be done in other applyToMemstore!!!! +3971 private void applyToMemStore(HStore store, List<Cell> cells, boolean delta, +3972 MemStoreSize memstoreSize) throws IOException { +3973 // Any change in how we update Store/MemStore needs to also be done in other applyToMemStore!!!! 3974 boolean upsert = delta && store.getColumnFamilyDescriptor().getMaxVersions() == 1; 3975 if (upsert) { 3976 store.upsert(cells, getSmallestReadPoint(), memstoreSize); @@ -3988,11 +3988,11 @@ 3980 } 3981 3982 /** -3983 * @see #applyToMemstore(HStore, List, boolean, boolean, long) +3983 * @see #applyToMemStore(HStore, List, boolean, MemStoreSize) 3984 */ -3985 private void applyToMemstore(HStore store, Cell cell, MemstoreSize memstoreSize) +3985 private void applyToMemStore(HStore store, Cell cell, MemStoreSize memstoreSize) 3986 throws IOException { -3987 // Any change in how we update Store/MemStore needs to also be done in other applyToMemstore!!!! +3987 // Any change in how we update Store/MemStore needs to also be done in other applyToMemStore!!!! 3988 if (store == null) { 3989 checkFamily(CellUtil.cloneFamily(cell)); 3990 // Unreachable because checkFamily will throw exception @@ -4048,7 +4048,7 @@ 4040 } 4041 4042 private void requestFlushIfNeeded(long memstoreTotalSize) throws RegionTooBusyException { -4043 if(memstoreTotalSize > this.getMemstoreFlushSize()) { +4043 if(memstoreTotalSize > this.getMemStoreFlushSize()) { 4044 requestFlush(); 4045 } 4046 } @@ -4316,7 +4316,7 @@ 4308 } 4309 4310 boolean flush = false; -4311 MemstoreSize memstoreSize = new MemstoreSize(); +4311 MemStoreSize memstoreSize = new MemStoreSize(); 4312 for (Cell cell: val.getCells()) { 4313 // Check this edit is for me. Also, guard against writing the special 4314 // METACOLUMN info such as HBASE::CACHEFLUSH entries @@ -4366,7 +4366,7 @@ 4358 rsAccounting.addRegionReplayEditsSize(getRegionInfo().getRegionName(), 4359 memstoreSize); 4360 } -4361 flush = isFlushSize(this.addAndGetMemstoreSize(memstoreSize)); +4361 flush = isFlushSize(this.addAndGetMemStoreSize(memstoreSize)); 4362 if (flush) { 4363 internalFlushcache(null, currentEditSeqId, stores.values(), status, false); 4364 } @@ -4675,7 +4675,7 @@ 4667 replayFlushInStores(flush, prepareFlushResult, true); 4668 4669 // Set down the memstore size by amount of flush. -4670 this.decrMemstoreSize(prepareFlushResult.totalFlushableSize); +4670 this.decrMemStoreSize(prepareFlushResult.totalFlushableSize); 4671 4672 this.prepareFlushResult = null; 4673 writestate.flushing = false; @@ -4708,11 +4708,11 @@ 4700 replayFlushInStores(flush, prepareFlushResult, true); 4701 4702 // Set down the memstore size by amount of flush. -4703 this.decrMemstoreSize(prepareFlushResult.totalFlushableSize); +4703 this.decrMemStoreSize(prepareFlushResult.totalFlushableSize); 4704 4705 // Inspect the memstore contents to see whether the memstore contains only edits 4706 // with seqId smaller than the flush seqId. If so, we can discard those edits. -4707 dropMemstoreContentsForSeqId(flush.getFlushSequenceNumber(), null); +4707 dropMemStoreContentsForSeqId(flush.getFlushSequenceNumber(), null); 4708 4709 this.prepareFlushResult = null; 4710 writestate.flushing = false; @@ -4733,7 +4733,7 @@ 4725 4726 // Inspect the memstore contents to see whether the memstore contains only edits 4727 // with seqId smaller than the flush seqId. If so, we can discard those edits. -4728 dropMemstoreContentsForSeqId(flush.getFlushSequenceNumber(), null); +4728 dropMemStoreContentsForSeqId(flush.getFlushSequenceNumber(), null); 4729 } 4730 4731 status.markComplete("Flush commit successful"); @@ -4811,8 +4811,8 @@ 4803 * if the memstore edits have seqNums smaller than the given seq id 4804 * @throws IOException 4805 */ -4806 private MemstoreSize dropMemstoreContentsForSeqId(long seqId, HStore store) throws IOException { -4807 MemstoreSize totalFreedSize = new MemstoreSize(); +4806 private MemStoreSize dropMemStoreContentsForSeqId(long seqId, HStore store) throws IOException { +4807 MemStoreSize totalFreedSize = new MemStoreSize(); 4808 this.updatesLock.writeLock().lock(); 4809 try { 4810 @@ -4826,10 +4826,10 @@ 4818 // Prepare flush (take a snapshot) and then abort (drop the snapshot) 4819 if (store == null) { 4820 for (HStore s : stores.values()) { -4821 totalFreedSize.incMemstoreSize(doDropStoreMemstoreContentsForSeqId(s, currentSeqId)); +4821 totalFreedSize.incMemStoreSize(doDropStoreMemStoreContentsForSeqId(s, currentSeqId)); 4822 } 4823 } else { -4824 totalFreedSize.incMemstoreSize(doDropStoreMemstoreContentsForSeqId(store, currentSeqId)); +4824 totalFreedSize.incMemStoreSize(doDropStoreMemStoreContentsForSeqId(store, currentSeqId)); 4825 } 4826 } else { 4827 LOG.info(getRegionInfo().getEncodedName() + " : " @@ -4842,10 +4842,10 @@ 4834 return totalFreedSize; 4835 } 4836 -4837 private MemstoreSize doDropStoreMemstoreContentsForSeqId(HStore s, long currentSeqId) +4837 private MemStoreSize doDropStoreMemStoreContentsForSeqId(HStore s, long currentSeqId) 4838 throws IOException { -4839 MemstoreSize flushableSize = s.getFlushableSize(); -4840 this.decrMemstoreSize(flushableSize); +4839 MemStoreSize flushableSize = s.getFlushableSize(); +4840 this.decrMemStoreSize(flushableSize); 4841 StoreFlushContext ctx = s.createFlushContext(currentSeqId); 4842 ctx.prepare(); 4843 ctx.abort(); @@ -4962,16 +4962,16 @@ 4954 StoreFlushContext ctx = this.prepareFlushResult.storeFlushCtxs == null ? 4955 null : this.prepareFlushResult.storeFlushCtxs.get(family); 4956 if (ctx != null) { -4957 MemstoreSize snapshotSize = store.getFlushableSize(); +4957 MemStoreSize snapshotSize = store.getFlushableSize(); 4958 ctx.abort(); -4959 this.decrMemstoreSize(snapshotSize); +4959 this.decrMemStoreSize(snapshotSize); 4960 this.prepareFlushResult.storeFlushCtxs.remove(family); 4961 } 4962 } 4963 } 4964 4965 // Drop the memstore contents if they are now smaller than the latest seen flushed file -4966 dropMemstoreContentsForSeqId(regionEvent.getLogSequenceNumber(), store); +4966 dropMemStoreContentsForSeqId(regionEvent.getLogSequenceNumber(), store); 4967 if (storeSeqId > this.maxFlushedSeqId) { 4968 this.maxFlushedSeqId = storeSeqId; 4969 } @@ -5156,9 +5156,9 @@ 5148 null : this.prepareFlushResult.storeFlushCtxs.get( 5149 store.getColumnFamilyDescriptor().getName()); 5150 if (ctx != null) { -5151 MemstoreSize snapshotSize = store.getFlushableSize(); +5151 MemStoreSize snapshotSize = store.getFlushableSize(); 5152 ctx.abort(); -5153 this.decrMemstoreSize(snapshotSize); +5153 this.decrMemStoreSize(snapshotSize); 5154 this.prepareFlushResult.storeFlushCtxs.remove( 5155 store.getColumnFamilyDescriptor().getName()); 5156 totalFreedDataSize += snapshotSize.getDataSize(); @@ -5177,7 +5177,7 @@ 5169 // advance the mvcc read point so that the new flushed files are visible. 5170 // either greater than flush seq number or they were already picked up via flush. 5171 for (HStore s : stores.values()) { -5172 mvcc.advanceTo(s.getMaxMemstoreTS().orElse(0L)); +5172 mvcc.advanceTo(s.getMaxMemStoreTS().orElse(0L)); 5173 } 5174 5175 @@ -5192,7 +5192,7 @@ 5184 if (!map.isEmpty()) { 5185 for (Map.Entry<HStore, Long> entry : map.entrySet()) { 5186 // Drop the memstore contents if they are now smaller than the latest seen flushed file -5187 totalFreedDataSize += dropMemstoreContentsForSeqId(entry.getValue(), entry.getKey()) +5187 totalFreedDataSize += dropMemStoreContentsForSeqId(entry.getValue(), entry.getKey()) 5188 .getDataSize(); 5189 } 5190 } @@ -5243,7 +5243,7 @@ 5235 * @param memstoreSize 5236 */ 5237 @VisibleForTesting -5238 protected void restoreEdit(HStore s, Cell cell, MemstoreSize memstoreSize) { +5238 protected void restoreEdit(HStore s, Cell cell, MemStoreSize memstoreSize) { 5239 s.add(cell, memstoreSize); 5240 } 5241 @@ -6966,7 +6966,7 @@ 6958 return null; 6959 } 6960 ClientProtos.RegionLoadStats.Builder stats = ClientProtos.RegionLoadStats.newBuilder(); -6961 stats.setMemstoreLoad((int) (Math.min(100, (this.memstoreDataSize.get() * 100) / this +6961 stats.setMemStoreLoad((int) (Math.min(100, (this.memstoreDataSize.get() * 100) / this 6962 .memstoreFlushSize))); 6963 if (rsServices.getHeapMemoryManager() != null) { 6964 // the HeapMemoryManager uses -0.0 to signal a problem asking the JVM, @@ -7029,7 +7029,7 @@ 7021 // This is assigned by mvcc either explicity in the below or in the guts of the WAL append 7022 // when it assigns the edit a sequencedid (A.K.A the mvcc write number). 7023 WriteEntry writeEntry = null; -7024 MemstoreSize memstoreSize = new MemstoreSize(); +7024 MemStoreSize memstoreSize = new MemStoreSize(); 7025 try { 7026 boolean success = false; 7027 try { @@ -7063,7 +7063,7 @@ 7055 long sequenceId = writeEntry.getWriteNumber(); 7056 for (Mutation m : mutations) { 7057 // Handle any tag based cell features. -7058 // TODO: Do we need to call rewriteCellTags down in applyToMemstore()? Why not before +7058 // TODO: Do we need to call rewriteCellTags down in applyToMemStore()? Why not before 7059 // so tags go into WAL? 7060 rewriteCellTags(m.getFamilyCellMap(), m); 7061 for (CellScanner cellScanner = m.cellScanner(); cellScanner.advance();) { @@ -7073,7 +7073,7 @@ 7065 // If no WAL, need to stamp it here. 7066 CellUtil.setSequenceId(cell, sequenceId); 7067 } -7068 applyToMemstore(getStore(cell), cell, memstoreSize); +7068 applyToMemStore(getStore(cell), cell, memstoreSize); 7069 } 7070 } 7071 @@ -7109,7 +7109,7 @@ 7101 } finally { 7102 closeRegionOperation(); 7103 if (!mutations.isEmpty()) { -7104 long newSize = this.addAndGetMemstoreSize(memstoreSize); +7104 long newSize = this.addAndGetMemStoreSize(memstoreSize); 7105 requestFlushIfNeeded(newSize); 7106 } 7107 } @@ -7214,7 +7214,7 @@ 7206 startRegionOperation(op); 7207 List<Cell> results = returnResults? new ArrayList<>(mutation.size()): null; 7208 RowLock rowLock = null; -7209 MemstoreSize memstoreSize = new MemstoreSize(); +7209 MemStoreSize memstoreSize = new MemStoreSize(); 7210 try { 7211 rowLock = getRowLockInternal(mutation.getRow(), false); 7212 lock(this.updatesLock.readLock()); @@ -7240,7 +7240,7 @@ 7232 } 7233 // Now write to MemStore. Do it a column family at a time. 7234 for (Map.Entry<HStore, List<Cell>> e : forMemStore.entrySet()) { -7235 applyToMemstore(e.getKey(), e.getValue(), true, memstoreSize); +7235 applyToMemStore(e.getKey(), e.getValue(), true, memstoreSize); 7236 } 7237 mvcc.completeAndWait(writeEntry); 7238 if (rsServices != null && rsServices.getNonceManager() != null) { @@ -7263,7 +7263,7 @@ 7255 rowLock.release(); 7256 } 7257 // Request a cache flush if over the limit. Do it outside update lock. -7258 if (isFlushSize(addAndGetMemstoreSize(memstoreSize))) { +7258 if (isFlushSize(addAndGetMemStoreSize(memstoreSize))) { 7259 requestFlush(); 7260 } 7261 closeRegionOperation(op); @@ -7990,7 +7990,7 @@ 7982 7983 @Override 7984 public long getOldestSeqIdOfStore(byte[] familyName) { -7985 return wal.getEarliestMemstoreSeqNum(getRegionInfo().getEncodedNameAsBytes(), familyName); +7985 return wal.getEarliestMemStoreSeqNum(getRegionInfo().getEncodedNameAsBytes(), familyName); 7986 } 7987 7988 @Override @@ -8067,7 +8067,7 @@ 8059 : CellComparator.COMPARATOR; 8060 } 8061 -8062 public long getMemstoreFlushSize() { +8062 public long getMemStoreFlushSize() { 8063 return this.memstoreFlushSize; 8064 } 8065 @@ -8087,7 +8087,7 @@ 8079 } 8080 buf.append("end-of-stores"); 8081 buf.append(", memstore size "); -8082 buf.append(getMemstoreSize()); +8082 buf.append(getMemStoreSize()); 8083 if (getRegionInfo().getRegionNameAsString().startsWith(regionName)) { 8084 throw new RuntimeException(buf.toString()); 8085 }