You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bi...@apache.org on 2019/12/24 11:38:22 UTC
[hbase] branch branch-2.2 updated: HBASE-23589: FlushDescriptor
contains non-matching family/output combinations (#949)
This is an automated email from the ASF dual-hosted git repository.
binlijin pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.2 by this push:
new eb25cdc HBASE-23589: FlushDescriptor contains non-matching family/output combinations (#949)
eb25cdc is described below
commit eb25cdcd037ad1de239e509d026cd239bf4fc520
Author: BukrosSzabolcs <bu...@gmail.com>
AuthorDate: Tue Dec 24 12:37:06 2019 +0100
HBASE-23589: FlushDescriptor contains non-matching family/output combinations (#949)
Signed-off-by: Duo Zhang <zh...@apache.org>
Signed-off-by: Lijin Bin <bi...@apache.org>
---
.../java/org/apache/hadoop/hbase/regionserver/HRegion.java | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index 5c280cd..467b49f 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -2796,22 +2796,21 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
// Switch snapshot (in memstore) -> new hfile (thus causing
// all the store scanners to reset/reseek).
- Iterator<HStore> it = storesToFlush.iterator();
- // stores.values() and storeFlushCtxs have same order
- for (StoreFlushContext flush : storeFlushCtxs.values()) {
- boolean needsCompaction = flush.commit(status);
+ for (Map.Entry<byte[], StoreFlushContext> flushEntry : storeFlushCtxs.entrySet()) {
+ StoreFlushContext sfc = flushEntry.getValue();
+ boolean needsCompaction = sfc.commit(status);
if (needsCompaction) {
compactionRequested = true;
}
- byte[] storeName = it.next().getColumnFamilyDescriptor().getName();
- List<Path> storeCommittedFiles = flush.getCommittedFiles();
+ byte[] storeName = flushEntry.getKey();
+ List<Path> storeCommittedFiles = sfc.getCommittedFiles();
committedFiles.put(storeName, storeCommittedFiles);
// Flush committed no files, indicating flush is empty or flush was canceled
if (storeCommittedFiles == null || storeCommittedFiles.isEmpty()) {
MemStoreSize storeFlushableSize = prepareResult.storeFlushableSize.get(storeName);
prepareResult.totalFlushableSize.decMemStoreSize(storeFlushableSize);
}
- flushedOutputFileSize += flush.getOutputFileSize();
+ flushedOutputFileSize += sfc.getOutputFileSize();
}
storeFlushCtxs.clear();