From commits-return-67436-archive-asf-public=cust-asf.ponee.io@hbase.apache.org Thu Feb 8 09:57:20 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 0B2A4180676 for ; Thu, 8 Feb 2018 09:57:20 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id EE24A160C62; Thu, 8 Feb 2018 08:57:19 +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 1A460160C5E for ; Thu, 8 Feb 2018 09:57:18 +0100 (CET) Received: (qmail 2706 invoked by uid 500); 8 Feb 2018 08:57:17 -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 2442 invoked by uid 99); 8 Feb 2018 08:57:17 -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; Thu, 08 Feb 2018 08:57:17 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 95AB5E0007; Thu, 8 Feb 2018 08:57:17 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: zhangduo@apache.org To: commits@hbase.apache.org Date: Thu, 08 Feb 2018 08:57:19 -0000 Message-Id: <4c8cdea4539d4e2dbaf903636e525d39@git.apache.org> In-Reply-To: <9345779d9ae94d87a611d08deab5545f@git.apache.org> References: <9345779d9ae94d87a611d08deab5545f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [03/18] hbase git commit: HBASE-19946 More test clean up for local-mode HTU HBASE-19946 More test clean up for local-mode HTU Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/b5ccfecc Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/b5ccfecc Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/b5ccfecc Branch: refs/heads/HBASE-19064 Commit: b5ccfecc96fe13ca1db81b5a3d3640deb176647d Parents: 001f9cc Author: Mike Drob Authored: Tue Feb 6 12:38:46 2018 -0600 Committer: Mike Drob Committed: Tue Feb 6 15:20:39 2018 -0600 ---------------------------------------------------------------------- .../regionserver/TestPerColumnFamilyFlush.java | 8 ++--- .../TestWalAndCompactingMemStoreFlush.java | 31 +++++++------------- 2 files changed, 15 insertions(+), 24 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/b5ccfecc/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestPerColumnFamilyFlush.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestPerColumnFamilyFlush.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestPerColumnFamilyFlush.java index e9a1a14..8266a88 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestPerColumnFamilyFlush.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestPerColumnFamilyFlush.java @@ -129,8 +129,8 @@ public class TestPerColumnFamilyFlush { @Test(timeout = 180000) public void testSelectiveFlushWhenEnabled() throws IOException { - // Set up the configuration - Configuration conf = HBaseConfiguration.create(); + // Set up the configuration, use new one to not conflict with minicluster in other tests + Configuration conf = new HBaseTestingUtility().getConfiguration(); conf.setLong(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, 200 * 1024); conf.set(FlushPolicyFactory.HBASE_FLUSH_POLICY_KEY, FlushAllLargeStoresPolicy.class.getName()); conf.setLong(FlushLargeStoresPolicy.HREGION_COLUMNFAMILY_FLUSH_SIZE_LOWER_BOUND_MIN, @@ -271,8 +271,8 @@ public class TestPerColumnFamilyFlush { @Test(timeout = 180000) public void testSelectiveFlushWhenNotEnabled() throws IOException { - // Set up the configuration - Configuration conf = HBaseConfiguration.create(); + // Set up the configuration, use new one to not conflict with minicluster in other tests + Configuration conf = new HBaseTestingUtility().getConfiguration(); conf.setLong(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, 200 * 1024); conf.set(FlushPolicyFactory.HBASE_FLUSH_POLICY_KEY, FlushAllStoresPolicy.class.getName()); http://git-wip-us.apache.org/repos/asf/hbase/blob/b5ccfecc/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestWalAndCompactingMemStoreFlush.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestWalAndCompactingMemStoreFlush.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestWalAndCompactingMemStoreFlush.java index ab56991..8b20b20 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestWalAndCompactingMemStoreFlush.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestWalAndCompactingMemStoreFlush.java @@ -36,6 +36,7 @@ import org.apache.hadoop.hbase.testclassification.RegionServerTests; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.Threads; import org.apache.hadoop.hbase.wal.WAL; +import org.junit.Before; import org.junit.ClassRule; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -63,6 +64,8 @@ public class TestWalAndCompactingMemStoreFlush { public static final byte[] FAMILY2 = FAMILIES[1]; public static final byte[] FAMILY3 = FAMILIES[2]; + private Configuration conf; + private HRegion initHRegion(String callingMethod, Configuration conf) throws IOException { int i=0; HTableDescriptor htd = new HTableDescriptor(TABLENAME); @@ -131,16 +134,19 @@ public class TestWalAndCompactingMemStoreFlush { Arrays.equals(r.getFamilyMap(family).get(qf), val)); } + @Before + public void setup() { + conf = HBaseConfiguration.create(TEST_UTIL.getConfiguration()); + conf.set(FlushPolicyFactory.HBASE_FLUSH_POLICY_KEY, + FlushNonSloppyStoresFirstPolicy.class.getName()); + conf.setDouble(CompactingMemStore.IN_MEMORY_FLUSH_THRESHOLD_FACTOR_KEY, 0.5); + } + @Test(timeout = 180000) public void testSelectiveFlushWithEager() throws IOException { - // Set up the configuration - Configuration conf = HBaseConfiguration.create(); conf.setLong(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, 300 * 1024); - conf.set(FlushPolicyFactory.HBASE_FLUSH_POLICY_KEY, - FlushNonSloppyStoresFirstPolicy.class.getName()); conf.setLong(FlushLargeStoresPolicy.HREGION_COLUMNFAMILY_FLUSH_SIZE_LOWER_BOUND_MIN, 75 * 1024); - conf.setDouble(CompactingMemStore.IN_MEMORY_FLUSH_THRESHOLD_FACTOR_KEY, 0.5); // set memstore to do data compaction conf.set(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_KEY, String.valueOf(MemoryCompactionPolicy.EAGER)); @@ -372,14 +378,10 @@ public class TestWalAndCompactingMemStoreFlush { /* Check the same as above but for index-compaction type of compacting memstore */ @Test(timeout = 180000) public void testSelectiveFlushWithIndexCompaction() throws IOException { - /*------------------------------------------------------------------------------*/ /* SETUP */ // Set up the configuration - Configuration conf = HBaseConfiguration.create(); conf.setLong(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, 300 * 1024); - conf.set(FlushPolicyFactory.HBASE_FLUSH_POLICY_KEY, - FlushNonSloppyStoresFirstPolicy.class.getName()); conf.setLong(FlushLargeStoresPolicy.HREGION_COLUMNFAMILY_FLUSH_SIZE_LOWER_BOUND_MIN, 75 * 1024); conf.setDouble(CompactingMemStore.IN_MEMORY_FLUSH_THRESHOLD_FACTOR_KEY, 0.5); // set memstore to index-compaction @@ -633,12 +635,8 @@ public class TestWalAndCompactingMemStoreFlush { @Test(timeout = 180000) public void testSelectiveFlushAndWALinDataCompaction() throws IOException { // Set up the configuration - Configuration conf = HBaseConfiguration.create(); conf.setLong(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, 300 * 1024); - conf.set(FlushPolicyFactory.HBASE_FLUSH_POLICY_KEY, - FlushNonSloppyStoresFirstPolicy.class.getName()); conf.setLong(FlushLargeStoresPolicy.HREGION_COLUMNFAMILY_FLUSH_SIZE_LOWER_BOUND_MIN, 75 * 1024); - conf.setDouble(CompactingMemStore.IN_MEMORY_FLUSH_THRESHOLD_FACTOR_KEY, 0.5); // set memstore to do data compaction and not to use the speculative scan conf.set(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_KEY, String.valueOf(MemoryCompactionPolicy.EAGER)); @@ -769,10 +767,7 @@ public class TestWalAndCompactingMemStoreFlush { @Test(timeout = 180000) public void testSelectiveFlushWithBasicAndMerge() throws IOException { // Set up the configuration - Configuration conf = HBaseConfiguration.create(); conf.setLong(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, 300 * 1024); - conf.set(FlushPolicyFactory.HBASE_FLUSH_POLICY_KEY, - FlushNonSloppyStoresFirstPolicy.class.getName()); conf.setLong(FlushLargeStoresPolicy.HREGION_COLUMNFAMILY_FLUSH_SIZE_LOWER_BOUND_MIN, 75 * 1024); conf.setDouble(CompactingMemStore.IN_MEMORY_FLUSH_THRESHOLD_FACTOR_KEY, 0.8); // set memstore to do index compaction with merge @@ -915,13 +910,9 @@ public class TestWalAndCompactingMemStoreFlush { @Test(timeout = 300000) public void testStressFlushAndWALinIndexCompaction() throws IOException { // Set up the configuration - Configuration conf = HBaseConfiguration.create(); conf.setLong(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, 600 * 1024); - conf.set(FlushPolicyFactory.HBASE_FLUSH_POLICY_KEY, - FlushNonSloppyStoresFirstPolicy.class.getName()); conf.setLong(FlushLargeStoresPolicy.HREGION_COLUMNFAMILY_FLUSH_SIZE_LOWER_BOUND_MIN, 200 * 1024); - conf.setDouble(CompactingMemStore.IN_MEMORY_FLUSH_THRESHOLD_FACTOR_KEY, 0.5); // set memstore to do data compaction and not to use the speculative scan conf.set(CompactingMemStore.COMPACTING_MEMSTORE_TYPE_KEY, String.valueOf(MemoryCompactionPolicy.BASIC));