HBASE-7055 Revert - part 2

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1403898 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2012-10-30 22:11:19 +00:00
parent 1abf20084a
commit b31e78a424
2 changed files with 11 additions and 12 deletions

View File

@ -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

View File

@ -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,