From b31e78a4243d5f19a2c785d293cddbdead28baf1 Mon Sep 17 00:00:00 2001 From: Zhihong Yu Date: Tue, 30 Oct 2012 22:11:19 +0000 Subject: [PATCH] HBASE-7055 Revert - part 2 git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1403898 13f79535-47bb-0310-9956-ffa450edef68 --- .../hbase/regionserver/TestCompaction.java | 7 ++----- .../hadoop/hbase/regionserver/TestStore.java | 16 +++++++++------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java index edd6085e412..0fd274a5255 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java @@ -303,8 +303,6 @@ public class TestCompaction extends HBaseTestCase { conf.setFloat("hbase.hregion.majorcompaction.jitter", jitterPct); HStore s = ((HStore) r.getStore(COLUMN_FAMILY)); - // TODO: temporary call, until HBASE-3909 is committed in some form. - s.updateConfiguration(); try { createStoreFile(r); createStoreFile(r); @@ -316,10 +314,9 @@ public class TestCompaction extends HBaseTestCase { assertEquals(2, s.getStorefilesCount()); // ensure that major compaction time is deterministic - CompactionManager c = s.compactionManager; - long mcTime = c.getNextMajorCompactTime(); + long mcTime = s.getNextMajorCompactTime(); for (int i = 0; i < 10; ++i) { - assertEquals(mcTime, c.getNextMajorCompactTime()); + assertEquals(mcTime, s.getNextMajorCompactTime()); } // ensure that the major compaction time is within the variance 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 4c029878cb8..f0f581ee00d 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 @@ -216,15 +216,17 @@ public class TestStore extends TestCase { flush(i); } // after flush; check the lowest time stamp - long lowestTimeStampFromManager = CompactionManager.getLowestTimestamp(store.getStorefiles()); - long lowestTimeStampFromFS = getLowestTimeStampFromFS(fs, store.getStorefiles()); - assertEquals(lowestTimeStampFromManager,lowestTimeStampFromFS); - + long lowestTimeStampFromStore = + HStore.getLowestTimestamp(store.getStorefiles()); + long lowestTimeStampFromFS = + getLowestTimeStampFromFS(fs,store.getStorefiles()); + assertEquals(lowestTimeStampFromStore,lowestTimeStampFromFS); + // after compact; check the lowest time stamp store.compact(store.requestCompaction()); - lowestTimeStampFromManager = CompactionManager.getLowestTimestamp(store.getStorefiles()); - lowestTimeStampFromFS = getLowestTimeStampFromFS(fs, store.getStorefiles()); - assertEquals(lowestTimeStampFromManager, lowestTimeStampFromFS); + lowestTimeStampFromStore = HStore.getLowestTimestamp(store.getStorefiles()); + lowestTimeStampFromFS = getLowestTimeStampFromFS(fs,store.getStorefiles()); + assertEquals(lowestTimeStampFromStore,lowestTimeStampFromFS); } private static long getLowestTimeStampFromFS(FileSystem fs,