From d4c94a409aee953fcb533cd895d37dca38bb79c7 Mon Sep 17 00:00:00 2001 From: Andrew Purtell Date: Tue, 9 Dec 2014 12:46:35 -0800 Subject: [PATCH] HBASE-11979 Compaction progress reporting is wrong (Esteban Gutierrez) --- .../hadoop/hbase/regionserver/compactions/Compactor.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java index 2ddc06a3d97..4b62cad984d 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java @@ -126,10 +126,10 @@ public abstract class Compactor { LOG.warn("Null reader for " + file.getPath()); continue; } - // NOTE: getFilterEntries could cause under-sized blooms if the user - // switches bloom type (e.g. from ROW to ROWCOL) - long keyCount = (r.getBloomFilterType() == store.getFamily().getBloomFilterType()) - ? r.getFilterEntries() : r.getEntries(); + // NOTE: use getEntries when compacting instead of getFilterEntries, otherwise under-sized + // blooms can cause progress to be miscalculated or if the user switches bloom + // type (e.g. from ROW to ROWCOL) + long keyCount = r.getEntries(); fd.maxKeyCount += keyCount; // calculate the latest MVCC readpoint in any of the involved store files Map fileInfo = r.loadFileInfo();