You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by pa...@apache.org on 2021/02/03 05:04:57 UTC
[hbase] branch master updated: HBASE-25546
PerfTestCompactionPolicies is failing because of NPE (#2921)
This is an automated email from the ASF dual-hosted git repository.
pankajkumar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push:
new d6d67d1 HBASE-25546 PerfTestCompactionPolicies is failing because of NPE (#2921)
d6d67d1 is described below
commit d6d67d1e9f61bb231130a9cd453d86594841da9c
Author: robin7roy <57...@users.noreply.github.com>
AuthorDate: Wed Feb 3 10:34:34 2021 +0530
HBASE-25546 PerfTestCompactionPolicies is failing because of NPE (#2921)
Adds mock for getRegionInfo which was missing earlier.
Signed-off-by: Pankaj Kumar<pa...@apache.org>
---
.../hbase/regionserver/compactions/PerfTestCompactionPolicies.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/PerfTestCompactionPolicies.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/PerfTestCompactionPolicies.java
index 13c7a6b..0c84507 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/PerfTestCompactionPolicies.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/PerfTestCompactionPolicies.java
@@ -29,6 +29,7 @@ import java.util.List;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.hbase.client.RegionInfoBuilder;
import org.apache.hadoop.hbase.regionserver.HStore;
import org.apache.hadoop.hbase.regionserver.HStoreFile;
import org.apache.hadoop.hbase.regionserver.StoreConfigInformation;
@@ -197,6 +198,7 @@ public class PerfTestCompactionPolicies extends MockStoreFileGenerator {
HStore s = mock(HStore.class);
when(s.getStoreFileTtl()).thenReturn(Long.MAX_VALUE);
when(s.getBlockingFileCount()).thenReturn(7L);
+ when(s.getRegionInfo()).thenReturn(RegionInfoBuilder.FIRST_META_REGIONINFO);
return s;
}