From ee762257835a060e9e01244fb8b0dc97682af098 Mon Sep 17 00:00:00 2001 From: Jimmy Xiang Date: Tue, 10 Jun 2014 09:28:30 -0700 Subject: [PATCH] HBASE-11120 Addendum for fixing compilation error --- .../apache/hadoop/hbase/regionserver/StripeStoreConfig.java | 4 ++-- .../java/org/apache/hadoop/hbase/regionserver/TestStore.java | 4 +--- .../regionserver/compactions/TestStripeCompactionPolicy.java | 5 ++--- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreConfig.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreConfig.java index 607344dc7d4..9dd0ecb71c9 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreConfig.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreConfig.java @@ -82,10 +82,10 @@ public class StripeStoreConfig { this.level0CompactMinFiles = config.getInt(MIN_FILES_L0_KEY, 4); this.flushIntoL0 = config.getBoolean(FLUSH_TO_L0_KEY, false); int minMinFiles = flushIntoL0 ? 3 : 4; // make sure not to compact tiny files too often. - int minFiles = config.getInt(CompactionConfiguration.MIN_KEY, -1); + int minFiles = config.getInt(CompactionConfiguration.HBASE_HSTORE_COMPACTION_MIN_KEY, -1); this.stripeCompactMinFiles = config.getInt(MIN_FILES_KEY, Math.max(minMinFiles, minFiles)); this.stripeCompactMaxFiles = config.getInt(MAX_FILES_KEY, - config.getInt(CompactionConfiguration.MAX_KEY, 10)); + config.getInt(CompactionConfiguration.HBASE_HSTORE_COMPACTION_MAX_KEY, 10)); this.maxRegionSplitImbalance = getFloat(config, MAX_REGION_SPLIT_IMBALANCE_KEY, 1.5f, true); float splitPartCount = getFloat(config, SPLIT_PARTS_KEY, 2f, true); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStore.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStore.java index 018f19037f1..6929222201e 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStore.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStore.java @@ -64,8 +64,6 @@ import org.apache.hadoop.hbase.io.hfile.HFileContext; import org.apache.hadoop.hbase.io.hfile.HFileContextBuilder; import org.apache.hadoop.hbase.monitoring.MonitoredTask; import org.apache.hadoop.hbase.regionserver.compactions.CompactionConfiguration; -import org.apache.hadoop.hbase.regionserver.compactions.CompactionContext; -import org.apache.hadoop.hbase.regionserver.compactions.CompactionRequest; import org.apache.hadoop.hbase.regionserver.compactions.DefaultCompactor; import org.apache.hadoop.hbase.regionserver.wal.HLog; import org.apache.hadoop.hbase.regionserver.wal.HLogFactory; @@ -279,7 +277,7 @@ public class TestStore { // Enable the expired store file deletion conf.setBoolean("hbase.store.delete.expired.storefile", true); // Set the compaction threshold higher to avoid normal compactions. - conf.setInt(CompactionConfiguration.MIN_KEY, 5); + conf.setInt(CompactionConfiguration.HBASE_HSTORE_COMPACTION_MIN_KEY, 5); HColumnDescriptor hcd = new HColumnDescriptor(family); hcd.setTimeToLive(ttl); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/TestStripeCompactionPolicy.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/TestStripeCompactionPolicy.java index 885d4503142..c7365d9edf7 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/TestStripeCompactionPolicy.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/TestStripeCompactionPolicy.java @@ -34,7 +34,6 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; -import org.apache.commons.lang.NotImplementedException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.HBaseConfiguration; @@ -115,7 +114,7 @@ public class TestStripeCompactionPolicy { public void testSingleStripeCompaction() throws Exception { // Create a special policy that only compacts single stripes, using standard methods. Configuration conf = HBaseConfiguration.create(); - conf.setFloat(CompactionConfiguration.RATIO_KEY, 1.0F); + conf.setFloat(CompactionConfiguration.HBASE_HSTORE_COMPACTION_RATIO_KEY, 1.0F); conf.setInt(StripeStoreConfig.MIN_FILES_KEY, 3); conf.setInt(StripeStoreConfig.MAX_FILES_KEY, 4); conf.setLong(StripeStoreConfig.SIZE_TO_SPLIT_KEY, 1000); // make sure the are no splits @@ -245,7 +244,7 @@ public class TestStripeCompactionPolicy { createStripesWithSizes(0, 0, new Long[] { defaultSplitSize - 2, 2L }); assertNull(createPolicy(conf).selectCompaction(si, al(), false)); // Make sure everything is eligible. - conf.setFloat(CompactionConfiguration.RATIO_KEY, 500f); + conf.setFloat(CompactionConfiguration.HBASE_HSTORE_COMPACTION_RATIO_KEY, 500f); StripeCompactionPolicy policy = createPolicy(conf); verifyWholeStripesCompaction(policy, si, 0, 0, null, 2, splitTargetSize); // Add some extra stripes...